diff options
author | Daniel Veillard <veillard@src.gnome.org> | 1999-04-21 20:12:07 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 1999-04-21 20:12:07 +0000 |
commit | 5099ae89ef661eea3e82dbf4b16bab9d7e9be2ff (patch) | |
tree | dbd7f08592f9db123e4ad23c3b22136e9ad522fa | |
parent | 517752b9859719c25e3eff6f5397de9dcd3bfd69 (diff) | |
download | libxml2-5099ae89ef661eea3e82dbf4b16bab9d7e9be2ff.tar.gz |
Removal of threading problems, update documentation, added SAX tests, Daniel
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | TODO | 11 | ||||
-rw-r--r-- | doc/html/gnome-xml-entities.html | 76 | ||||
-rw-r--r-- | doc/html/gnome-xml-parser.html | 1379 | ||||
-rw-r--r-- | doc/html/gnome-xml-parserinternals.html | 1172 | ||||
-rw-r--r-- | doc/html/gnome-xml-tree.html | 845 | ||||
-rw-r--r-- | doc/html/gnome-xml-valid.html | 159 | ||||
-rw-r--r-- | doc/html/index.sgml | 31 | ||||
-rw-r--r-- | entities.c | 96 | ||||
-rw-r--r-- | entities.h | 2 | ||||
-rw-r--r-- | include/libxml/entities.h | 2 | ||||
-rw-r--r-- | include/libxml/tree.h | 27 | ||||
-rw-r--r-- | include/libxml/valid.h | 6 | ||||
-rw-r--r-- | parser.c | 2 | ||||
-rw-r--r-- | testSAX.c | 599 | ||||
-rw-r--r-- | tree.c | 455 | ||||
-rw-r--r-- | tree.h | 27 | ||||
-rw-r--r-- | valid.c | 144 | ||||
-rw-r--r-- | valid.h | 6 |
19 files changed, 4295 insertions, 753 deletions
@@ -1,3 +1,12 @@ +Wed Apr 21 22:07:35 CEST 1999 + + * parser.[ch] tree.[ch] entities.[ch] valid.[ch] : removed the main + reentrancy problem at printing. One is left in entities.c, to + remove ASAP + * testSAX.c : added a test example showing the use of the SAX + interface if one doesn't want to build the DOM tree. + * html/gnome-xml-*.html html/index.sgml: regenerated the documentation + Mon Apr 5 14:14:40 CEST 1999 Daniel Veillard <Daniel.Veillard@w3.org> * parser.[ch] tree.[ch] SAX.c, parserInternals.h valid.[ch]: @@ -6,18 +6,9 @@ asbtraction of an input stream. A large part of the context is still located on the stack, moving to a state machine and putting everyting in the parsing context should provide an adequate solution. -- DOM support, instead of using a proprietary in memory - format for the document representation, the parser should - call a DOM API to actually build the resulting document. - Then the parser becomes independent of the in-memory - representation of the document. Even better using RPC's - the parser can actually build the document in another - program. -- Support for Comments (bad, should be in ASAP, they are parsed - but not stored), should be configurable. -- Improve the support of entities on save (+SAX). Done: +- Improve the support for SAX - C++ support : John Ehresman <jehresma@dsg.harvard.edu> - Updated code to follow more recent specs, added compatibility flag - Better error handling, use a dedicated, overridable error diff --git a/doc/html/gnome-xml-entities.html b/doc/html/gnome-xml-entities.html index eccca5ea..c3987094 100644 --- a/doc/html/gnome-xml-entities.html +++ b/doc/html/gnome-xml-entities.html @@ -65,7 +65,7 @@ WIDTH="100%"></DIV ><DIV CLASS="REFNAMEDIV" ><A -NAME="AEN2972" +NAME="AEN3432" ></A ><H2 >Name</H2 @@ -73,7 +73,7 @@ NAME="AEN2972" ><DIV CLASS="REFSYNOPSISDIV" ><A -NAME="AEN2975" +NAME="AEN3435" ></A ><H2 >Synopsis</H2 @@ -252,6 +252,10 @@ void <A HREF="gnome-xml-entities.html#XMLDUMPENTITIESTABLE" >xmlDumpEntitiesTable</A > (<A +HREF="gnome-xml-tree.html#XMLBUFFERPTR" +>xmlBufferPtr</A +> buf, + <A HREF="gnome-xml-entities.html#XMLENTITIESTABLEPTR" >xmlEntitiesTablePtr</A > table); @@ -276,7 +280,7 @@ HREF="gnome-xml-entities.html#XMLENTITYPTR" ><DIV CLASS="REFSECT1" ><A -NAME="AEN3027" +NAME="AEN3488" ></A ><H2 >Description</H2 @@ -286,14 +290,14 @@ NAME="AEN3027" ><DIV CLASS="REFSECT1" ><A -NAME="AEN3030" +NAME="AEN3491" ></A ><H2 >Details</H2 ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3032" +NAME="AEN3493" ></A ><H3 ><A @@ -319,7 +323,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3037" +NAME="AEN3498" ></A ><H3 ><A @@ -345,7 +349,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3042" +NAME="AEN3503" ></A ><H3 ><A @@ -371,7 +375,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3047" +NAME="AEN3508" ></A ><H3 ><A @@ -397,7 +401,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3052" +NAME="AEN3513" ></A ><H3 ><A @@ -423,7 +427,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3057" +NAME="AEN3518" ></A ><H3 ><A @@ -449,7 +453,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3062" +NAME="AEN3523" ></A ><H3 ><A @@ -475,7 +479,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3067" +NAME="AEN3528" ></A ><H3 ><A @@ -501,7 +505,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3072" +NAME="AEN3533" ></A ><H3 ><A @@ -527,7 +531,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3077" +NAME="AEN3538" ></A ><H3 ><A @@ -692,7 +696,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3117" +NAME="AEN3578" ></A ><H3 ><A @@ -857,7 +861,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3157" +NAME="AEN3618" ></A ><H3 ><A @@ -938,7 +942,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3178" +NAME="AEN3639" ></A ><H3 ><A @@ -1042,7 +1046,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3204" +NAME="AEN3665" ></A ><H3 ><A @@ -1145,7 +1149,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3230" +NAME="AEN3691" ></A ><H3 ><A @@ -1254,7 +1258,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3258" +NAME="AEN3719" ></A ><H3 ><A @@ -1315,7 +1319,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3274" +NAME="AEN3735" ></A ><H3 ><A @@ -1396,7 +1400,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3295" +NAME="AEN3756" ></A ><H3 ><A @@ -1459,7 +1463,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3311" +NAME="AEN3772" ></A ><H3 ><A @@ -1476,6 +1480,10 @@ CELLPADDING="6" ><PRE CLASS="PROGRAMLISTING" >void xmlDumpEntitiesTable (<A +HREF="gnome-xml-tree.html#XMLBUFFERPTR" +>xmlBufferPtr</A +> buf, + <A HREF="gnome-xml-entities.html#XMLENTITIESTABLEPTR" >xmlEntitiesTablePtr</A > table);</PRE @@ -1485,9 +1493,6 @@ HREF="gnome-xml-entities.html#XMLENTITIESTABLEPTR" ><P >This will dump the content of the entity table as an XML DTD definition</P ><P ->NOTE: TODO an extra parameter allowing a reentant implementation will -be added.</P -><P ></P ><DIV CLASS="INFORMALTABLE" @@ -1508,6 +1513,23 @@ VALIGN="TOP" ><TT CLASS="PARAMETER" ><I +>buf</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> An XML buffer.</TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I >table</I ></TT > :</TD @@ -1525,7 +1547,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3328" +NAME="AEN3793" ></A ><H3 ><A diff --git a/doc/html/gnome-xml-parser.html b/doc/html/gnome-xml-parser.html index cbe2aac3..4497c3b9 100644 --- a/doc/html/gnome-xml-parser.html +++ b/doc/html/gnome-xml-parser.html @@ -150,6 +150,63 @@ HREF="gnome-xml-tree.html#CHAR" >CHAR</A > *systemId); void (<A +HREF="gnome-xml-parser.html#INTERNALSUBSETSAXFUNC" +>*internalSubsetSAXFunc</A +>) (<A +HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" +>xmlParserCtxtPtr</A +> ctxt, + const <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> *name, + const <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> *ExternalID, + const <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> *SystemID); +<A +HREF="gnome-xml-entities.html#XMLENTITYPTR" +>xmlEntityPtr</A +> (<A +HREF="gnome-xml-parser.html#GETENTITYSAXFUNC" +>*getEntitySAXFunc</A +>) (<A +HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" +>xmlParserCtxtPtr</A +> ctxt, + const <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> *name); +void (<A +HREF="gnome-xml-parser.html#ENTITYDECLSAXFUNC" +>*entityDeclSAXFunc</A +>) (<A +HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" +>xmlParserCtxtPtr</A +> ctxt, + const <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> *name, + int type, + const <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> *publicId, + const <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> *systemId, + <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> *content); +void (<A HREF="gnome-xml-parser.html#NOTATIONDECLSAXFUNC" >*notationDeclSAXFunc</A >) (<A @@ -169,6 +226,47 @@ HREF="gnome-xml-tree.html#CHAR" >CHAR</A > *systemId); void (<A +HREF="gnome-xml-parser.html#ATTRIBUTEDECLSAXFUNC" +>*attributeDeclSAXFunc</A +>) (<A +HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" +>xmlParserCtxtPtr</A +> ctxt, + const <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> *elem, + const <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> *name, + int type, + int def, + const <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> *defaultValue, + <A +HREF="gnome-xml-tree.html#XMLENUMERATIONPTR" +>xmlEnumerationPtr</A +> tree); +void (<A +HREF="gnome-xml-parser.html#ELEMENTDECLSAXFUNC" +>*elementDeclSAXFunc</A +>) (<A +HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" +>xmlParserCtxtPtr</A +> ctxt, + const <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> *name, + int type, + <A +HREF="gnome-xml-tree.html#XMLELEMENTCONTENTPTR" +>xmlElementContentPtr</A +> content); +void (<A HREF="gnome-xml-parser.html#UNPARSEDENTITYDECLSAXFUNC" >*unparsedEntityDeclSAXFunc</A >) (<A @@ -226,7 +324,11 @@ HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" const <A HREF="gnome-xml-tree.html#CHAR" >CHAR</A -> *name); +> *name, + const <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> **atts); void (<A HREF="gnome-xml-parser.html#ENDELEMENTSAXFUNC" >*endElementSAXFunc</A @@ -254,6 +356,17 @@ HREF="gnome-xml-tree.html#CHAR" >CHAR</A > *value); void (<A +HREF="gnome-xml-parser.html#REFERENCESAXFUNC" +>*referenceSAXFunc</A +>) (<A +HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" +>xmlParserCtxtPtr</A +> ctxt, + const <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> *name); +void (<A HREF="gnome-xml-parser.html#CHARACTERSSAXFUNC" >*charactersSAXFunc</A >) (<A @@ -264,7 +377,6 @@ HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" HREF="gnome-xml-tree.html#CHAR" >CHAR</A > *ch, - int start, int len); void (<A HREF="gnome-xml-parser.html#IGNORABLEWHITESPACESAXFUNC" @@ -277,7 +389,6 @@ HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" HREF="gnome-xml-tree.html#CHAR" >CHAR</A > *ch, - int start, int len); void (<A HREF="gnome-xml-parser.html#PROCESSINGINSTRUCTIONSAXFUNC" @@ -295,6 +406,17 @@ HREF="gnome-xml-tree.html#CHAR" >CHAR</A > *data); void (<A +HREF="gnome-xml-parser.html#COMMENTSAXFUNC" +>*commentSAXFunc</A +>) (<A +HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" +>xmlParserCtxtPtr</A +> ctxt, + const <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> *value); +void (<A HREF="gnome-xml-parser.html#WARNINGSAXFUNC" >*warningSAXFunc</A >) (<A @@ -321,6 +443,27 @@ HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" > ctxt, const char *msg, ...); +int (<A +HREF="gnome-xml-parser.html#ISSTANDALONESAXFUNC" +>*isStandaloneSAXFunc</A +>) (<A +HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" +>xmlParserCtxtPtr</A +> ctxt); +int (<A +HREF="gnome-xml-parser.html#HASINTERNALSUBSETSAXFUNC" +>*hasInternalSubsetSAXFunc</A +>) (<A +HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" +>xmlParserCtxtPtr</A +> ctxt); +int (<A +HREF="gnome-xml-parser.html#HASEXTERNALSUBSETSAXFUNC" +>*hasExternalSubsetSAXFunc</A +>) (<A +HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" +>xmlParserCtxtPtr</A +> ctxt); typedef <A HREF="gnome-xml-parser.html#XMLSAXHANDLERPTR" >xmlSAXHandlerPtr</A @@ -607,7 +750,7 @@ HREF="gnome-xml-parser.html#XMLDEFAULTSAXHANDLERINIT" ><DIV CLASS="REFSECT1" ><A -NAME="AEN153" +NAME="AEN191" ></A ><H2 >Description</H2 @@ -617,14 +760,14 @@ NAME="AEN153" ><DIV CLASS="REFSECT1" ><A -NAME="AEN156" +NAME="AEN194" ></A ><H2 >Details</H2 ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN158" +NAME="AEN196" ></A ><H3 ><A @@ -650,7 +793,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN163" +NAME="AEN201" ></A ><H3 ><A @@ -711,7 +854,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN178" +NAME="AEN216" ></A ><H3 ><A @@ -737,7 +880,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN183" +NAME="AEN221" ></A ><H3 ><A @@ -763,7 +906,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN188" +NAME="AEN226" ></A ><H3 ><A @@ -789,7 +932,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN193" +NAME="AEN231" ></A ><H3 ><A @@ -815,7 +958,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN198" +NAME="AEN236" ></A ><H3 ><A @@ -841,7 +984,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN203" +NAME="AEN241" ></A ><H3 ><A @@ -867,7 +1010,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN208" +NAME="AEN246" ></A ><H3 ><A @@ -893,7 +1036,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN213" +NAME="AEN251" ></A ><H3 ><A @@ -919,7 +1062,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN218" +NAME="AEN256" ></A ><H3 ><A @@ -1040,7 +1183,394 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN248" +NAME="AEN286" +></A +><H3 +><A +NAME="INTERNALSUBSETSAXFUNC" +></A +>internalSubsetSAXFunc()</H3 +><TABLE +BORDER="0" +BGCOLOR="#E8E8F8" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +>void (*internalSubsetSAXFunc) (<A +HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" +>xmlParserCtxtPtr</A +> ctxt, + const <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> *name, + const <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> *ExternalID, + const <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> *SystemID);</PRE +></TD +></TR +></TABLE +><P +></P +><DIV +CLASS="INFORMALTABLE" +><P +></P +><TABLE +BORDER="0" +WIDTH="100%" +BGCOLOR="#FFE0E0" +CELLSPACING="0" +CELLPADDING="4" +CLASS="CALSTABLE" +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>ctxt</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>name</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>ExternalID</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>SystemID</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +></TABLE +><P +></P +></DIV +></DIV +><HR><DIV +CLASS="REFSECT2" +><A +NAME="AEN316" +></A +><H3 +><A +NAME="GETENTITYSAXFUNC" +></A +>getEntitySAXFunc()</H3 +><TABLE +BORDER="0" +BGCOLOR="#E8E8F8" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +><A +HREF="gnome-xml-entities.html#XMLENTITYPTR" +>xmlEntityPtr</A +> (*getEntitySAXFunc) (<A +HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" +>xmlParserCtxtPtr</A +> ctxt, + const <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> *name);</PRE +></TD +></TR +></TABLE +><P +></P +><DIV +CLASS="INFORMALTABLE" +><P +></P +><TABLE +BORDER="0" +WIDTH="100%" +BGCOLOR="#FFE0E0" +CELLSPACING="0" +CELLPADDING="4" +CLASS="CALSTABLE" +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>ctxt</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>name</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><I +CLASS="EMPHASIS" +>Returns</I +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +></TABLE +><P +></P +></DIV +></DIV +><HR><DIV +CLASS="REFSECT2" +><A +NAME="AEN341" +></A +><H3 +><A +NAME="ENTITYDECLSAXFUNC" +></A +>entityDeclSAXFunc()</H3 +><TABLE +BORDER="0" +BGCOLOR="#E8E8F8" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +>void (*entityDeclSAXFunc) (<A +HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" +>xmlParserCtxtPtr</A +> ctxt, + const <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> *name, + int type, + const <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> *publicId, + const <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> *systemId, + <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> *content);</PRE +></TD +></TR +></TABLE +><P +></P +><DIV +CLASS="INFORMALTABLE" +><P +></P +><TABLE +BORDER="0" +WIDTH="100%" +BGCOLOR="#FFE0E0" +CELLSPACING="0" +CELLPADDING="4" +CLASS="CALSTABLE" +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>ctxt</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>name</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>type</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>publicId</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>systemId</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>content</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +></TABLE +><P +></P +></DIV +></DIV +><HR><DIV +CLASS="REFSECT2" +><A +NAME="AEN380" ></A ><H3 ><A @@ -1164,7 +1694,309 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN278" +NAME="AEN410" +></A +><H3 +><A +NAME="ATTRIBUTEDECLSAXFUNC" +></A +>attributeDeclSAXFunc()</H3 +><TABLE +BORDER="0" +BGCOLOR="#E8E8F8" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +>void (*attributeDeclSAXFunc) (<A +HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" +>xmlParserCtxtPtr</A +> ctxt, + const <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> *elem, + const <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> *name, + int type, + int def, + const <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> *defaultValue, + <A +HREF="gnome-xml-tree.html#XMLENUMERATIONPTR" +>xmlEnumerationPtr</A +> tree);</PRE +></TD +></TR +></TABLE +><P +></P +><DIV +CLASS="INFORMALTABLE" +><P +></P +><TABLE +BORDER="0" +WIDTH="100%" +BGCOLOR="#FFE0E0" +CELLSPACING="0" +CELLPADDING="4" +CLASS="CALSTABLE" +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>ctxt</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>elem</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>name</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>type</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>def</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>defaultValue</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>tree</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +></TABLE +><P +></P +></DIV +></DIV +><HR><DIV +CLASS="REFSECT2" +><A +NAME="AEN453" +></A +><H3 +><A +NAME="ELEMENTDECLSAXFUNC" +></A +>elementDeclSAXFunc()</H3 +><TABLE +BORDER="0" +BGCOLOR="#E8E8F8" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +>void (*elementDeclSAXFunc) (<A +HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" +>xmlParserCtxtPtr</A +> ctxt, + const <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> *name, + int type, + <A +HREF="gnome-xml-tree.html#XMLELEMENTCONTENTPTR" +>xmlElementContentPtr</A +> content);</PRE +></TD +></TR +></TABLE +><P +></P +><DIV +CLASS="INFORMALTABLE" +><P +></P +><TABLE +BORDER="0" +WIDTH="100%" +BGCOLOR="#FFE0E0" +CELLSPACING="0" +CELLPADDING="4" +CLASS="CALSTABLE" +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>ctxt</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>name</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>type</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>content</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +></TABLE +><P +></P +></DIV +></DIV +><HR><DIV +CLASS="REFSECT2" +><A +NAME="AEN482" ></A ><H3 ><A @@ -1309,7 +2141,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN313" +NAME="AEN517" ></A ><H3 ><A @@ -1391,7 +2223,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN333" +NAME="AEN537" ></A ><H3 ><A @@ -1452,7 +2284,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN348" +NAME="AEN552" ></A ><H3 ><A @@ -1513,7 +2345,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN363" +NAME="AEN567" ></A ><H3 ><A @@ -1536,7 +2368,11 @@ HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" const <A HREF="gnome-xml-tree.html#CHAR" >CHAR</A -> *name);</PRE +> *name, + const <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> **atts);</PRE ></TD ></TR ></TABLE @@ -1587,6 +2423,23 @@ ALIGN="LEFT" VALIGN="TOP" > </TD ></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>atts</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR ></TABLE ><P ></P @@ -1595,7 +2448,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN383" +NAME="AEN592" ></A ><H3 ><A @@ -1677,7 +2530,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN403" +NAME="AEN612" ></A ><H3 ><A @@ -1780,13 +2633,13 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN428" +NAME="AEN637" ></A ><H3 ><A -NAME="CHARACTERSSAXFUNC" +NAME="REFERENCESAXFUNC" ></A ->charactersSAXFunc()</H3 +>referenceSAXFunc()</H3 ><TABLE BORDER="0" BGCOLOR="#E8E8F8" @@ -1796,16 +2649,14 @@ CELLPADDING="6" ><TD ><PRE CLASS="PROGRAMLISTING" ->void (*charactersSAXFunc) (<A +>void (*referenceSAXFunc) (<A HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" >xmlParserCtxtPtr</A > ctxt, const <A HREF="gnome-xml-tree.html#CHAR" >CHAR</A -> *ch, - int start, - int len);</PRE +> *name);</PRE ></TD ></TR ></TABLE @@ -1847,7 +2698,73 @@ VALIGN="TOP" ><TT CLASS="PARAMETER" ><I ->ch</I +>name</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +></TABLE +><P +></P +></DIV +></DIV +><HR><DIV +CLASS="REFSECT2" +><A +NAME="AEN657" +></A +><H3 +><A +NAME="CHARACTERSSAXFUNC" +></A +>charactersSAXFunc()</H3 +><TABLE +BORDER="0" +BGCOLOR="#E8E8F8" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +>void (*charactersSAXFunc) (<A +HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" +>xmlParserCtxtPtr</A +> ctxt, + const <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> *ch, + int len);</PRE +></TD +></TR +></TABLE +><P +></P +><DIV +CLASS="INFORMALTABLE" +><P +></P +><TABLE +BORDER="0" +WIDTH="100%" +BGCOLOR="#FFE0E0" +CELLSPACING="0" +CELLPADDING="4" +CLASS="CALSTABLE" +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>ctxt</I ></TT > :</TD ><TD @@ -1864,7 +2781,7 @@ VALIGN="TOP" ><TT CLASS="PARAMETER" ><I ->start</I +>ch</I ></TT > :</TD ><TD @@ -1898,7 +2815,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN456" +NAME="AEN681" ></A ><H3 ><A @@ -1922,7 +2839,6 @@ HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" HREF="gnome-xml-tree.html#CHAR" >CHAR</A > *ch, - int start, int len);</PRE ></TD ></TR @@ -1982,23 +2898,6 @@ VALIGN="TOP" ><TT CLASS="PARAMETER" ><I ->start</I -></TT -> :</TD -><TD -WIDTH="80%" -ALIGN="LEFT" -VALIGN="TOP" -> </TD -></TR -><TR -><TD -WIDTH="20%" -ALIGN="RIGHT" -VALIGN="TOP" -><TT -CLASS="PARAMETER" -><I >len</I ></TT > :</TD @@ -2016,7 +2915,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN484" +NAME="AEN705" ></A ><H3 ><A @@ -2119,7 +3018,89 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN509" +NAME="AEN730" +></A +><H3 +><A +NAME="COMMENTSAXFUNC" +></A +>commentSAXFunc()</H3 +><TABLE +BORDER="0" +BGCOLOR="#E8E8F8" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +>void (*commentSAXFunc) (<A +HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" +>xmlParserCtxtPtr</A +> ctxt, + const <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> *value);</PRE +></TD +></TR +></TABLE +><P +></P +><DIV +CLASS="INFORMALTABLE" +><P +></P +><TABLE +BORDER="0" +WIDTH="100%" +BGCOLOR="#FFE0E0" +CELLSPACING="0" +CELLPADDING="4" +CLASS="CALSTABLE" +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>ctxt</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>value</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +></TABLE +><P +></P +></DIV +></DIV +><HR><DIV +CLASS="REFSECT2" +><A +NAME="AEN750" ></A ><H3 ><A @@ -2216,7 +3197,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN532" +NAME="AEN773" ></A ><H3 ><A @@ -2313,7 +3294,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN555" +NAME="AEN796" ></A ><H3 ><A @@ -2410,7 +3391,235 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN578" +NAME="AEN819" +></A +><H3 +><A +NAME="ISSTANDALONESAXFUNC" +></A +>isStandaloneSAXFunc()</H3 +><TABLE +BORDER="0" +BGCOLOR="#E8E8F8" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +>int (*isStandaloneSAXFunc) (<A +HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" +>xmlParserCtxtPtr</A +> ctxt);</PRE +></TD +></TR +></TABLE +><P +></P +><DIV +CLASS="INFORMALTABLE" +><P +></P +><TABLE +BORDER="0" +WIDTH="100%" +BGCOLOR="#FFE0E0" +CELLSPACING="0" +CELLPADDING="4" +CLASS="CALSTABLE" +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>ctxt</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><I +CLASS="EMPHASIS" +>Returns</I +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +></TABLE +><P +></P +></DIV +></DIV +><HR><DIV +CLASS="REFSECT2" +><A +NAME="AEN838" +></A +><H3 +><A +NAME="HASINTERNALSUBSETSAXFUNC" +></A +>hasInternalSubsetSAXFunc()</H3 +><TABLE +BORDER="0" +BGCOLOR="#E8E8F8" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +>int (*hasInternalSubsetSAXFunc) (<A +HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" +>xmlParserCtxtPtr</A +> ctxt);</PRE +></TD +></TR +></TABLE +><P +></P +><DIV +CLASS="INFORMALTABLE" +><P +></P +><TABLE +BORDER="0" +WIDTH="100%" +BGCOLOR="#FFE0E0" +CELLSPACING="0" +CELLPADDING="4" +CLASS="CALSTABLE" +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>ctxt</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><I +CLASS="EMPHASIS" +>Returns</I +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +></TABLE +><P +></P +></DIV +></DIV +><HR><DIV +CLASS="REFSECT2" +><A +NAME="AEN857" +></A +><H3 +><A +NAME="HASEXTERNALSUBSETSAXFUNC" +></A +>hasExternalSubsetSAXFunc()</H3 +><TABLE +BORDER="0" +BGCOLOR="#E8E8F8" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +>int (*hasExternalSubsetSAXFunc) (<A +HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" +>xmlParserCtxtPtr</A +> ctxt);</PRE +></TD +></TR +></TABLE +><P +></P +><DIV +CLASS="INFORMALTABLE" +><P +></P +><TABLE +BORDER="0" +WIDTH="100%" +BGCOLOR="#FFE0E0" +CELLSPACING="0" +CELLPADDING="4" +CLASS="CALSTABLE" +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>ctxt</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><I +CLASS="EMPHASIS" +>Returns</I +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +></TABLE +><P +></P +></DIV +></DIV +><HR><DIV +CLASS="REFSECT2" +><A +NAME="AEN876" ></A ><H3 ><A @@ -2436,7 +3645,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN583" +NAME="AEN881" ></A ><H3 ><A @@ -2517,7 +3726,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN604" +NAME="AEN902" ></A ><H3 ><A @@ -2621,7 +3830,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN630" +NAME="AEN928" ></A ><H3 ><A @@ -2723,7 +3932,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN656" +NAME="AEN954" ></A ><H3 ><A @@ -2822,7 +4031,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN681" +NAME="AEN979" ></A ><H3 ><A @@ -2939,7 +4148,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN710" +NAME="AEN1008" ></A ><H3 ><A @@ -3017,7 +4226,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN730" +NAME="AEN1028" ></A ><H3 ><A @@ -3119,7 +4328,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN756" +NAME="AEN1054" ></A ><H3 ><A @@ -3244,7 +4453,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN787" +NAME="AEN1085" ></A ><H3 ><A @@ -3325,7 +4534,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN808" +NAME="AEN1106" ></A ><H3 ><A @@ -3421,7 +4630,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN832" +NAME="AEN1130" ></A ><H3 ><A @@ -3500,7 +4709,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN852" +NAME="AEN1150" ></A ><H3 ><A @@ -3582,7 +4791,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN873" +NAME="AEN1171" ></A ><H3 ><A @@ -3679,7 +4888,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN897" +NAME="AEN1195" ></A ><H3 ><A @@ -3759,7 +4968,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN917" +NAME="AEN1215" ></A ><H3 ><A @@ -3843,7 +5052,7 @@ as a result of the parsing.</TD ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN939" +NAME="AEN1237" ></A ><H3 ><A @@ -3966,7 +5175,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN969" +NAME="AEN1267" ></A ><H3 ><A @@ -4106,7 +5315,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1003" +NAME="AEN1301" ></A ><H3 ><A @@ -4227,7 +5436,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1032" +NAME="AEN1330" ></A ><H3 ><A @@ -4290,7 +5499,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1048" +NAME="AEN1346" ></A ><H3 ><A @@ -4353,7 +5562,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1064" +NAME="AEN1362" ></A ><H3 ><A @@ -4457,7 +5666,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1089" +NAME="AEN1387" ></A ><H3 ><A @@ -4560,7 +5769,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1115" +NAME="AEN1413" ></A ><H3 ><A @@ -4623,7 +5832,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1131" +NAME="AEN1429" ></A ><H3 ><A @@ -4687,7 +5896,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1147" +NAME="AEN1445" ></A ><H3 ><A @@ -4790,7 +5999,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1173" +NAME="AEN1471" ></A ><H3 ><A @@ -4874,7 +6083,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1194" +NAME="AEN1492" ></A ><H3 ><A diff --git a/doc/html/gnome-xml-parserinternals.html b/doc/html/gnome-xml-parserinternals.html index bda17491..75e342eb 100644 --- a/doc/html/gnome-xml-parserinternals.html +++ b/doc/html/gnome-xml-parserinternals.html @@ -59,7 +59,7 @@ WIDTH="100%"></DIV ><DIV CLASS="REFNAMEDIV" ><A -NAME="AEN3936" +NAME="AEN4419" ></A ><H2 >Name</H2 @@ -67,7 +67,7 @@ NAME="AEN3936" ><DIV CLASS="REFSYNOPSISDIV" ><A -NAME="AEN3939" +NAME="AEN4422" ></A ><H2 >Synopsis</H2 @@ -82,6 +82,54 @@ CELLPADDING="6" CLASS="SYNOPSIS" > +#define <A +HREF="gnome-xml-parserinternals.html#IS-CHAR" +>IS_CHAR</A +> (c) +#define <A +HREF="gnome-xml-parserinternals.html#IS-BLANK" +>IS_BLANK</A +> (c) +#define <A +HREF="gnome-xml-parserinternals.html#IS-BASECHAR" +>IS_BASECHAR</A +> (c) +#define <A +HREF="gnome-xml-parserinternals.html#IS-DIGIT" +>IS_DIGIT</A +> (c) +#define <A +HREF="gnome-xml-parserinternals.html#IS-COMBINING" +>IS_COMBINING</A +> (c) +#define <A +HREF="gnome-xml-parserinternals.html#IS-EXTENDER" +>IS_EXTENDER</A +> (c) +#define <A +HREF="gnome-xml-parserinternals.html#IS-IDEOGRAPHIC" +>IS_IDEOGRAPHIC</A +> (c) +#define <A +HREF="gnome-xml-parserinternals.html#IS-LETTER" +>IS_LETTER</A +> (c) +#define <A +HREF="gnome-xml-parserinternals.html#IS-PUBIDCHAR" +>IS_PUBIDCHAR</A +> (c) +#define <A +HREF="gnome-xml-parserinternals.html#SKIP-EOL" +>SKIP_EOL</A +> (p) +#define <A +HREF="gnome-xml-parserinternals.html#MOVETO-ENDTAG" +>MOVETO_ENDTAG</A +> (p) +#define <A +HREF="gnome-xml-parserinternals.html#MOVETO-STARTTAG" +>MOVETO_STARTTAG</A +> (p) <A HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" >xmlParserCtxtPtr</A @@ -171,6 +219,20 @@ HREF="gnome-xml-parser.html#XMLPARSERINPUTPTR" HREF="gnome-xml-tree.html#CHAR" >CHAR</A >* <A +HREF="gnome-xml-parserinternals.html#XMLSPLITQNAME" +>xmlSplitQName</A +> (const <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> *name, + <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> **prefix); +<A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +>* <A HREF="gnome-xml-parserinternals.html#XMLNAMESPACEPARSENCNAME" >xmlNamespaceParseNCName</A > (<A @@ -301,10 +363,7 @@ HREF="gnome-xml-tree.html#CHAR" >CHAR</A > **publicID, int strict); -<A -HREF="gnome-xml-tree.html#XMLNODEPTR" ->xmlNodePtr</A -> <A +void <A HREF="gnome-xml-parserinternals.html#XMLPARSECOMMENT" >xmlParseComment</A > (<A @@ -502,9 +561,9 @@ HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" >xmlParserCtxtPtr</A > ctxt); <A -HREF="gnome-xml-tree.html#XMLATTRPTR" ->xmlAttrPtr</A -> <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +>* <A HREF="gnome-xml-parserinternals.html#XMLPARSEATTRIBUTE" >xmlParseAttribute</A > (<A @@ -512,13 +571,10 @@ HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" >xmlParserCtxtPtr</A > ctxt, <A -HREF="gnome-xml-tree.html#XMLNODEPTR" ->xmlNodePtr</A -> node); -<A -HREF="gnome-xml-tree.html#XMLNODEPTR" ->xmlNodePtr</A -> <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> **value); +void <A HREF="gnome-xml-parserinternals.html#XMLPARSESTARTTAG" >xmlParseStartTag</A > (<A @@ -531,15 +587,7 @@ HREF="gnome-xml-parserinternals.html#XMLPARSEENDTAG" > (<A HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" >xmlParserCtxtPtr</A -> ctxt, - <A -HREF="gnome-xml-tree.html#XMLNSPTR" ->xmlNsPtr</A -> *nsPtr, - <A -HREF="gnome-xml-tree.html#CHAR" ->CHAR</A -> **tagPtr); +> ctxt); void <A HREF="gnome-xml-parserinternals.html#XMLPARSECDSECT" >xmlParseCDSect</A @@ -554,10 +602,7 @@ HREF="gnome-xml-parserinternals.html#XMLPARSECONTENT" HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" >xmlParserCtxtPtr</A > ctxt); -<A -HREF="gnome-xml-tree.html#XMLNODEPTR" ->xmlNodePtr</A -> <A +void <A HREF="gnome-xml-parserinternals.html#XMLPARSEELEMENT" >xmlParseElement</A > (<A @@ -632,7 +677,7 @@ HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" ><DIV CLASS="REFSECT1" ><A -NAME="AEN4098" +NAME="AEN4592" ></A ><H2 >Description</H2 @@ -642,14 +687,727 @@ NAME="AEN4098" ><DIV CLASS="REFSECT1" ><A -NAME="AEN4101" +NAME="AEN4595" ></A ><H2 >Details</H2 ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4103" +NAME="AEN4597" +></A +><H3 +><A +NAME="IS-CHAR" +></A +>IS_CHAR()</H3 +><TABLE +BORDER="0" +BGCOLOR="#E8E8F8" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +>#define IS_CHAR(c)</PRE +></TD +></TR +></TABLE +><P +></P +><DIV +CLASS="INFORMALTABLE" +><P +></P +><TABLE +BORDER="0" +WIDTH="100%" +BGCOLOR="#FFE0E0" +CELLSPACING="0" +CELLPADDING="4" +CLASS="CALSTABLE" +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>c</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +></TABLE +><P +></P +></DIV +></DIV +><HR><DIV +CLASS="REFSECT2" +><A +NAME="AEN4611" +></A +><H3 +><A +NAME="IS-BLANK" +></A +>IS_BLANK()</H3 +><TABLE +BORDER="0" +BGCOLOR="#E8E8F8" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +>#define IS_BLANK(c)</PRE +></TD +></TR +></TABLE +><P +></P +><DIV +CLASS="INFORMALTABLE" +><P +></P +><TABLE +BORDER="0" +WIDTH="100%" +BGCOLOR="#FFE0E0" +CELLSPACING="0" +CELLPADDING="4" +CLASS="CALSTABLE" +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>c</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +></TABLE +><P +></P +></DIV +></DIV +><HR><DIV +CLASS="REFSECT2" +><A +NAME="AEN4625" +></A +><H3 +><A +NAME="IS-BASECHAR" +></A +>IS_BASECHAR()</H3 +><TABLE +BORDER="0" +BGCOLOR="#E8E8F8" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +>#define IS_BASECHAR(c)</PRE +></TD +></TR +></TABLE +><P +></P +><DIV +CLASS="INFORMALTABLE" +><P +></P +><TABLE +BORDER="0" +WIDTH="100%" +BGCOLOR="#FFE0E0" +CELLSPACING="0" +CELLPADDING="4" +CLASS="CALSTABLE" +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>c</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +></TABLE +><P +></P +></DIV +></DIV +><HR><DIV +CLASS="REFSECT2" +><A +NAME="AEN4639" +></A +><H3 +><A +NAME="IS-DIGIT" +></A +>IS_DIGIT()</H3 +><TABLE +BORDER="0" +BGCOLOR="#E8E8F8" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +>#define IS_DIGIT(c)</PRE +></TD +></TR +></TABLE +><P +></P +><DIV +CLASS="INFORMALTABLE" +><P +></P +><TABLE +BORDER="0" +WIDTH="100%" +BGCOLOR="#FFE0E0" +CELLSPACING="0" +CELLPADDING="4" +CLASS="CALSTABLE" +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>c</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +></TABLE +><P +></P +></DIV +></DIV +><HR><DIV +CLASS="REFSECT2" +><A +NAME="AEN4653" +></A +><H3 +><A +NAME="IS-COMBINING" +></A +>IS_COMBINING()</H3 +><TABLE +BORDER="0" +BGCOLOR="#E8E8F8" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +>#define IS_COMBINING(c)</PRE +></TD +></TR +></TABLE +><P +></P +><DIV +CLASS="INFORMALTABLE" +><P +></P +><TABLE +BORDER="0" +WIDTH="100%" +BGCOLOR="#FFE0E0" +CELLSPACING="0" +CELLPADDING="4" +CLASS="CALSTABLE" +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>c</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +></TABLE +><P +></P +></DIV +></DIV +><HR><DIV +CLASS="REFSECT2" +><A +NAME="AEN4667" +></A +><H3 +><A +NAME="IS-EXTENDER" +></A +>IS_EXTENDER()</H3 +><TABLE +BORDER="0" +BGCOLOR="#E8E8F8" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +>#define IS_EXTENDER(c)</PRE +></TD +></TR +></TABLE +><P +></P +><DIV +CLASS="INFORMALTABLE" +><P +></P +><TABLE +BORDER="0" +WIDTH="100%" +BGCOLOR="#FFE0E0" +CELLSPACING="0" +CELLPADDING="4" +CLASS="CALSTABLE" +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>c</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +></TABLE +><P +></P +></DIV +></DIV +><HR><DIV +CLASS="REFSECT2" +><A +NAME="AEN4681" +></A +><H3 +><A +NAME="IS-IDEOGRAPHIC" +></A +>IS_IDEOGRAPHIC()</H3 +><TABLE +BORDER="0" +BGCOLOR="#E8E8F8" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +>#define IS_IDEOGRAPHIC(c) \ + ((((c) >= 0x4e00) && ((c) <= 0x9fa5)) || \ + (((c) >= 0xf900) && ((c) <= 0xfa2d)) || \ + (((c) >= 0x3021) && ((c) <= 0x3029)) || \ + ((c) == 0x3007))</PRE +></TD +></TR +></TABLE +><P +></P +><DIV +CLASS="INFORMALTABLE" +><P +></P +><TABLE +BORDER="0" +WIDTH="100%" +BGCOLOR="#FFE0E0" +CELLSPACING="0" +CELLPADDING="4" +CLASS="CALSTABLE" +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>c</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +></TABLE +><P +></P +></DIV +></DIV +><HR><DIV +CLASS="REFSECT2" +><A +NAME="AEN4695" +></A +><H3 +><A +NAME="IS-LETTER" +></A +>IS_LETTER()</H3 +><TABLE +BORDER="0" +BGCOLOR="#E8E8F8" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +>#define IS_LETTER(c)</PRE +></TD +></TR +></TABLE +><P +></P +><DIV +CLASS="INFORMALTABLE" +><P +></P +><TABLE +BORDER="0" +WIDTH="100%" +BGCOLOR="#FFE0E0" +CELLSPACING="0" +CELLPADDING="4" +CLASS="CALSTABLE" +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>c</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +></TABLE +><P +></P +></DIV +></DIV +><HR><DIV +CLASS="REFSECT2" +><A +NAME="AEN4709" +></A +><H3 +><A +NAME="IS-PUBIDCHAR" +></A +>IS_PUBIDCHAR()</H3 +><TABLE +BORDER="0" +BGCOLOR="#E8E8F8" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +>#define IS_PUBIDCHAR(c) \ + (((c) == 0x20) || ((c) == 0x0D) || ((c) == 0x0A) || \ + (((c) >= 'a') && ((c) <= 'z')) || \ + (((c) >= 'A') && ((c) <= 'Z')) || \ + (((c) >= '0') && ((c) <= '9')) || \ + ((c) == '-') || ((c) == '\'') || ((c) == '(') || ((c) == ')') || \ + ((c) == '+') || ((c) == ',') || ((c) == '.') || ((c) == '/') || \ + ((c) == ':') || ((c) == '=') || ((c) == '?') || ((c) == ';') || \ + ((c) == '!') || ((c) == '*') || ((c) == '#') || ((c) == '@') || \ + ((c) == '$') || ((c) == '_') || ((c) == '%'))</PRE +></TD +></TR +></TABLE +><P +></P +><DIV +CLASS="INFORMALTABLE" +><P +></P +><TABLE +BORDER="0" +WIDTH="100%" +BGCOLOR="#FFE0E0" +CELLSPACING="0" +CELLPADDING="4" +CLASS="CALSTABLE" +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>c</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +></TABLE +><P +></P +></DIV +></DIV +><HR><DIV +CLASS="REFSECT2" +><A +NAME="AEN4723" +></A +><H3 +><A +NAME="SKIP-EOL" +></A +>SKIP_EOL()</H3 +><TABLE +BORDER="0" +BGCOLOR="#E8E8F8" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +>#define SKIP_EOL(p) \ + if (*(p) == 0x13) { p++ ; if (*(p) == 0x10) p++; } \ + if (*(p) == 0x10) { p++ ; if (*(p) == 0x13) p++; }</PRE +></TD +></TR +></TABLE +><P +></P +><DIV +CLASS="INFORMALTABLE" +><P +></P +><TABLE +BORDER="0" +WIDTH="100%" +BGCOLOR="#FFE0E0" +CELLSPACING="0" +CELLPADDING="4" +CLASS="CALSTABLE" +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>p</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +></TABLE +><P +></P +></DIV +></DIV +><HR><DIV +CLASS="REFSECT2" +><A +NAME="AEN4737" +></A +><H3 +><A +NAME="MOVETO-ENDTAG" +></A +>MOVETO_ENDTAG()</H3 +><TABLE +BORDER="0" +BGCOLOR="#E8E8F8" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +>#define MOVETO_ENDTAG(p) \ + while (IS_CHAR(*p) && (*(p) != '>')) (p)++</PRE +></TD +></TR +></TABLE +><P +></P +><DIV +CLASS="INFORMALTABLE" +><P +></P +><TABLE +BORDER="0" +WIDTH="100%" +BGCOLOR="#FFE0E0" +CELLSPACING="0" +CELLPADDING="4" +CLASS="CALSTABLE" +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>p</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +></TABLE +><P +></P +></DIV +></DIV +><HR><DIV +CLASS="REFSECT2" +><A +NAME="AEN4751" +></A +><H3 +><A +NAME="MOVETO-STARTTAG" +></A +>MOVETO_STARTTAG()</H3 +><TABLE +BORDER="0" +BGCOLOR="#E8E8F8" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +>#define MOVETO_STARTTAG(p) \ + while (IS_CHAR(*p) && (*(p) != '<')) (p)++</PRE +></TD +></TR +></TABLE +><P +></P +><DIV +CLASS="INFORMALTABLE" +><P +></P +><TABLE +BORDER="0" +WIDTH="100%" +BGCOLOR="#FFE0E0" +CELLSPACING="0" +CELLPADDING="4" +CLASS="CALSTABLE" +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>p</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +></TABLE +><P +></P +></DIV +></DIV +><HR><DIV +CLASS="REFSECT2" +><A +NAME="AEN4765" ></A ><H3 ><A @@ -728,7 +1486,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4123" +NAME="AEN4785" ></A ><H3 ><A @@ -808,7 +1566,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4143" +NAME="AEN4805" ></A ><H3 ><A @@ -904,7 +1662,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4167" +NAME="AEN4829" ></A ><H3 ><A @@ -929,7 +1687,7 @@ HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" ></TABLE ><P >Free all the memory used by a parser context. However the parsed -document in ctxt->doc is not freed.</P +document in ctxt->myDoc is not freed.</P ><P ></P ><DIV @@ -968,7 +1726,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4183" +NAME="AEN4845" ></A ><H3 ><A @@ -1054,7 +1812,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4204" +NAME="AEN4866" ></A ><H3 ><A @@ -1156,7 +1914,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4230" +NAME="AEN4892" ></A ><H3 ><A @@ -1241,7 +1999,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4251" +NAME="AEN4913" ></A ><H3 ><A @@ -1325,7 +2083,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4273" +NAME="AEN4935" ></A ><H3 ><A @@ -1388,7 +2146,116 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4289" +NAME="AEN4951" +></A +><H3 +><A +NAME="XMLSPLITQNAME" +></A +>xmlSplitQName()</H3 +><TABLE +BORDER="0" +BGCOLOR="#E8E8F8" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +><A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +>* xmlSplitQName (const <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> *name, + <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> **prefix);</PRE +></TD +></TR +></TABLE +><P +>parse an XML qualified name string</P +><P +>[NS 5] QName ::= (Prefix ':')? LocalPart</P +><P +>[NS 6] Prefix ::= NCName</P +><P +>[NS 7] LocalPart ::= NCName</P +><P +></P +><DIV +CLASS="INFORMALTABLE" +><P +></P +><TABLE +BORDER="0" +WIDTH="100%" +BGCOLOR="#FFE0E0" +CELLSPACING="0" +CELLPADDING="4" +CLASS="CALSTABLE" +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>name</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> an XML parser context</TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>prefix</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> a CHAR ** </TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><I +CLASS="EMPHASIS" +>Returns</I +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +>the function returns the local part, and prefix is updated +to get the Prefix if any.</TD +></TR +></TABLE +><P +></P +></DIV +></DIV +><HR><DIV +CLASS="REFSECT2" +><A +NAME="AEN4980" ></A ><H3 ><A @@ -1474,7 +2341,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4312" +NAME="AEN5003" ></A ><H3 ><A @@ -1583,7 +2450,7 @@ to get the Prefix if any.</TD ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4341" +NAME="AEN5032" ></A ><H3 ><A @@ -1668,7 +2535,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4364" +NAME="AEN5055" ></A ><H3 ><A @@ -1749,7 +2616,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4385" +NAME="AEN5076" ></A ><H3 ><A @@ -1816,7 +2683,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4402" +NAME="AEN5093" ></A ><H3 ><A @@ -1904,7 +2771,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4426" +NAME="AEN5117" ></A ><H3 ><A @@ -1989,7 +2856,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4449" +NAME="AEN5140" ></A ><H3 ><A @@ -2073,7 +2940,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4471" +NAME="AEN5162" ></A ><H3 ><A @@ -2157,7 +3024,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4493" +NAME="AEN5184" ></A ><H3 ><A @@ -2240,7 +3107,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4515" +NAME="AEN5206" ></A ><H3 ><A @@ -2323,7 +3190,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4537" +NAME="AEN5228" ></A ><H3 ><A @@ -2407,7 +3274,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4558" +NAME="AEN5249" ></A ><H3 ><A @@ -2538,7 +3405,7 @@ it is possible to return NULL and have publicID set.</TD ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4591" +NAME="AEN5282" ></A ><H3 ><A @@ -2554,10 +3421,7 @@ CELLPADDING="6" ><TD ><PRE CLASS="PROGRAMLISTING" -><A -HREF="gnome-xml-tree.html#XMLNODEPTR" ->xmlNodePtr</A -> xmlParseComment (<A +>void xmlParseComment (<A HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" >xmlParserCtxtPtr</A > ctxt, @@ -2573,9 +3437,6 @@ must not occur within comments. "</P ><P >[15] Comment ::= '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->'</P ><P ->TODO: this should call a SAX function which will handle (or not) the -creation of the comment !</P -><P ></P ><DIV CLASS="INFORMALTABLE" @@ -2622,21 +3483,6 @@ ALIGN="LEFT" VALIGN="TOP" > should we create a node, or just skip the content</TD ></TR -><TR -><TD -WIDTH="20%" -ALIGN="RIGHT" -VALIGN="TOP" -><I -CLASS="EMPHASIS" ->Returns</I -> :</TD -><TD -WIDTH="80%" -ALIGN="LEFT" -VALIGN="TOP" ->the comment node, or NULL</TD -></TR ></TABLE ><P ></P @@ -2645,7 +3491,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4618" +NAME="AEN5303" ></A ><H3 ><A @@ -2728,7 +3574,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4640" +NAME="AEN5325" ></A ><H3 ><A @@ -2795,7 +3641,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4658" +NAME="AEN5343" ></A ><H3 ><A @@ -2870,7 +3716,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4678" +NAME="AEN5363" ></A ><H3 ><A @@ -2945,7 +3791,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4700" +NAME="AEN5385" ></A ><H3 ><A @@ -3056,7 +3902,7 @@ or XML_ATTRIBUTE_FIXED. </TD ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4729" +NAME="AEN5414" ></A ><H3 ><A @@ -3141,7 +3987,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4752" +NAME="AEN5437" ></A ><H3 ><A @@ -3224,7 +4070,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4774" +NAME="AEN5459" ></A ><H3 ><A @@ -3327,7 +4173,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4801" +NAME="AEN5486" ></A ><H3 ><A @@ -3433,7 +4279,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4829" +NAME="AEN5514" ></A ><H3 ><A @@ -3500,7 +4346,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4847" +NAME="AEN5532" ></A ><H3 ><A @@ -3592,7 +4438,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4871" +NAME="AEN5556" ></A ><H3 ><A @@ -3684,7 +4530,7 @@ hierarchy.</TD ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4896" +NAME="AEN5581" ></A ><H3 ><A @@ -3807,7 +4653,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4927" +NAME="AEN5612" ></A ><H3 ><A @@ -3889,7 +4735,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4949" +NAME="AEN5634" ></A ><H3 ><A @@ -3957,7 +4803,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4967" +NAME="AEN5652" ></A ><H3 ><A @@ -4044,7 +4890,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN4990" +NAME="AEN5675" ></A ><H3 ><A @@ -4127,7 +4973,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN5012" +NAME="AEN5697" ></A ><H3 ><A @@ -4211,7 +5057,7 @@ the entity value as the input.</TD ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN5034" +NAME="AEN5719" ></A ><H3 ><A @@ -4294,7 +5140,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN5056" +NAME="AEN5741" ></A ><H3 ><A @@ -4360,7 +5206,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN5073" +NAME="AEN5758" ></A ><H3 ><A @@ -4377,16 +5223,16 @@ CELLPADDING="6" ><PRE CLASS="PROGRAMLISTING" ><A -HREF="gnome-xml-tree.html#XMLATTRPTR" ->xmlAttrPtr</A -> xmlParseAttribute (<A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +>* xmlParseAttribute (<A HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" >xmlParserCtxtPtr</A > ctxt, <A -HREF="gnome-xml-tree.html#XMLNODEPTR" ->xmlNodePtr</A -> node);</PRE +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> **value);</PRE ></TD ></TR ></TABLE @@ -4441,14 +5287,14 @@ VALIGN="TOP" ><TT CLASS="PARAMETER" ><I ->node</I +>value</I ></TT > :</TD ><TD WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" -> the node carrying the attribute</TD +> a CHAR ** used to store the value of the attribute</TD ></TR ><TR ><TD @@ -4463,7 +5309,7 @@ CLASS="EMPHASIS" WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" ->the attribute just parsed of NULL in case of error.</TD +>the attribute name, and the value in *value.</TD ></TR ></TABLE ><P @@ -4473,7 +5319,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN5104" +NAME="AEN5789" ></A ><H3 ><A @@ -4489,10 +5335,7 @@ CELLPADDING="6" ><TD ><PRE CLASS="PROGRAMLISTING" -><A -HREF="gnome-xml-tree.html#XMLNODEPTR" ->xmlNodePtr</A -> xmlParseStartTag (<A +>void xmlParseStartTag (<A HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" >xmlParserCtxtPtr</A > ctxt);</PRE @@ -4542,21 +5385,6 @@ ALIGN="LEFT" VALIGN="TOP" > an XML parser context</TD ></TR -><TR -><TD -WIDTH="20%" -ALIGN="RIGHT" -VALIGN="TOP" -><I -CLASS="EMPHASIS" ->Returns</I -> :</TD -><TD -WIDTH="80%" -ALIGN="LEFT" -VALIGN="TOP" ->the XML new node or NULL.</TD -></TR ></TABLE ><P ></P @@ -4565,7 +5393,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN5130" +NAME="AEN5810" ></A ><H3 ><A @@ -4584,15 +5412,7 @@ CLASS="PROGRAMLISTING" >void xmlParseEndTag (<A HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" >xmlParserCtxtPtr</A -> ctxt, - <A -HREF="gnome-xml-tree.html#XMLNSPTR" ->xmlNsPtr</A -> *nsPtr, - <A -HREF="gnome-xml-tree.html#CHAR" ->CHAR</A -> **tagPtr);</PRE +> ctxt);</PRE ></TD ></TR ></TABLE @@ -4603,9 +5423,7 @@ HREF="gnome-xml-tree.html#CHAR" ><P >With namespace</P ><P ->[9] ETag ::= '</' QName S? '>'</P -><P ->tagPtr receive the tag name just read</P +>[NS 9] ETag ::= '</' QName S? '>'</P ><P ></P ><DIV @@ -4636,40 +5454,6 @@ ALIGN="LEFT" VALIGN="TOP" > an XML parser context</TD ></TR -><TR -><TD -WIDTH="20%" -ALIGN="RIGHT" -VALIGN="TOP" -><TT -CLASS="PARAMETER" -><I ->nsPtr</I -></TT -> :</TD -><TD -WIDTH="80%" -ALIGN="LEFT" -VALIGN="TOP" -> the current node namespace definition</TD -></TR -><TR -><TD -WIDTH="20%" -ALIGN="RIGHT" -VALIGN="TOP" -><TT -CLASS="PARAMETER" -><I ->tagPtr</I -></TT -> :</TD -><TD -WIDTH="80%" -ALIGN="LEFT" -VALIGN="TOP" -> CHAR** receive the tag value</TD -></TR ></TABLE ><P ></P @@ -4678,7 +5462,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN5160" +NAME="AEN5829" ></A ><H3 ><A @@ -4749,7 +5533,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN5180" +NAME="AEN5849" ></A ><H3 ><A @@ -4814,7 +5598,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN5197" +NAME="AEN5866" ></A ><H3 ><A @@ -4830,10 +5614,7 @@ CELLPADDING="6" ><TD ><PRE CLASS="PROGRAMLISTING" -><A -HREF="gnome-xml-tree.html#XMLNODEPTR" ->xmlNodePtr</A -> xmlParseElement (<A +>void xmlParseElement (<A HREF="gnome-xml-parser.html#XMLPARSERCTXTPTR" >xmlParserCtxtPtr</A > ctxt);</PRE @@ -4876,21 +5657,6 @@ ALIGN="LEFT" VALIGN="TOP" > an XML parser context</TD ></TR -><TR -><TD -WIDTH="20%" -ALIGN="RIGHT" -VALIGN="TOP" -><I -CLASS="EMPHASIS" ->Returns</I -> :</TD -><TD -WIDTH="80%" -ALIGN="LEFT" -VALIGN="TOP" ->the XML new node or NULL</TD -></TR ></TABLE ><P ></P @@ -4899,7 +5665,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN5220" +NAME="AEN5884" ></A ><H3 ><A @@ -4982,7 +5748,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN5242" +NAME="AEN5906" ></A ><H3 ><A @@ -5067,7 +5833,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN5265" +NAME="AEN5929" ></A ><H3 ><A @@ -5150,7 +5916,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN5287" +NAME="AEN5951" ></A ><H3 ><A @@ -5235,7 +6001,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN5310" +NAME="AEN5974" ></A ><H3 ><A @@ -5316,7 +6082,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN5331" +NAME="AEN5995" ></A ><H3 ><A @@ -5381,7 +6147,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN5348" +NAME="AEN6012" ></A ><H3 ><A diff --git a/doc/html/gnome-xml-tree.html b/doc/html/gnome-xml-tree.html index f687d873..72121bcc 100644 --- a/doc/html/gnome-xml-tree.html +++ b/doc/html/gnome-xml-tree.html @@ -65,7 +65,7 @@ WIDTH="100%"></DIV ><DIV CLASS="REFNAMEDIV" ><A -NAME="AEN1205" +NAME="AEN1503" ></A ><H2 >Name</H2 @@ -73,7 +73,7 @@ NAME="AEN1205" ><DIV CLASS="REFSYNOPSISDIV" ><A -NAME="AEN1208" +NAME="AEN1506" ></A ><H2 >Synopsis</H2 @@ -168,6 +168,70 @@ typedef <A HREF="gnome-xml-tree.html#XMLDOCPTR" >xmlDocPtr</A > +typedef <A +HREF="gnome-xml-tree.html#XMLBUFFER" +>xmlBuffer</A +> +typedef <A +HREF="gnome-xml-tree.html#XMLBUFFERPTR" +>xmlBufferPtr</A +> +<A +HREF="gnome-xml-tree.html#XMLBUFFERPTR" +>xmlBufferPtr</A +> <A +HREF="gnome-xml-tree.html#XMLBUFFERCREATE" +>xmlBufferCreate</A +> (void); +void <A +HREF="gnome-xml-tree.html#XMLBUFFERFREE" +>xmlBufferFree</A +> (<A +HREF="gnome-xml-tree.html#XMLBUFFERPTR" +>xmlBufferPtr</A +> buf); +int <A +HREF="gnome-xml-tree.html#XMLBUFFERDUMP" +>xmlBufferDump</A +> (<GTKDOCLINK +HREF="FILE" +>FILE</GTKDOCLINK +> *file, + <A +HREF="gnome-xml-tree.html#XMLBUFFERPTR" +>xmlBufferPtr</A +> buf); +void <A +HREF="gnome-xml-tree.html#XMLBUFFERADD" +>xmlBufferAdd</A +> (<A +HREF="gnome-xml-tree.html#XMLBUFFERPTR" +>xmlBufferPtr</A +> buf, + const <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> *str, + int len); +void <A +HREF="gnome-xml-tree.html#XMLBUFFERCAT" +>xmlBufferCat</A +> (<A +HREF="gnome-xml-tree.html#XMLBUFFERPTR" +>xmlBufferPtr</A +> buf, + const <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> *str); +void <A +HREF="gnome-xml-tree.html#XMLBUFFERCCAT" +>xmlBufferCCat</A +> (<A +HREF="gnome-xml-tree.html#XMLBUFFERPTR" +>xmlBufferPtr</A +> buf, + const char *str); <A HREF="gnome-xml-tree.html#XMLDTDPTR" >xmlDtdPtr</A @@ -488,7 +552,7 @@ HREF="gnome-xml-tree.html#XMLNEWDOCCOMMENT" HREF="gnome-xml-tree.html#XMLDOCPTR" >xmlDocPtr</A > doc, - <A + const <A HREF="gnome-xml-tree.html#CHAR" >CHAR</A > *content); @@ -498,7 +562,7 @@ HREF="gnome-xml-tree.html#XMLNODEPTR" > <A HREF="gnome-xml-tree.html#XMLNEWCOMMENT" >xmlNewComment</A -> (<A +> (const <A HREF="gnome-xml-tree.html#CHAR" >CHAR</A > *content); @@ -817,14 +881,22 @@ HREF="gnome-xml-tree.html#XMLNODEPTR" void <A HREF="gnome-xml-tree.html#XMLBUFFERWRITECHAR" >xmlBufferWriteCHAR</A -> (const <A +> (<A +HREF="gnome-xml-tree.html#XMLBUFFERPTR" +>xmlBufferPtr</A +> buf, + const <A HREF="gnome-xml-tree.html#CHAR" >CHAR</A > *string); void <A HREF="gnome-xml-tree.html#XMLBUFFERWRITECHAR" >xmlBufferWriteChar</A -> (const char *string); +> (<A +HREF="gnome-xml-tree.html#XMLBUFFERPTR" +>xmlBufferPtr</A +> buf, + const char *string); void <A HREF="gnome-xml-tree.html#XMLDOCDUMPMEMORY" >xmlDocDumpMemory</A @@ -886,7 +958,7 @@ HREF="gnome-xml-tree.html#XMLSETCOMPRESSMODE" ><DIV CLASS="REFSECT1" ><A -NAME="AEN1429" +NAME="AEN1746" ></A ><H2 >Description</H2 @@ -896,14 +968,14 @@ NAME="AEN1429" ><DIV CLASS="REFSECT1" ><A -NAME="AEN1432" +NAME="AEN1749" ></A ><H2 >Details</H2 ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1434" +NAME="AEN1751" ></A ><H3 ><A @@ -942,7 +1014,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1439" +NAME="AEN1756" ></A ><H3 ><A @@ -955,7 +1027,7 @@ NAME="CHAR" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1443" +NAME="AEN1760" ></A ><H3 ><A @@ -981,7 +1053,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1448" +NAME="AEN1765" ></A ><H3 ><A @@ -1018,7 +1090,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1453" +NAME="AEN1770" ></A ><H3 ><A @@ -1049,7 +1121,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1458" +NAME="AEN1775" ></A ><H3 ><A @@ -1075,7 +1147,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1463" +NAME="AEN1780" ></A ><H3 ><A @@ -1101,7 +1173,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1468" +NAME="AEN1785" ></A ><H3 ><A @@ -1132,7 +1204,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1473" +NAME="AEN1790" ></A ><H3 ><A @@ -1163,7 +1235,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1478" +NAME="AEN1795" ></A ><H3 ><A @@ -1189,7 +1261,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1483" +NAME="AEN1800" ></A ><H3 ><A @@ -1220,7 +1292,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1488" +NAME="AEN1805" ></A ><H3 ><A @@ -1246,7 +1318,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1493" +NAME="AEN1810" ></A ><H3 ><A @@ -1275,7 +1347,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1498" +NAME="AEN1815" ></A ><H3 ><A @@ -1301,7 +1373,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1503" +NAME="AEN1820" ></A ><H3 ><A @@ -1327,7 +1399,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1508" +NAME="AEN1825" ></A ><H3 ><A @@ -1353,7 +1425,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1513" +NAME="AEN1830" ></A ><H3 ><A @@ -1379,7 +1451,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1518" +NAME="AEN1835" ></A ><H3 ><A @@ -1405,7 +1477,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1523" +NAME="AEN1840" ></A ><H3 ><A @@ -1431,7 +1503,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1528" +NAME="AEN1845" ></A ><H3 ><A @@ -1457,7 +1529,549 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1533" +NAME="AEN1850" +></A +><H3 +><A +NAME="XMLBUFFER" +></A +>xmlBuffer</H3 +><TABLE +BORDER="0" +BGCOLOR="#E8E8F8" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +>typedef _xmlBuffer xmlBuffer;</PRE +></TD +></TR +></TABLE +><P +></P +></DIV +><HR><DIV +CLASS="REFSECT2" +><A +NAME="AEN1855" +></A +><H3 +><A +NAME="XMLBUFFERPTR" +></A +>xmlBufferPtr</H3 +><TABLE +BORDER="0" +BGCOLOR="#E8E8F8" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +>typedef xmlBuffer *xmlBufferPtr;</PRE +></TD +></TR +></TABLE +><P +></P +></DIV +><HR><DIV +CLASS="REFSECT2" +><A +NAME="AEN1860" +></A +><H3 +><A +NAME="XMLBUFFERCREATE" +></A +>xmlBufferCreate()</H3 +><TABLE +BORDER="0" +BGCOLOR="#E8E8F8" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +><A +HREF="gnome-xml-tree.html#XMLBUFFERPTR" +>xmlBufferPtr</A +> xmlBufferCreate (void);</PRE +></TD +></TR +></TABLE +><P +>routine to create an XML buffer.</P +><P +></P +><DIV +CLASS="INFORMALTABLE" +><P +></P +><TABLE +BORDER="0" +WIDTH="100%" +BGCOLOR="#FFE0E0" +CELLSPACING="0" +CELLPADDING="4" +CLASS="CALSTABLE" +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><I +CLASS="EMPHASIS" +>Returns</I +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +>the new structure.</TD +></TR +></TABLE +><P +></P +></DIV +></DIV +><HR><DIV +CLASS="REFSECT2" +><A +NAME="AEN1876" +></A +><H3 +><A +NAME="XMLBUFFERFREE" +></A +>xmlBufferFree()</H3 +><TABLE +BORDER="0" +BGCOLOR="#E8E8F8" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +>void xmlBufferFree (<A +HREF="gnome-xml-tree.html#XMLBUFFERPTR" +>xmlBufferPtr</A +> buf);</PRE +></TD +></TR +></TABLE +><P +>Frees an XML buffer.</P +><P +></P +><DIV +CLASS="INFORMALTABLE" +><P +></P +><TABLE +BORDER="0" +WIDTH="100%" +BGCOLOR="#FFE0E0" +CELLSPACING="0" +CELLPADDING="4" +CLASS="CALSTABLE" +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>buf</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> the buffer to free</TD +></TR +></TABLE +><P +></P +></DIV +></DIV +><HR><DIV +CLASS="REFSECT2" +><A +NAME="AEN1892" +></A +><H3 +><A +NAME="XMLBUFFERDUMP" +></A +>xmlBufferDump()</H3 +><TABLE +BORDER="0" +BGCOLOR="#E8E8F8" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +>int xmlBufferDump (<GTKDOCLINK +HREF="FILE" +>FILE</GTKDOCLINK +> *file, + <A +HREF="gnome-xml-tree.html#XMLBUFFERPTR" +>xmlBufferPtr</A +> buf);</PRE +></TD +></TR +></TABLE +><P +>Dumps an XML buffer to a FILE *.</P +><P +></P +><DIV +CLASS="INFORMALTABLE" +><P +></P +><TABLE +BORDER="0" +WIDTH="100%" +BGCOLOR="#FFE0E0" +CELLSPACING="0" +CELLPADDING="4" +CLASS="CALSTABLE" +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>file</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> the file output</TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>buf</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> the buffer to dump</TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><I +CLASS="EMPHASIS" +>Returns</I +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +>the number of CHAR written</TD +></TR +></TABLE +><P +></P +></DIV +></DIV +><HR><DIV +CLASS="REFSECT2" +><A +NAME="AEN1917" +></A +><H3 +><A +NAME="XMLBUFFERADD" +></A +>xmlBufferAdd()</H3 +><TABLE +BORDER="0" +BGCOLOR="#E8E8F8" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +>void xmlBufferAdd (<A +HREF="gnome-xml-tree.html#XMLBUFFERPTR" +>xmlBufferPtr</A +> buf, + const <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> *str, + int len);</PRE +></TD +></TR +></TABLE +><P +>Add a string range to an XML buffer.</P +><P +></P +><DIV +CLASS="INFORMALTABLE" +><P +></P +><TABLE +BORDER="0" +WIDTH="100%" +BGCOLOR="#FFE0E0" +CELLSPACING="0" +CELLPADDING="4" +CLASS="CALSTABLE" +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>buf</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> the buffer to dump</TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>str</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> the CHAR string</TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>len</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> the number of CHAR to add</TD +></TR +></TABLE +><P +></P +></DIV +></DIV +><HR><DIV +CLASS="REFSECT2" +><A +NAME="AEN1942" +></A +><H3 +><A +NAME="XMLBUFFERCAT" +></A +>xmlBufferCat()</H3 +><TABLE +BORDER="0" +BGCOLOR="#E8E8F8" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +>void xmlBufferCat (<A +HREF="gnome-xml-tree.html#XMLBUFFERPTR" +>xmlBufferPtr</A +> buf, + const <A +HREF="gnome-xml-tree.html#CHAR" +>CHAR</A +> *str);</PRE +></TD +></TR +></TABLE +><P +>Append a zero terminated string to an XML buffer.</P +><P +></P +><DIV +CLASS="INFORMALTABLE" +><P +></P +><TABLE +BORDER="0" +WIDTH="100%" +BGCOLOR="#FFE0E0" +CELLSPACING="0" +CELLPADDING="4" +CLASS="CALSTABLE" +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>buf</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> the buffer to dump</TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>str</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> the CHAR string</TD +></TR +></TABLE +><P +></P +></DIV +></DIV +><HR><DIV +CLASS="REFSECT2" +><A +NAME="AEN1963" +></A +><H3 +><A +NAME="XMLBUFFERCCAT" +></A +>xmlBufferCCat()</H3 +><TABLE +BORDER="0" +BGCOLOR="#E8E8F8" +WIDTH="100%" +CELLPADDING="6" +><TR +><TD +><PRE +CLASS="PROGRAMLISTING" +>void xmlBufferCCat (<A +HREF="gnome-xml-tree.html#XMLBUFFERPTR" +>xmlBufferPtr</A +> buf, + const char *str);</PRE +></TD +></TR +></TABLE +><P +>Append a zero terminated C string to an XML buffer.</P +><P +></P +><DIV +CLASS="INFORMALTABLE" +><P +></P +><TABLE +BORDER="0" +WIDTH="100%" +BGCOLOR="#FFE0E0" +CELLSPACING="0" +CELLPADDING="4" +CLASS="CALSTABLE" +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>buf</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> the buffer to dump</TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I +>str</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> the C char string</TD +></TR +></TABLE +><P +></P +></DIV +></DIV +><HR><DIV +CLASS="REFSECT2" +><A +NAME="AEN1983" ></A ><H3 ><A @@ -1601,7 +2215,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1569" +NAME="AEN2019" ></A ><H3 ><A @@ -1745,7 +2359,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1605" +NAME="AEN2055" ></A ><H3 ><A @@ -1808,7 +2422,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1621" +NAME="AEN2071" ></A ><H3 ><A @@ -1931,7 +2545,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1652" +NAME="AEN2102" ></A ><H3 ><A @@ -2054,7 +2668,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1683" +NAME="AEN2133" ></A ><H3 ><A @@ -2117,7 +2731,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1699" +NAME="AEN2149" ></A ><H3 ><A @@ -2198,7 +2812,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1720" +NAME="AEN2170" ></A ><H3 ><A @@ -2262,7 +2876,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1736" +NAME="AEN2186" ></A ><H3 ><A @@ -2385,7 +2999,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1767" +NAME="AEN2217" ></A ><H3 ><A @@ -2508,7 +3122,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1798" +NAME="AEN2248" ></A ><H3 ><A @@ -2571,7 +3185,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1814" +NAME="AEN2264" ></A ><H3 ><A @@ -2634,7 +3248,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1830" +NAME="AEN2280" ></A ><H3 ><A @@ -2715,7 +3329,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1851" +NAME="AEN2301" ></A ><H3 ><A @@ -2796,7 +3410,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1872" +NAME="AEN2322" ></A ><H3 ><A @@ -2877,7 +3491,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1893" +NAME="AEN2343" ></A ><H3 ><A @@ -2977,7 +3591,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1918" +NAME="AEN2368" ></A ><H3 ><A @@ -3132,7 +3746,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1956" +NAME="AEN2406" ></A ><H3 ><A @@ -3246,7 +3860,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN1984" +NAME="AEN2434" ></A ><H3 ><A @@ -3407,7 +4021,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2023" +NAME="AEN2473" ></A ><H3 ><A @@ -3509,7 +4123,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2049" +NAME="AEN2499" ></A ><H3 ><A @@ -3590,7 +4204,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2070" +NAME="AEN2520" ></A ><H3 ><A @@ -3711,7 +4325,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2100" +NAME="AEN2550" ></A ><H3 ><A @@ -3810,7 +4424,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2125" +NAME="AEN2575" ></A ><H3 ><A @@ -3833,7 +4447,7 @@ HREF="gnome-xml-tree.html#XMLNODEPTR" HREF="gnome-xml-tree.html#XMLDOCPTR" >xmlDocPtr</A > doc, - <A + const <A HREF="gnome-xml-tree.html#CHAR" >CHAR</A > *content);</PRE @@ -3912,7 +4526,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2151" +NAME="AEN2601" ></A ><H3 ><A @@ -3931,7 +4545,7 @@ CLASS="PROGRAMLISTING" ><A HREF="gnome-xml-tree.html#XMLNODEPTR" >xmlNodePtr</A -> xmlNewComment (<A +> xmlNewComment (const <A HREF="gnome-xml-tree.html#CHAR" >CHAR</A > *content);</PRE @@ -3993,7 +4607,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2172" +NAME="AEN2622" ></A ><H3 ><A @@ -4095,7 +4709,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2198" +NAME="AEN2648" ></A ><H3 ><A @@ -4194,7 +4808,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2223" +NAME="AEN2673" ></A ><H3 ><A @@ -4275,7 +4889,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2244" +NAME="AEN2694" ></A ><H3 ><A @@ -4356,7 +4970,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2265" +NAME="AEN2715" ></A ><H3 ><A @@ -4434,7 +5048,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2285" +NAME="AEN2735" ></A ><H3 ><A @@ -4541,7 +5155,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2312" +NAME="AEN2762" ></A ><H3 ><A @@ -4604,7 +5218,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2328" +NAME="AEN2778" ></A ><H3 ><A @@ -4706,7 +5320,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2354" +NAME="AEN2804" ></A ><H3 ><A @@ -4813,7 +5427,7 @@ CLASS="PARAMETER" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2380" +NAME="AEN2830" ></A ><H3 ><A @@ -4877,7 +5491,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2396" +NAME="AEN2846" ></A ><H3 ><A @@ -4940,7 +5554,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2412" +NAME="AEN2862" ></A ><H3 ><A @@ -5071,7 +5685,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2444" +NAME="AEN2894" ></A ><H3 ><A @@ -5195,7 +5809,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2475" +NAME="AEN2925" ></A ><H3 ><A @@ -5279,7 +5893,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2496" +NAME="AEN2946" ></A ><H3 ><A @@ -5360,7 +5974,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2517" +NAME="AEN2967" ></A ><H3 ><A @@ -5441,7 +6055,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2538" +NAME="AEN2988" ></A ><H3 ><A @@ -5564,7 +6178,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2569" +NAME="AEN3019" ></A ><H3 ><A @@ -5667,7 +6281,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2595" +NAME="AEN3045" ></A ><H3 ><A @@ -5770,7 +6384,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2621" +NAME="AEN3071" ></A ><H3 ><A @@ -5891,7 +6505,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2651" +NAME="AEN3101" ></A ><H3 ><A @@ -6012,7 +6626,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2681" +NAME="AEN3131" ></A ><H3 ><A @@ -6096,7 +6710,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2702" +NAME="AEN3152" ></A ><H3 ><A @@ -6203,7 +6817,7 @@ CLASS="PARAMETER" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2728" +NAME="AEN3178" ></A ><H3 ><A @@ -6287,7 +6901,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2749" +NAME="AEN3199" ></A ><H3 ><A @@ -6394,7 +7008,7 @@ CLASS="PARAMETER" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2775" +NAME="AEN3225" ></A ><H3 ><A @@ -6468,7 +7082,8 @@ CLASS="EMPHASIS" WIDTH="80%" ALIGN="LEFT" VALIGN="TOP" ->a new CHAR * or NULL if no content is available.</TD +>a new CHAR * or NULL if no content is available. +It's up to the caller to free the memory.</TD ></TR ></TABLE ><P @@ -6478,7 +7093,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2796" +NAME="AEN3246" ></A ><H3 ><A @@ -6494,7 +7109,11 @@ CELLPADDING="6" ><TD ><PRE CLASS="PROGRAMLISTING" ->void xmlBufferWriteCHAR (const <A +>void xmlBufferWriteCHAR (<A +HREF="gnome-xml-tree.html#XMLBUFFERPTR" +>xmlBufferPtr</A +> buf, + const <A HREF="gnome-xml-tree.html#CHAR" >CHAR</A > *string);</PRE @@ -6503,7 +7122,7 @@ HREF="gnome-xml-tree.html#CHAR" ></TABLE ><P >routine which manage and grows an output buffer. This one add -CHARs at the end of the array.</P +CHARs at the end of the buffer.</P ><P ></P ><DIV @@ -6525,6 +7144,23 @@ VALIGN="TOP" ><TT CLASS="PARAMETER" ><I +>buf</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> the XML buffer</TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I >string</I ></TT > :</TD @@ -6542,7 +7178,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2812" +NAME="AEN3267" ></A ><H3 ><A @@ -6558,7 +7194,11 @@ CELLPADDING="6" ><TD ><PRE CLASS="PROGRAMLISTING" ->void xmlBufferWriteChar (const char *string);</PRE +>void xmlBufferWriteChar (<A +HREF="gnome-xml-tree.html#XMLBUFFERPTR" +>xmlBufferPtr</A +> buf, + const char *string);</PRE ></TD ></TR ></TABLE @@ -6586,6 +7226,23 @@ VALIGN="TOP" ><TT CLASS="PARAMETER" ><I +>buf</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> the XML buffer</TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I >string</I ></TT > :</TD @@ -6603,7 +7260,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2827" +NAME="AEN3287" ></A ><H3 ><A @@ -6706,7 +7363,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2852" +NAME="AEN3312" ></A ><H3 ><A @@ -6790,7 +7447,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2873" +NAME="AEN3333" ></A ><H3 ><A @@ -6887,7 +7544,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2897" +NAME="AEN3357" ></A ><H3 ><A @@ -6965,7 +7622,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2917" +NAME="AEN3377" ></A ><H3 ><A @@ -7047,7 +7704,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2937" +NAME="AEN3397" ></A ><H3 ><A @@ -7105,7 +7762,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN2952" +NAME="AEN3412" ></A ><H3 ><A diff --git a/doc/html/gnome-xml-valid.html b/doc/html/gnome-xml-valid.html index 99846371..6c473379 100644 --- a/doc/html/gnome-xml-valid.html +++ b/doc/html/gnome-xml-valid.html @@ -65,7 +65,7 @@ WIDTH="100%"></DIV ><DIV CLASS="REFNAMEDIV" ><A -NAME="AEN3359" +NAME="AEN3824" ></A ><H2 >Name</H2 @@ -73,7 +73,7 @@ NAME="AEN3359" ><DIV CLASS="REFSYNOPSISDIV" ><A -NAME="AEN3362" +NAME="AEN3827" ></A ><H2 >Synopsis</H2 @@ -122,15 +122,15 @@ HREF="gnome-xml-valid.html#XMLADDNOTATIONDECL" HREF="gnome-xml-tree.html#XMLDTDPTR" >xmlDtdPtr</A > dtd, - <A + const <A HREF="gnome-xml-tree.html#CHAR" >CHAR</A > *name, - <A + const <A HREF="gnome-xml-tree.html#CHAR" >CHAR</A > *PublicID, - <A + const <A HREF="gnome-xml-tree.html#CHAR" >CHAR</A > *SystemID); @@ -155,6 +155,10 @@ void <A HREF="gnome-xml-valid.html#XMLDUMPNOTATIONTABLE" >xmlDumpNotationTable</A > (<A +HREF="gnome-xml-tree.html#XMLBUFFERPTR" +>xmlBufferPtr</A +> buf, + <A HREF="gnome-xml-valid.html#XMLNOTATIONTABLEPTR" >xmlNotationTablePtr</A > table); @@ -196,7 +200,7 @@ HREF="gnome-xml-valid.html#XMLADDELEMENTDECL" HREF="gnome-xml-tree.html#XMLDTDPTR" >xmlDtdPtr</A > dtd, - <A + const <A HREF="gnome-xml-tree.html#CHAR" >CHAR</A > *name, @@ -226,6 +230,10 @@ void <A HREF="gnome-xml-valid.html#XMLDUMPELEMENTTABLE" >xmlDumpElementTable</A > (<A +HREF="gnome-xml-tree.html#XMLBUFFERPTR" +>xmlBufferPtr</A +> buf, + <A HREF="gnome-xml-valid.html#XMLELEMENTTABLEPTR" >xmlElementTablePtr</A > table); @@ -266,17 +274,17 @@ HREF="gnome-xml-valid.html#XMLADDATTRIBUTEDECL" HREF="gnome-xml-tree.html#XMLDTDPTR" >xmlDtdPtr</A > dtd, - <A + const <A HREF="gnome-xml-tree.html#CHAR" >CHAR</A > *elem, - <A + const <A HREF="gnome-xml-tree.html#CHAR" >CHAR</A > *name, int type, int def, - <A + const <A HREF="gnome-xml-tree.html#CHAR" >CHAR</A > *defaultValue, @@ -305,6 +313,10 @@ void <A HREF="gnome-xml-valid.html#XMLDUMPATTRIBUTETABLE" >xmlDumpAttributeTable</A > (<A +HREF="gnome-xml-tree.html#XMLBUFFERPTR" +>xmlBufferPtr</A +> buf, + <A HREF="gnome-xml-valid.html#XMLATTRIBUTETABLEPTR" >xmlAttributeTablePtr</A > table);</PRE @@ -315,7 +327,7 @@ HREF="gnome-xml-valid.html#XMLATTRIBUTETABLEPTR" ><DIV CLASS="REFSECT1" ><A -NAME="AEN3426" +NAME="AEN3894" ></A ><H2 >Description</H2 @@ -325,14 +337,14 @@ NAME="AEN3426" ><DIV CLASS="REFSECT1" ><A -NAME="AEN3429" +NAME="AEN3897" ></A ><H2 >Details</H2 ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3431" +NAME="AEN3899" ></A ><H3 ><A @@ -358,7 +370,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3436" +NAME="AEN3904" ></A ><H3 ><A @@ -384,7 +396,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3441" +NAME="AEN3909" ></A ><H3 ><A @@ -410,7 +422,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3446" +NAME="AEN3914" ></A ><H3 ><A @@ -436,7 +448,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3451" +NAME="AEN3919" ></A ><H3 ><A @@ -462,7 +474,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3456" +NAME="AEN3924" ></A ><H3 ><A @@ -488,7 +500,7 @@ CLASS="PROGRAMLISTING" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3461" +NAME="AEN3929" ></A ><H3 ><A @@ -511,15 +523,15 @@ HREF="gnome-xml-tree.html#XMLNOTATIONPTR" HREF="gnome-xml-tree.html#XMLDTDPTR" >xmlDtdPtr</A > dtd, - <A + const <A HREF="gnome-xml-tree.html#CHAR" >CHAR</A > *name, - <A + const <A HREF="gnome-xml-tree.html#CHAR" >CHAR</A > *PublicID, - <A + const <A HREF="gnome-xml-tree.html#CHAR" >CHAR</A > *SystemID);</PRE @@ -632,7 +644,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3497" +NAME="AEN3965" ></A ><H3 ><A @@ -713,7 +725,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3518" +NAME="AEN3986" ></A ><H3 ><A @@ -776,7 +788,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3534" +NAME="AEN4002" ></A ><H3 ><A @@ -793,6 +805,10 @@ CELLPADDING="6" ><PRE CLASS="PROGRAMLISTING" >void xmlDumpNotationTable (<A +HREF="gnome-xml-tree.html#XMLBUFFERPTR" +>xmlBufferPtr</A +> buf, + <A HREF="gnome-xml-valid.html#XMLNOTATIONTABLEPTR" >xmlNotationTablePtr</A > table);</PRE @@ -825,6 +841,23 @@ VALIGN="TOP" ><TT CLASS="PARAMETER" ><I +>buf</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I >table</I ></TT > :</TD @@ -842,7 +875,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3551" +NAME="AEN4024" ></A ><H3 ><A @@ -941,7 +974,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3576" +NAME="AEN4049" ></A ><H3 ><A @@ -1022,7 +1055,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3597" +NAME="AEN4070" ></A ><H3 ><A @@ -1085,7 +1118,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3613" +NAME="AEN4086" ></A ><H3 ><A @@ -1108,7 +1141,7 @@ HREF="gnome-xml-tree.html#XMLELEMENTPTR" HREF="gnome-xml-tree.html#XMLDTDPTR" >xmlDtdPtr</A > dtd, - <A + const <A HREF="gnome-xml-tree.html#CHAR" >CHAR</A > *name, @@ -1226,7 +1259,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3648" +NAME="AEN4121" ></A ><H3 ><A @@ -1307,7 +1340,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3669" +NAME="AEN4142" ></A ><H3 ><A @@ -1370,7 +1403,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3685" +NAME="AEN4158" ></A ><H3 ><A @@ -1387,6 +1420,10 @@ CELLPADDING="6" ><PRE CLASS="PROGRAMLISTING" >void xmlDumpElementTable (<A +HREF="gnome-xml-tree.html#XMLBUFFERPTR" +>xmlBufferPtr</A +> buf, + <A HREF="gnome-xml-valid.html#XMLELEMENTTABLEPTR" >xmlElementTablePtr</A > table);</PRE @@ -1419,6 +1456,23 @@ VALIGN="TOP" ><TT CLASS="PARAMETER" ><I +>buf</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I >table</I ></TT > :</TD @@ -1436,7 +1490,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3702" +NAME="AEN4180" ></A ><H3 ><A @@ -1518,7 +1572,7 @@ of error.</TD ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3723" +NAME="AEN4201" ></A ><H3 ><A @@ -1581,7 +1635,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3739" +NAME="AEN4217" ></A ><H3 ><A @@ -1663,7 +1717,7 @@ of error.</TD ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3760" +NAME="AEN4238" ></A ><H3 ><A @@ -1686,17 +1740,17 @@ HREF="gnome-xml-tree.html#XMLATTRIBUTEPTR" HREF="gnome-xml-tree.html#XMLDTDPTR" >xmlDtdPtr</A > dtd, - <A + const <A HREF="gnome-xml-tree.html#CHAR" >CHAR</A > *elem, - <A + const <A HREF="gnome-xml-tree.html#CHAR" >CHAR</A > *name, int type, int def, - <A + const <A HREF="gnome-xml-tree.html#CHAR" >CHAR</A > *defaultValue, @@ -1864,7 +1918,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3809" +NAME="AEN4287" ></A ><H3 ><A @@ -1945,7 +1999,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3830" +NAME="AEN4308" ></A ><H3 ><A @@ -2008,7 +2062,7 @@ VALIGN="TOP" ><HR><DIV CLASS="REFSECT2" ><A -NAME="AEN3846" +NAME="AEN4324" ></A ><H3 ><A @@ -2025,6 +2079,10 @@ CELLPADDING="6" ><PRE CLASS="PROGRAMLISTING" >void xmlDumpAttributeTable (<A +HREF="gnome-xml-tree.html#XMLBUFFERPTR" +>xmlBufferPtr</A +> buf, + <A HREF="gnome-xml-valid.html#XMLATTRIBUTETABLEPTR" >xmlAttributeTablePtr</A > table);</PRE @@ -2057,6 +2115,23 @@ VALIGN="TOP" ><TT CLASS="PARAMETER" ><I +>buf</I +></TT +> :</TD +><TD +WIDTH="80%" +ALIGN="LEFT" +VALIGN="TOP" +> </TD +></TR +><TR +><TD +WIDTH="20%" +ALIGN="RIGHT" +VALIGN="TOP" +><TT +CLASS="PARAMETER" +><I >table</I ></TT > :</TD diff --git a/doc/html/index.sgml b/doc/html/index.sgml index 6b20096a..ed627da1 100644 --- a/doc/html/index.sgml +++ b/doc/html/index.sgml @@ -10,7 +10,12 @@ <ANCHOR id ="XMLSAXLOCATOR" href="gnome-xml/gnome-xml-parser.html#XMLSAXLOCATOR"> <ANCHOR id ="XMLSAXLOCATORPTR" href="gnome-xml/gnome-xml-parser.html#XMLSAXLOCATORPTR"> <ANCHOR id ="RESOLVEENTITYSAXFUNC" href="gnome-xml/gnome-xml-parser.html#RESOLVEENTITYSAXFUNC"> +<ANCHOR id ="INTERNALSUBSETSAXFUNC" href="gnome-xml/gnome-xml-parser.html#INTERNALSUBSETSAXFUNC"> +<ANCHOR id ="GETENTITYSAXFUNC" href="gnome-xml/gnome-xml-parser.html#GETENTITYSAXFUNC"> +<ANCHOR id ="ENTITYDECLSAXFUNC" href="gnome-xml/gnome-xml-parser.html#ENTITYDECLSAXFUNC"> <ANCHOR id ="NOTATIONDECLSAXFUNC" href="gnome-xml/gnome-xml-parser.html#NOTATIONDECLSAXFUNC"> +<ANCHOR id ="ATTRIBUTEDECLSAXFUNC" href="gnome-xml/gnome-xml-parser.html#ATTRIBUTEDECLSAXFUNC"> +<ANCHOR id ="ELEMENTDECLSAXFUNC" href="gnome-xml/gnome-xml-parser.html#ELEMENTDECLSAXFUNC"> <ANCHOR id ="UNPARSEDENTITYDECLSAXFUNC" href="gnome-xml/gnome-xml-parser.html#UNPARSEDENTITYDECLSAXFUNC"> <ANCHOR id ="SETDOCUMENTLOCATORSAXFUNC" href="gnome-xml/gnome-xml-parser.html#SETDOCUMENTLOCATORSAXFUNC"> <ANCHOR id ="STARTDOCUMENTSAXFUNC" href="gnome-xml/gnome-xml-parser.html#STARTDOCUMENTSAXFUNC"> @@ -18,12 +23,17 @@ <ANCHOR id ="STARTELEMENTSAXFUNC" href="gnome-xml/gnome-xml-parser.html#STARTELEMENTSAXFUNC"> <ANCHOR id ="ENDELEMENTSAXFUNC" href="gnome-xml/gnome-xml-parser.html#ENDELEMENTSAXFUNC"> <ANCHOR id ="ATTRIBUTESAXFUNC" href="gnome-xml/gnome-xml-parser.html#ATTRIBUTESAXFUNC"> +<ANCHOR id ="REFERENCESAXFUNC" href="gnome-xml/gnome-xml-parser.html#REFERENCESAXFUNC"> <ANCHOR id ="CHARACTERSSAXFUNC" href="gnome-xml/gnome-xml-parser.html#CHARACTERSSAXFUNC"> <ANCHOR id ="IGNORABLEWHITESPACESAXFUNC" href="gnome-xml/gnome-xml-parser.html#IGNORABLEWHITESPACESAXFUNC"> <ANCHOR id ="PROCESSINGINSTRUCTIONSAXFUNC" href="gnome-xml/gnome-xml-parser.html#PROCESSINGINSTRUCTIONSAXFUNC"> +<ANCHOR id ="COMMENTSAXFUNC" href="gnome-xml/gnome-xml-parser.html#COMMENTSAXFUNC"> <ANCHOR id ="WARNINGSAXFUNC" href="gnome-xml/gnome-xml-parser.html#WARNINGSAXFUNC"> <ANCHOR id ="ERRORSAXFUNC" href="gnome-xml/gnome-xml-parser.html#ERRORSAXFUNC"> <ANCHOR id ="FATALERRORSAXFUNC" href="gnome-xml/gnome-xml-parser.html#FATALERRORSAXFUNC"> +<ANCHOR id ="ISSTANDALONESAXFUNC" href="gnome-xml/gnome-xml-parser.html#ISSTANDALONESAXFUNC"> +<ANCHOR id ="HASINTERNALSUBSETSAXFUNC" href="gnome-xml/gnome-xml-parser.html#HASINTERNALSUBSETSAXFUNC"> +<ANCHOR id ="HASEXTERNALSUBSETSAXFUNC" href="gnome-xml/gnome-xml-parser.html#HASEXTERNALSUBSETSAXFUNC"> <ANCHOR id ="XMLSAXHANDLERPTR" href="gnome-xml/gnome-xml-parser.html#XMLSAXHANDLERPTR"> <ANCHOR id ="XMLSTRDUP" href="gnome-xml/gnome-xml-parser.html#XMLSTRDUP"> <ANCHOR id ="XMLSTRNDUP" href="gnome-xml/gnome-xml-parser.html#XMLSTRNDUP"> @@ -73,6 +83,14 @@ <ANCHOR id ="XMLNODEPTR" href="gnome-xml/gnome-xml-tree.html#XMLNODEPTR"> <ANCHOR id ="XMLDOC" href="gnome-xml/gnome-xml-tree.html#XMLDOC"> <ANCHOR id ="XMLDOCPTR" href="gnome-xml/gnome-xml-tree.html#XMLDOCPTR"> +<ANCHOR id ="XMLBUFFER" href="gnome-xml/gnome-xml-tree.html#XMLBUFFER"> +<ANCHOR id ="XMLBUFFERPTR" href="gnome-xml/gnome-xml-tree.html#XMLBUFFERPTR"> +<ANCHOR id ="XMLBUFFERCREATE" href="gnome-xml/gnome-xml-tree.html#XMLBUFFERCREATE"> +<ANCHOR id ="XMLBUFFERFREE" href="gnome-xml/gnome-xml-tree.html#XMLBUFFERFREE"> +<ANCHOR id ="XMLBUFFERDUMP" href="gnome-xml/gnome-xml-tree.html#XMLBUFFERDUMP"> +<ANCHOR id ="XMLBUFFERADD" href="gnome-xml/gnome-xml-tree.html#XMLBUFFERADD"> +<ANCHOR id ="XMLBUFFERCAT" href="gnome-xml/gnome-xml-tree.html#XMLBUFFERCAT"> +<ANCHOR id ="XMLBUFFERCCAT" href="gnome-xml/gnome-xml-tree.html#XMLBUFFERCCAT"> <ANCHOR id ="XMLCREATEINTSUBSET" href="gnome-xml/gnome-xml-tree.html#XMLCREATEINTSUBSET"> <ANCHOR id ="XMLNEWDTD" href="gnome-xml/gnome-xml-tree.html#XMLNEWDTD"> <ANCHOR id ="XMLFREEDTD" href="gnome-xml/gnome-xml-tree.html#XMLFREEDTD"> @@ -183,6 +201,18 @@ <ANCHOR id ="XMLPARSERERROR" href="gnome-xml/gnome-xml-xml-error.html#XMLPARSERERROR"> <ANCHOR id ="XMLPARSERWARNING" href="gnome-xml/gnome-xml-xml-error.html#XMLPARSERWARNING"> <ANCHOR id ="GNOME-XML-PARSERINTERNALS" href="gnome-xml/gnome-xml-parserinternals.html"> +<ANCHOR id ="IS-CHAR" href="gnome-xml/gnome-xml-parserinternals.html#IS-CHAR"> +<ANCHOR id ="IS-BLANK" href="gnome-xml/gnome-xml-parserinternals.html#IS-BLANK"> +<ANCHOR id ="IS-BASECHAR" href="gnome-xml/gnome-xml-parserinternals.html#IS-BASECHAR"> +<ANCHOR id ="IS-DIGIT" href="gnome-xml/gnome-xml-parserinternals.html#IS-DIGIT"> +<ANCHOR id ="IS-COMBINING" href="gnome-xml/gnome-xml-parserinternals.html#IS-COMBINING"> +<ANCHOR id ="IS-EXTENDER" href="gnome-xml/gnome-xml-parserinternals.html#IS-EXTENDER"> +<ANCHOR id ="IS-IDEOGRAPHIC" href="gnome-xml/gnome-xml-parserinternals.html#IS-IDEOGRAPHIC"> +<ANCHOR id ="IS-LETTER" href="gnome-xml/gnome-xml-parserinternals.html#IS-LETTER"> +<ANCHOR id ="IS-PUBIDCHAR" href="gnome-xml/gnome-xml-parserinternals.html#IS-PUBIDCHAR"> +<ANCHOR id ="SKIP-EOL" href="gnome-xml/gnome-xml-parserinternals.html#SKIP-EOL"> +<ANCHOR id ="MOVETO-ENDTAG" href="gnome-xml/gnome-xml-parserinternals.html#MOVETO-ENDTAG"> +<ANCHOR id ="MOVETO-STARTTAG" href="gnome-xml/gnome-xml-parserinternals.html#MOVETO-STARTTAG"> <ANCHOR id ="XMLCREATEDOCPARSERCTXT" href="gnome-xml/gnome-xml-parserinternals.html#XMLCREATEDOCPARSERCTXT"> <ANCHOR id ="XMLCREATEFILEPARSERCTXT" href="gnome-xml/gnome-xml-parserinternals.html#XMLCREATEFILEPARSERCTXT"> <ANCHOR id ="XMLCREATEMEMORYPARSERCTXT" href="gnome-xml/gnome-xml-parserinternals.html#XMLCREATEMEMORYPARSERCTXT"> @@ -192,6 +222,7 @@ <ANCHOR id ="XMLPUSHINPUT" href="gnome-xml/gnome-xml-parserinternals.html#XMLPUSHINPUT"> <ANCHOR id ="XMLPOPINPUT" href="gnome-xml/gnome-xml-parserinternals.html#XMLPOPINPUT"> <ANCHOR id ="XMLFREEINPUTSTREAM" href="gnome-xml/gnome-xml-parserinternals.html#XMLFREEINPUTSTREAM"> +<ANCHOR id ="XMLSPLITQNAME" href="gnome-xml/gnome-xml-parserinternals.html#XMLSPLITQNAME"> <ANCHOR id ="XMLNAMESPACEPARSENCNAME" href="gnome-xml/gnome-xml-parserinternals.html#XMLNAMESPACEPARSENCNAME"> <ANCHOR id ="XMLNAMESPACEPARSEQNAME" href="gnome-xml/gnome-xml-parserinternals.html#XMLNAMESPACEPARSEQNAME"> <ANCHOR id ="XMLNAMESPACEPARSENSDEF" href="gnome-xml/gnome-xml-parserinternals.html#XMLNAMESPACEPARSENSDEF"> @@ -523,15 +523,13 @@ xmlCopyEntitiesTable(xmlEntitiesTablePtr table) { /** * xmlDumpEntitiesTable: + * @buf: An XML buffer. * @table: An entity table * * This will dump the content of the entity table as an XML DTD definition - * - * NOTE: TODO an extra parameter allowing a reentant implementation will - * be added. */ void -xmlDumpEntitiesTable(xmlEntitiesTablePtr table) { +xmlDumpEntitiesTable(xmlBufferPtr buf, xmlEntitiesTablePtr table) { int i; xmlEntityPtr cur; @@ -541,70 +539,70 @@ xmlDumpEntitiesTable(xmlEntitiesTablePtr table) { cur = &table->table[i]; switch (cur->type) { case XML_INTERNAL_GENERAL_ENTITY: - xmlBufferWriteChar("<!ENTITY "); - xmlBufferWriteCHAR(cur->name); - xmlBufferWriteChar(" \""); - xmlBufferWriteCHAR(cur->content); - xmlBufferWriteChar("\">\n"); + xmlBufferWriteChar(buf, "<!ENTITY "); + xmlBufferWriteCHAR(buf, cur->name); + xmlBufferWriteChar(buf, " \""); + xmlBufferWriteCHAR(buf, cur->content); + xmlBufferWriteChar(buf, "\">\n"); break; case XML_EXTERNAL_GENERAL_PARSED_ENTITY: - xmlBufferWriteChar("<!ENTITY "); - xmlBufferWriteCHAR(cur->name); + xmlBufferWriteChar(buf, "<!ENTITY "); + xmlBufferWriteCHAR(buf, cur->name); if (cur->ExternalID != NULL) { - xmlBufferWriteChar(" PUBLIC \""); - xmlBufferWriteCHAR(cur->ExternalID); - xmlBufferWriteChar("\" \""); - xmlBufferWriteCHAR(cur->SystemID); - xmlBufferWriteChar("\""); + xmlBufferWriteChar(buf, " PUBLIC \""); + xmlBufferWriteCHAR(buf, cur->ExternalID); + xmlBufferWriteChar(buf, "\" \""); + xmlBufferWriteCHAR(buf, cur->SystemID); + xmlBufferWriteChar(buf, "\""); } else { - xmlBufferWriteChar(" SYSTEM \""); - xmlBufferWriteCHAR(cur->SystemID); - xmlBufferWriteChar("\""); + xmlBufferWriteChar(buf, " SYSTEM \""); + xmlBufferWriteCHAR(buf, cur->SystemID); + xmlBufferWriteChar(buf, "\""); } - xmlBufferWriteChar(">\n"); + xmlBufferWriteChar(buf, ">\n"); break; case XML_EXTERNAL_GENERAL_UNPARSED_ENTITY: - xmlBufferWriteChar("<!ENTITY "); - xmlBufferWriteCHAR(cur->name); + xmlBufferWriteChar(buf, "<!ENTITY "); + xmlBufferWriteCHAR(buf, cur->name); if (cur->ExternalID != NULL) { - xmlBufferWriteChar(" PUBLIC \""); - xmlBufferWriteCHAR(cur->ExternalID); - xmlBufferWriteChar("\" \""); - xmlBufferWriteCHAR(cur->SystemID); - xmlBufferWriteChar("\""); + xmlBufferWriteChar(buf, " PUBLIC \""); + xmlBufferWriteCHAR(buf, cur->ExternalID); + xmlBufferWriteChar(buf, "\" \""); + xmlBufferWriteCHAR(buf, cur->SystemID); + xmlBufferWriteChar(buf, "\""); } else { - xmlBufferWriteChar(" SYSTEM \""); - xmlBufferWriteCHAR(cur->SystemID); - xmlBufferWriteChar("\""); + xmlBufferWriteChar(buf, " SYSTEM \""); + xmlBufferWriteCHAR(buf, cur->SystemID); + xmlBufferWriteChar(buf, "\""); } if (cur->content != NULL) { /* Should be true ! */ - xmlBufferWriteChar(" NDATA "); - xmlBufferWriteCHAR(cur->content); + xmlBufferWriteChar(buf, " NDATA "); + xmlBufferWriteCHAR(buf, cur->content); } - xmlBufferWriteChar(">\n"); + xmlBufferWriteChar(buf, ">\n"); break; case XML_INTERNAL_PARAMETER_ENTITY: - xmlBufferWriteChar("<!ENTITY % "); - xmlBufferWriteCHAR(cur->name); - xmlBufferWriteChar(" \""); - xmlBufferWriteCHAR(cur->content); - xmlBufferWriteChar("\">\n"); + xmlBufferWriteChar(buf, "<!ENTITY % "); + xmlBufferWriteCHAR(buf, cur->name); + xmlBufferWriteChar(buf, " \""); + xmlBufferWriteCHAR(buf, cur->content); + xmlBufferWriteChar(buf, "\">\n"); break; case XML_EXTERNAL_PARAMETER_ENTITY: - xmlBufferWriteChar("<!ENTITY % "); - xmlBufferWriteCHAR(cur->name); + xmlBufferWriteChar(buf, "<!ENTITY % "); + xmlBufferWriteCHAR(buf, cur->name); if (cur->ExternalID != NULL) { - xmlBufferWriteChar(" PUBLIC \""); - xmlBufferWriteCHAR(cur->ExternalID); - xmlBufferWriteChar("\" \""); - xmlBufferWriteCHAR(cur->SystemID); - xmlBufferWriteChar("\""); + xmlBufferWriteChar(buf, " PUBLIC \""); + xmlBufferWriteCHAR(buf, cur->ExternalID); + xmlBufferWriteChar(buf, "\" \""); + xmlBufferWriteCHAR(buf, cur->SystemID); + xmlBufferWriteChar(buf, "\""); } else { - xmlBufferWriteChar(" SYSTEM \""); - xmlBufferWriteCHAR(cur->SystemID); - xmlBufferWriteChar("\""); + xmlBufferWriteChar(buf, " SYSTEM \""); + xmlBufferWriteCHAR(buf, cur->SystemID); + xmlBufferWriteChar(buf, "\""); } - xmlBufferWriteChar(">\n"); + xmlBufferWriteChar(buf, ">\n"); break; default: fprintf(stderr, @@ -69,7 +69,7 @@ CHAR *xmlEncodeEntities(xmlDocPtr doc, const CHAR *input); xmlEntitiesTablePtr xmlCreateEntitiesTable(void); xmlEntitiesTablePtr xmlCopyEntitiesTable(xmlEntitiesTablePtr table); void xmlFreeEntitiesTable(xmlEntitiesTablePtr table); -void xmlDumpEntitiesTable(xmlEntitiesTablePtr table); +void xmlDumpEntitiesTable(xmlBufferPtr buf, xmlEntitiesTablePtr table); xmlParserInputPtr xmlNewEntityInputStream(xmlParserCtxtPtr ctxt, xmlEntityPtr entity); xmlEntitiesTablePtr xmlCopyEntitiesTable(xmlEntitiesTablePtr table); diff --git a/include/libxml/entities.h b/include/libxml/entities.h index 89770547..5d6506d9 100644 --- a/include/libxml/entities.h +++ b/include/libxml/entities.h @@ -69,7 +69,7 @@ CHAR *xmlEncodeEntities(xmlDocPtr doc, const CHAR *input); xmlEntitiesTablePtr xmlCreateEntitiesTable(void); xmlEntitiesTablePtr xmlCopyEntitiesTable(xmlEntitiesTablePtr table); void xmlFreeEntitiesTable(xmlEntitiesTablePtr table); -void xmlDumpEntitiesTable(xmlEntitiesTablePtr table); +void xmlDumpEntitiesTable(xmlBufferPtr buf, xmlEntitiesTablePtr table); xmlParserInputPtr xmlNewEntityInputStream(xmlParserCtxtPtr ctxt, xmlEntityPtr entity); xmlEntitiesTablePtr xmlCopyEntitiesTable(xmlEntitiesTablePtr table); diff --git a/include/libxml/tree.h b/include/libxml/tree.h index 3f00aa09..ff6b55f7 100644 --- a/include/libxml/tree.h +++ b/include/libxml/tree.h @@ -241,6 +241,18 @@ typedef _xmlDoc xmlDoc; typedef xmlDoc *xmlDocPtr; /* + * A buffer structure + */ + +typedef struct xmlBuffer { + CHAR *content; /* The buffer content UTF8 */ + unsigned int use; /* The buffer size used */ + unsigned int size; /* The buffer size */ +} _xmlBuffer; +typedef _xmlBuffer xmlBuffer; +typedef xmlBuffer *xmlBufferPtr; + +/* * Variables. */ extern xmlNsPtr baseDTD; @@ -248,6 +260,17 @@ extern int oldXMLWDcompatibility;/* maintain compatibility with old WD */ extern int xmlIndentTreeOutput; /* try to indent the tree dumps */ /* + * Handling Buffers. + */ + +xmlBufferPtr xmlBufferCreate(void); +void xmlBufferFree(xmlBufferPtr buf); +int xmlBufferDump(FILE *file, xmlBufferPtr buf); +void xmlBufferAdd(xmlBufferPtr buf, const CHAR *str, int len); +void xmlBufferCat(xmlBufferPtr buf, const CHAR *str); +void xmlBufferCCat(xmlBufferPtr buf, const char *str); + +/* * Creating/freeing new structures */ xmlDtdPtr xmlCreateIntSubset(xmlDocPtr doc, const CHAR *name, @@ -337,8 +360,8 @@ CHAR *xmlNodeGetContent(xmlNodePtr cur); /* * Internal, don't use */ -void xmlBufferWriteCHAR(const CHAR *string); -void xmlBufferWriteChar(const char *string); +void xmlBufferWriteCHAR(xmlBufferPtr buf, const CHAR *string); +void xmlBufferWriteChar(xmlBufferPtr buf, const char *string); /* * Saving diff --git a/include/libxml/valid.h b/include/libxml/valid.h index 22c824ab..084d97fa 100644 --- a/include/libxml/valid.h +++ b/include/libxml/valid.h @@ -58,7 +58,7 @@ xmlNotationPtr xmlAddNotationDecl(xmlDtdPtr dtd, const CHAR *name, const CHAR *PublicID, const CHAR *SystemID); xmlNotationTablePtr xmlCopyNotationTable(xmlNotationTablePtr table); void xmlFreeNotationTable(xmlNotationTablePtr table); -void xmlDumpNotationTable(xmlNotationTablePtr table); +void xmlDumpNotationTable(xmlBufferPtr buf, xmlNotationTablePtr table); /* Element Content */ xmlElementContentPtr xmlNewElementContent(CHAR *name, int type); @@ -70,7 +70,7 @@ xmlElementPtr xmlAddElementDecl(xmlDtdPtr dtd, const CHAR *name, int type, xmlElementContentPtr content); xmlElementTablePtr xmlCopyElementTable(xmlElementTablePtr table); void xmlFreeElementTable(xmlElementTablePtr table); -void xmlDumpElementTable(xmlElementTablePtr table); +void xmlDumpElementTable(xmlBufferPtr buf, xmlElementTablePtr table); /* Enumeration */ xmlEnumerationPtr xmlCreateEnumeration(CHAR *name); @@ -83,6 +83,6 @@ xmlAttributePtr xmlAddAttributeDecl(xmlDtdPtr dtd, const CHAR *elem, const CHAR *defaultValue, xmlEnumerationPtr tree); xmlAttributeTablePtr xmlCopyAttributeTable(xmlAttributeTablePtr table); void xmlFreeAttributeTable(xmlAttributeTablePtr table); -void xmlDumpAttributeTable(xmlAttributeTablePtr table); +void xmlDumpAttributeTable(xmlBufferPtr buf, xmlAttributeTablePtr table); #endif /* __XML_VALID_H__ */ @@ -4337,7 +4337,7 @@ xmlFreeParserCtxt(xmlParserCtxtPtr ctxt) if (ctxt->nodeTab != NULL) free(ctxt->nodeTab); if (ctxt->inputTab != NULL) free(ctxt->inputTab); - if (ctxt->version != NULL) free(ctxt->version); + if (ctxt->version != NULL) free((char *) ctxt->version); free(ctxt); } diff --git a/testSAX.c b/testSAX.c new file mode 100644 index 00000000..2ce82cb6 --- /dev/null +++ b/testSAX.c @@ -0,0 +1,599 @@ +/* + * tester.c : a small tester program for parsing using the SAX API. + * + * See Copyright for the status of this software. + * + * Daniel.Veillard@w3.org + */ + +#ifdef WIN32 +#define HAVE_FCNTL_H +#include <io.h> +#else +#include <config.h> +#endif +#include <sys/types.h> +#ifdef HAVE_SYS_STAT_H +#include <sys/stat.h> +#endif +#ifdef HAVE_FCNTL_H +#include <fcntl.h> +#endif +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif +#include <stdio.h> +#include <string.h> +#include <stdlib.h> +#include <stdarg.h> + +#include "parser.h" +#include "tree.h" +#include "debugXML.h" + +static int debug = 0; +static int copy = 0; +static int recovery = 0; + +xmlSAXHandler emptySAXHandlerStruct = { + NULL, /* internalSubset */ + NULL, /* isStandalone */ + NULL, /* hasInternalSubset */ + NULL, /* hasExternalSubset */ + NULL, /* resolveEntity */ + NULL, /* getEntity */ + NULL, /* entityDecl */ + NULL, /* notationDecl */ + NULL, /* attributeDecl */ + NULL, /* elementDecl */ + NULL, /* unparsedEntityDecl */ + NULL, /* setDocumentLocator */ + NULL, /* startDocument */ + NULL, /* endDocument */ + NULL, /* startElement */ + NULL, /* endElement */ + NULL, /* reference */ + NULL, /* characters */ + NULL, /* ignorableWhitespace */ + NULL, /* processingInstruction */ + NULL, /* comment */ + NULL, /* xmlParserWarning */ + NULL, /* xmlParserError */ + NULL, /* xmlParserError */ +}; + +xmlSAXHandlerPtr emptySAXHandler = &emptySAXHandlerStruct; + +/* + * Note: there is a couple of errors introduced on purpose. + */ +static CHAR buffer[] = +"<?xml version=\"1.0\"?>\n\ +<?xml:namespace ns = \"http://www.ietf.org/standards/dav/\" prefix = \"D\"?>\n\ +<?xml:namespace ns = \"http://www.w3.com/standards/z39.50/\" prefix = \"Z\"?>\n\ +<D:propertyupdate>\n\ +<D:set a=\"'toto'\" b>\n\ + <D:prop>\n\ + <Z:authors>\n\ + <Z:Author>Jim Whitehead</Z:Author>\n\ + <Z:Author>Roy Fielding</Z:Author>\n\ + </Z:authors>\n\ + </D:prop>\n\ + </D:set>\n\ + <D:remove>\n\ + <D:prop><Z:Copyright-Owner/></D:prop>\n\ + </D:remove>\n\ +</D:propertyupdate>\n\ +\n\ +"; + +/************************************************************************ + * * + * Debug Handlers * + * * + ************************************************************************/ + +/** + * isStandaloneDebug: + * @ctxt: An XML parser context + * + * Is this document tagged standalone ? + * + * Returns 1 if true + */ +int +isStandaloneDebug(xmlParserCtxtPtr ctxt) +{ + fprintf(stderr, "SAX.isStandalone()\n"); + return(0); +} + +/** + * hasInternalSubsetDebug: + * @ctxt: An XML parser context + * + * Does this document has an internal subset + * + * Returns 1 if true + */ +int +hasInternalSubsetDebug(xmlParserCtxtPtr ctxt) +{ + fprintf(stderr, "SAX.hasInternalSubset()\n"); + return(0); +} + +/** + * hasExternalSubsetDebug: + * @ctxt: An XML parser context + * + * Does this document has an external subset + * + * Returns 1 if true + */ +int +hasExternalSubsetDebug(xmlParserCtxtPtr ctxt) +{ + fprintf(stderr, "SAX.hasExternalSubset()\n"); + return(0); +} + +/** + * hasInternalSubsetDebug: + * @ctxt: An XML parser context + * + * Does this document has an internal subset + */ +void +internalSubsetDebug(xmlParserCtxtPtr ctxt, const CHAR *name, + const CHAR *ExternalID, const CHAR *SystemID) +{ + fprintf(stderr, "SAX.internalSubset(%s, %s, %s)\n", + name, ExternalID, SystemID); +} + +/** + * resolveEntityDebug: + * @ctxt: An XML parser context + * @publicId: The public ID of the entity + * @systemId: The system ID of the entity + * + * Special entity resolver, better left to the parser, it has + * more context than the application layer. + * The default behaviour is to NOT resolve the entities, in that case + * the ENTITY_REF nodes are built in the structure (and the parameter + * values). + * + * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour. + */ +xmlParserInputPtr +resolveEntityDebug(xmlParserCtxtPtr ctxt, const CHAR *publicId, const CHAR *systemId) +{ + fprintf(stderr, "SAX.resolveEntity(%s, %s)\n", + (char *)publicId, (char *)systemId); + return(NULL); +} + +/** + * getEntityDebug: + * @ctxt: An XML parser context + * @name: The entity name + * + * Get an entity by name + * + * Returns the xmlParserInputPtr if inlined or NULL for DOM behaviour. + */ +xmlEntityPtr +getEntityDebug(xmlParserCtxtPtr ctxt, const CHAR *name) +{ + fprintf(stderr, "SAX.getEntity(%s)\n", name); + return(NULL); +} + + +/** + * entityDeclDebug: + * @ctxt: An XML parser context + * @name: the entity name + * @type: the entity type + * @publicId: The public ID of the entity + * @systemId: The system ID of the entity + * @content: the entity value (without processing). + * + * An entity definition has been parsed + */ +void +entityDeclDebug(xmlParserCtxtPtr ctxt, const CHAR *name, int type, + const CHAR *publicId, const CHAR *systemId, CHAR *content) +{ + fprintf(stderr, "SAX.entityDecl(%s, %d, %s, %s, %s)\n", + name, type, publicId, systemId, content); +} + +/** + * attributeDeclDebug: + * @ctxt: An XML parser context + * @name: the attribute name + * @type: the attribute type + * + * An attribute definition has been parsed + */ +void +attributeDeclDebug(xmlParserCtxtPtr ctxt, const CHAR *elem, const CHAR *name, + int type, int def, const CHAR *defaultValue, + xmlEnumerationPtr tree) +{ + fprintf(stderr, "SAX.attributeDecl(%s, %s, %d, %d, %s, ...)\n", + elem, name, type, def, defaultValue); +} + +/** + * elementDeclDebug: + * @ctxt: An XML parser context + * @name: the element name + * @type: the element type + * @content: the element value (without processing). + * + * An element definition has been parsed + */ +void +elementDeclDebug(xmlParserCtxtPtr ctxt, const CHAR *name, int type, + xmlElementContentPtr content) +{ + fprintf(stderr, "SAX.elementDecl(%s, %d, ...)\n", + name, type); +} + +/** + * notationDeclDebug: + * @ctxt: An XML parser context + * @name: The name of the notation + * @publicId: The public ID of the entity + * @systemId: The system ID of the entity + * + * What to do when a notation declaration has been parsed. + * TODO Not handled currently. + */ +void +notationDeclDebug(xmlParserCtxtPtr ctxt, const CHAR *name, + const CHAR *publicId, const CHAR *systemId) +{ + fprintf(stderr, "SAX.notationDecl(%s, %s, %s)\n", + (char *) name, (char *) publicId, (char *) systemId); +} + +/** + * unparsedEntityDeclDebug: + * @ctxt: An XML parser context + * @name: The name of the entity + * @publicId: The public ID of the entity + * @systemId: The system ID of the entity + * @notationName: the name of the notation + * + * What to do when an unparsed entity declaration is parsed + * TODO Create an Entity node. + */ +void +unparsedEntityDeclDebug(xmlParserCtxtPtr ctxt, const CHAR *name, + const CHAR *publicId, const CHAR *systemId, + const CHAR *notationName) +{ + fprintf(stderr, "SAX.unparsedEntityDecl(%s, %s, %s, %s)\n", + (char *) name, (char *) publicId, (char *) systemId, + (char *) notationName); +} + +/** + * setDocumentLocatorDebug: + * @ctxt: An XML parser context + * @loc: A SAX Locator + * + * Receive the document locator at startup, actually xmlDefaultSAXLocator + * Everything is available on the context, so this is useless in our case. + */ +void +setDocumentLocatorDebug(xmlParserCtxtPtr ctxt, xmlSAXLocatorPtr loc) +{ + fprintf(stderr, "SAX.setDocumentLocator()\n"); +} + +/** + * startDocumentDebug: + * @ctxt: An XML parser context + * + * called when the document start being processed. + */ +void +startDocumentDebug(xmlParserCtxtPtr ctxt) +{ + fprintf(stderr, "SAX.startDocument()\n"); +} + +/** + * endDocumentDebug: + * @ctxt: An XML parser context + * + * called when the document end has been detected. + */ +void +endDocumentDebug(xmlParserCtxtPtr ctxt) +{ + fprintf(stderr, "SAX.endDocument()\n"); +} + +/** + * startElementDebug: + * @ctxt: An XML parser context + * @name: The element name + * + * called when an opening tag has been processed. + * TODO We currently have a small pblm with the arguments ... + */ +void +startElementDebug(xmlParserCtxtPtr ctxt, const CHAR *name, const CHAR **atts) +{ + int i; + + fprintf(stderr, "SAX.startElement(%s", (char *) name); + if (atts != NULL) { + for (i = 0;(atts[i] != NULL);i++) { + fprintf(stderr, ", %s='", atts[i++]); + fprintf(stderr, "%s'", atts[i]); + } + } + fprintf(stderr, ")\n"); +} + +/** + * endElementDebug: + * @ctxt: An XML parser context + * @name: The element name + * + * called when the end of an element has been detected. + */ +void +endElementDebug(xmlParserCtxtPtr ctxt, const CHAR *name) +{ + fprintf(stderr, "SAX.endElement(%s)\n", (char *) name); +} + +/** + * charactersDebug: + * @ctxt: An XML parser context + * @ch: a CHAR string + * @len: the number of CHAR + * + * receiving some chars from the parser. + * Question: how much at a time ??? + */ +void +charactersDebug(xmlParserCtxtPtr ctxt, const CHAR *ch, int len) +{ + fprintf(stderr, "SAX.characters(%.30s, %d)\n", (char *) ch, len); +} + +/** + * referenceDebug: + * @ctxt: An XML parser context + * @name: The entity name + * + * called when an entity reference is detected. + */ +void +referenceDebug(xmlParserCtxtPtr ctxt, const CHAR *name) +{ + fprintf(stderr, "SAX.reference(%s)\n", name); +} + +/** + * ignorableWhitespaceDebug: + * @ctxt: An XML parser context + * @ch: a CHAR string + * @start: the first char in the string + * @len: the number of CHAR + * + * receiving some ignorable whitespaces from the parser. + * Question: how much at a time ??? + */ +void +ignorableWhitespaceDebug(xmlParserCtxtPtr ctxt, const CHAR *ch, int len) +{ + fprintf(stderr, "SAX.ignorableWhitespace(%.30s, %d)\n", + (char *) ch, len); +} + +/** + * processingInstructionDebug: + * @ctxt: An XML parser context + * @target: the target name + * @data: the PI data's + * @len: the number of CHAR + * + * A processing instruction has been parsed. + */ +void +processingInstructionDebug(xmlParserCtxtPtr ctxt, const CHAR *target, + const CHAR *data) +{ + fprintf(stderr, "SAX.processingInstruction(%s, %s)\n", + (char *) target, (char *) data); +} + +/** + * commentDebug: + * @ctxt: An XML parser context + * @value: the comment content + * + * A comment has been parsed. + */ +void +commentDebug(xmlParserCtxtPtr ctxt, const CHAR *value) +{ + fprintf(stderr, "SAX.comment(%s)\n", value); +} + +/** + * warningDebug: + * @ctxt: An XML parser context + * @msg: the message to display/transmit + * @...: extra parameters for the message display + * + * Display and format a warning messages, gives file, line, position and + * extra parameters. + */ +void +warningDebug(xmlParserCtxtPtr ctxt, const char *msg, ...) +{ + va_list args; + + va_start(args, msg); + fprintf(stderr, "SAX.warning: "); + vfprintf(stderr, msg, args); + va_end(args); +} + +/** + * errorDebug: + * @ctxt: An XML parser context + * @msg: the message to display/transmit + * @...: extra parameters for the message display + * + * Display and format a error messages, gives file, line, position and + * extra parameters. + */ +void +errorDebug(xmlParserCtxtPtr ctxt, const char *msg, ...) +{ + va_list args; + + va_start(args, msg); + fprintf(stderr, "SAX.error: "); + vfprintf(stderr, msg, args); + va_end(args); +} + +/** + * fatalErrorDebug: + * @ctxt: An XML parser context + * @msg: the message to display/transmit + * @...: extra parameters for the message display + * + * Display and format a fatalError messages, gives file, line, position and + * extra parameters. + */ +void +fatalErrorDebug(xmlParserCtxtPtr ctxt, const char *msg, ...) +{ + va_list args; + + va_start(args, msg); + fprintf(stderr, "SAX.fatalError: "); + vfprintf(stderr, msg, args); + va_end(args); +} + +xmlSAXHandler debugSAXHandlerStruct = { + internalSubsetDebug, + isStandaloneDebug, + hasInternalSubsetDebug, + hasExternalSubsetDebug, + resolveEntityDebug, + getEntityDebug, + entityDeclDebug, + notationDeclDebug, + attributeDeclDebug, + elementDeclDebug, + unparsedEntityDeclDebug, + setDocumentLocatorDebug, + startDocumentDebug, + endDocumentDebug, + startElementDebug, + endElementDebug, + referenceDebug, + charactersDebug, + ignorableWhitespaceDebug, + processingInstructionDebug, + commentDebug, + warningDebug, + errorDebug, + fatalErrorDebug, +}; + +xmlSAXHandlerPtr debugSAXHandler = &debugSAXHandlerStruct; + +/************************************************************************ + * * + * Debug * + * * + ************************************************************************/ + +void parseAndPrintFile(char *filename) { + xmlDocPtr doc; + + /* + * Empty callbacks for checking + */ + doc = xmlSAXParseFile(emptySAXHandler, filename, 0); + if (doc != NULL) { + fprintf(stderr, "xmlSAXParseFile returned non-NULL\n"); + xmlDocDump(stdout, doc); + } + + /* + * Debug callback + */ + doc = xmlSAXParseFile(debugSAXHandler, filename, 0); + if (doc != NULL) { + fprintf(stderr, "xmlSAXParseFile returned non-NULL\n"); + xmlDocDump(stdout, doc); + } +} + +void parseAndPrintBuffer(CHAR *buf) { + xmlDocPtr doc; + + /* + * Empty callbacks for checking + */ + doc = xmlSAXParseDoc(emptySAXHandler, buf, 0); + if (doc != NULL) { + fprintf(stderr, "xmlSAXParseDoc returned non-NULL\n"); + xmlDocDump(stdout, doc); + } + + /* + * Debug callback + */ + doc = xmlSAXParseDoc(debugSAXHandler, buf, 0); + if (doc != NULL) { + fprintf(stderr, "xmlSAXParseDoc returned non-NULL\n"); + xmlDocDump(stdout, doc); + } +} + +int main(int argc, char **argv) { + int i; + int files = 0; + + for (i = 1; i < argc ; i++) { + if ((!strcmp(argv[i], "-debug")) || (!strcmp(argv[i], "--debug"))) + debug++; + else if ((!strcmp(argv[i], "-copy")) || (!strcmp(argv[i], "--copy"))) + copy++; + else if ((!strcmp(argv[i], "-recover")) || + (!strcmp(argv[i], "--recover"))) + recovery++; + } + for (i = 1; i < argc ; i++) { + if (argv[i][0] != '-') { + parseAndPrintFile(argv[i]); + files ++; + } + } + if (files == 0) { + printf("\nFirst test for the parser, with errors\n"); + parseAndPrintBuffer(buffer); + } + + return(0); +} @@ -1707,6 +1707,7 @@ xmlCopyDoc(xmlDocPtr doc, int recursive) { * of the values carried by this node child's (TEXT and ENTITY_REF). * Entity references are substitued. * Returns a new CHAR * or NULL if no content is available. + * It's up to the caller to free the memory. */ CHAR * xmlNodeGetContent(xmlNodePtr cur) { @@ -2106,105 +2107,228 @@ xmlTextConcat(xmlNodePtr node, const CHAR *content, int len) { * * ************************************************************************/ -static CHAR *buffer = NULL; -static int buffer_index = 0; -static int buffer_size = 0; +#define BASE_BUFFER_SIZE 4000 /** - * xmlBufferWriteCHAR: - * @string: the string to add + * xmlBufferCreate: * - * routine which manage and grows an output buffer. This one add - * CHARs at the end of the array. + * routine to create an XML buffer. + * returns the new structure. + */ +xmlBufferPtr +xmlBufferCreate(void) { + xmlBufferPtr ret; + + ret = (xmlBufferPtr) malloc(sizeof(xmlBuffer)); + if (ret == NULL) { + fprintf(stderr, "xmlBufferCreate : out of memory!\n"); + return(NULL); + } + ret->use = 0; + ret->size = BASE_BUFFER_SIZE; + ret->content = (CHAR *) malloc(ret->size * sizeof(CHAR)); + if (ret->content == NULL) { + fprintf(stderr, "xmlBufferCreate : out of memory!\n"); + free(ret); + return(NULL); + } + ret->content[0] = 0; + return(ret); +} + +/** + * xmlBufferFree: + * @buf: the buffer to free + * + * Frees an XML buffer. */ void -xmlBufferWriteCHAR(const CHAR *string) { +xmlBufferFree(xmlBufferPtr buf) { + if (buf == NULL) { + fprintf(stderr, "xmlBufferFree: buf == NULL\n"); + return; + } + if (buf->content == NULL) { + fprintf(stderr, "xmlBufferFree: buf->content == NULL\n"); + } else { + memset(buf->content, -1, BASE_BUFFER_SIZE); + free(buf->content); + } + memset(buf, -1, sizeof(xmlBuffer)); + free(buf); +} + +/** + * xmlBufferDump: + * @file: the file output + * @buf: the buffer to dump + * + * Dumps an XML buffer to a FILE *. + * Returns the number of CHAR written + */ +int +xmlBufferDump(FILE *file, xmlBufferPtr buf) { + int ret; + + if (buf == NULL) { + fprintf(stderr, "xmlBufferDump: buf == NULL\n"); + return(0); + } + if (buf->content == NULL) { + fprintf(stderr, "xmlBufferDump: buf->content == NULL\n"); + return(0); + } + if (file == NULL) file = stdout; + ret = fwrite(buf->content, sizeof(CHAR), buf->use, file); + return(ret); +} + +/** + * xmlBufferAdd: + * @buf: the buffer to dump + * @str: the CHAR string + * @len: the number of CHAR to add + * + * Add a string range to an XML buffer. + */ +void +xmlBufferAdd(xmlBufferPtr buf, const CHAR *str, int len) { const CHAR *cur; - if (buffer == NULL) { - buffer_size = 50000; - buffer = (CHAR *) malloc(buffer_size * sizeof(CHAR)); - if (buffer == NULL) { - fprintf(stderr, "xmlBufferWrite : out of memory!\n"); - exit(1); + if (str == NULL) { + fprintf(stderr, "xmlBufferAdd: str == NULL\n"); + return; + } + for (cur = str;(len > 0) && (*cur != 0);cur++, len--) { + if (buf->use + 10 >= buf->size) { + CHAR *rebuf; + + buf->size *= 2; + rebuf = (CHAR *) realloc(buf->content, buf->size * sizeof(CHAR)); + if (rebuf == NULL) { + fprintf(stderr, "xmlBufferAdd : out of memory!\n"); + return; + } + buf->content = rebuf; } + buf->content[buf->use++] = *cur; } - - if (string == NULL) return; - for (cur = string;*cur != 0;cur++) { - if (buffer_index + 10 >= buffer_size) { - buffer_size *= 2; - buffer = (CHAR *) realloc(buffer, buffer_size * sizeof(CHAR)); - if (buffer == NULL) { - fprintf(stderr, "xmlBufferWrite : out of memory!\n"); - exit(1); +} + +/** + * xmlBufferCat: + * @buf: the buffer to dump + * @str: the CHAR string + * + * Append a zero terminated string to an XML buffer. + */ +void +xmlBufferCat(xmlBufferPtr buf, const CHAR *str) { + const CHAR *cur; + + if (str == NULL) { + fprintf(stderr, "xmlBufferAdd: str == NULL\n"); + return; + } + for (cur = str;*cur != 0;cur++) { + if (buf->use + 10 >= buf->size) { + CHAR *rebuf; + + buf->size *= 2; + rebuf = (CHAR *) realloc(buf->content, buf->size * sizeof(CHAR)); + if (rebuf == NULL) { + fprintf(stderr, "xmlBufferAdd : out of memory!\n"); + return; } + buf->content = rebuf; } - buffer[buffer_index++] = *cur; + buf->content[buf->use++] = *cur; } - buffer[buffer_index] = 0; } /** - * xmlBufferWriteChar: - * @string: the string to add + * xmlBufferCCat: + * @buf: the buffer to dump + * @str: the C char string * - * routine which manage and grows an output buffer. This one add - * C chars at the end of the array. + * Append a zero terminated C string to an XML buffer. */ void -xmlBufferWriteChar(const char *string) { +xmlBufferCCat(xmlBufferPtr buf, const char *str) { const char *cur; - if (buffer == NULL) { - buffer_size = 50000; - buffer = (CHAR *) malloc(buffer_size * sizeof(CHAR)); - if (buffer == NULL) { - fprintf(stderr, "xmlBufferWrite : out of memory!\n"); - exit(1); - } + if (str == NULL) { + fprintf(stderr, "xmlBufferAdd: str == NULL\n"); + return; } - - if (string == NULL) return; - for (cur = string;*cur != 0;cur++) { - if (buffer_index + 10 >= buffer_size) { - buffer_size *= 2; - buffer = (CHAR *) realloc(buffer, buffer_size * sizeof(CHAR)); - if (buffer == NULL) { - fprintf(stderr, "xmlBufferWrite : out of memory!\n"); - exit(1); + for (cur = str;*cur != 0;cur++) { + if (buf->use + 10 >= buf->size) { + CHAR *rebuf; + + buf->size *= 2; + rebuf = (CHAR *) realloc(buf->content, buf->size * sizeof(CHAR)); + if (rebuf == NULL) { + fprintf(stderr, "xmlBufferAdd : out of memory!\n"); + return; } + buf->content = rebuf; } - buffer[buffer_index++] = *cur; + buf->content[buf->use++] = *cur; } - buffer[buffer_index] = 0; } /** + * xmlBufferWriteCHAR: + * @buf: the XML buffer + * @string: the string to add + * + * routine which manage and grows an output buffer. This one add + * CHARs at the end of the buffer. + */ +void +xmlBufferWriteCHAR(xmlBufferPtr buf, const CHAR *string) { + xmlBufferCat(buf, string); +} + +/** + * xmlBufferWriteChar: + * @buf: the XML buffer + * @string: the string to add + * + * routine which manage and grows an output buffer. This one add + * C chars at the end of the array. + */ +void +xmlBufferWriteChar(xmlBufferPtr buf, const char *string) { + xmlBufferCCat(buf, string); +} + + +/** * xmlGlobalNsDump: * @cur: a namespace * * Dump a global Namespace, this is the old version based on PIs. */ static void -xmlGlobalNsDump(xmlNsPtr cur) { +xmlGlobalNsDump(xmlBufferPtr buf, xmlNsPtr cur) { if (cur == NULL) { fprintf(stderr, "xmlGlobalNsDump : Ns == NULL\n"); return; } if (cur->type == XML_GLOBAL_NAMESPACE) { - xmlBufferWriteChar("<?namespace"); + xmlBufferWriteChar(buf, "<?namespace"); if (cur->href != NULL) { - xmlBufferWriteChar(" href=\""); - xmlBufferWriteCHAR(cur->href); - xmlBufferWriteChar("\""); + xmlBufferWriteChar(buf, " href=\""); + xmlBufferWriteCHAR(buf, cur->href); + xmlBufferWriteChar(buf, "\""); } if (cur->prefix != NULL) { - xmlBufferWriteChar(" AS=\""); - xmlBufferWriteCHAR(cur->prefix); - xmlBufferWriteChar("\""); + xmlBufferWriteChar(buf, " AS=\""); + xmlBufferWriteCHAR(buf, cur->prefix); + xmlBufferWriteChar(buf, "\""); } - xmlBufferWriteChar("?>\n"); + xmlBufferWriteChar(buf, "?>\n"); } } @@ -2215,9 +2339,9 @@ xmlGlobalNsDump(xmlNsPtr cur) { * Dump a list of global Namespace, this is the old version based on PIs. */ static void -xmlGlobalNsListDump(xmlNsPtr cur) { +xmlGlobalNsListDump(xmlBufferPtr buf, xmlNsPtr cur) { while (cur != NULL) { - xmlGlobalNsDump(cur); + xmlGlobalNsDump(buf, cur); cur = cur->next; } } @@ -2230,7 +2354,7 @@ xmlGlobalNsListDump(xmlNsPtr cur) { * Should be called in the context of attributes dumps. */ static void -xmlNsDump(xmlNsPtr cur) { +xmlNsDump(xmlBufferPtr buf, xmlNsPtr cur) { if (cur == NULL) { fprintf(stderr, "xmlNsDump : Ns == NULL\n"); return; @@ -2238,13 +2362,13 @@ xmlNsDump(xmlNsPtr cur) { if (cur->type == XML_LOCAL_NAMESPACE) { /* Within the context of an element attributes */ if (cur->prefix != NULL) { - xmlBufferWriteChar(" xmlns:"); - xmlBufferWriteCHAR(cur->prefix); + xmlBufferWriteChar(buf, " xmlns:"); + xmlBufferWriteCHAR(buf, cur->prefix); } else - xmlBufferWriteChar(" xmlns"); - xmlBufferWriteChar("=\""); - xmlBufferWriteCHAR(cur->href); - xmlBufferWriteChar("\""); + xmlBufferWriteChar(buf, " xmlns"); + xmlBufferWriteChar(buf, "=\""); + xmlBufferWriteCHAR(buf, cur->href); + xmlBufferWriteChar(buf, "\""); } } @@ -2256,9 +2380,9 @@ xmlNsDump(xmlNsPtr cur) { * Should be called in the context of attributes dumps. */ static void -xmlNsListDump(xmlNsPtr cur) { +xmlNsListDump(xmlBufferPtr buf, xmlNsPtr cur) { while (cur != NULL) { - xmlNsDump(cur); + xmlNsDump(buf, cur); cur = cur->next; } } @@ -2270,44 +2394,44 @@ xmlNsListDump(xmlNsPtr cur) { * Dump the XML document DTD, if any. */ static void -xmlDtdDump(xmlDocPtr doc) { +xmlDtdDump(xmlBufferPtr buf, xmlDocPtr doc) { xmlDtdPtr cur = doc->intSubset; if (cur == NULL) { fprintf(stderr, "xmlDtdDump : no internal subset\n"); return; } - xmlBufferWriteChar("<!DOCTYPE "); - xmlBufferWriteCHAR(cur->name); + xmlBufferWriteChar(buf, "<!DOCTYPE "); + xmlBufferWriteCHAR(buf, cur->name); if (cur->ExternalID != NULL) { - xmlBufferWriteChar(" PUBLIC \""); - xmlBufferWriteCHAR(cur->ExternalID); - xmlBufferWriteChar("\" \""); - xmlBufferWriteCHAR(cur->SystemID); - xmlBufferWriteChar("\""); + xmlBufferWriteChar(buf, " PUBLIC \""); + xmlBufferWriteCHAR(buf, cur->ExternalID); + xmlBufferWriteChar(buf, "\" \""); + xmlBufferWriteCHAR(buf, cur->SystemID); + xmlBufferWriteChar(buf, "\""); } else if (cur->SystemID != NULL) { - xmlBufferWriteChar(" SYSTEM \""); - xmlBufferWriteCHAR(cur->SystemID); - xmlBufferWriteChar("\""); + xmlBufferWriteChar(buf, " SYSTEM \""); + xmlBufferWriteCHAR(buf, cur->SystemID); + xmlBufferWriteChar(buf, "\""); } if ((cur->entities == NULL) && (cur->elements == NULL) && (cur->attributes == NULL) && (cur->notations == NULL)) { - xmlBufferWriteChar(">\n"); + xmlBufferWriteChar(buf, ">\n"); return; } - xmlBufferWriteChar(" [\n"); + xmlBufferWriteChar(buf, " [\n"); if (cur->entities != NULL) - xmlDumpEntitiesTable((xmlEntitiesTablePtr) cur->entities); + xmlDumpEntitiesTable(buf, (xmlEntitiesTablePtr) cur->entities); if (cur->notations != NULL) - xmlDumpNotationTable((xmlNotationTablePtr) cur->notations); + xmlDumpNotationTable(buf, (xmlNotationTablePtr) cur->notations); if (cur->elements != NULL) - xmlDumpElementTable((xmlElementTablePtr) cur->elements); + xmlDumpElementTable(buf, (xmlElementTablePtr) cur->elements); if (cur->attributes != NULL) - xmlDumpAttributeTable((xmlAttributeTablePtr) cur->attributes); - xmlBufferWriteChar("]"); + xmlDumpAttributeTable(buf, (xmlAttributeTablePtr) cur->attributes); + xmlBufferWriteChar(buf, "]"); /* TODO !!! a lot more things to dump ... */ - xmlBufferWriteChar(">\n"); + xmlBufferWriteChar(buf, ">\n"); } /** @@ -2318,23 +2442,23 @@ xmlDtdDump(xmlDocPtr doc) { * Dump an XML attribute */ static void -xmlAttrDump(xmlDocPtr doc, xmlAttrPtr cur) { +xmlAttrDump(xmlBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur) { CHAR *value; if (cur == NULL) { fprintf(stderr, "xmlAttrDump : property == NULL\n"); return; } - xmlBufferWriteChar(" "); - xmlBufferWriteCHAR(cur->name); + xmlBufferWriteChar(buf, " "); + xmlBufferWriteCHAR(buf, cur->name); value = xmlNodeListGetString(doc, cur->val, 0); if (value) { - xmlBufferWriteChar("=\""); - xmlBufferWriteCHAR(value); - xmlBufferWriteChar("\""); + xmlBufferWriteChar(buf, "=\""); + xmlBufferWriteCHAR(buf, value); + xmlBufferWriteChar(buf, "\""); free(value); } else { - xmlBufferWriteChar("=\"\""); + xmlBufferWriteChar(buf, "=\"\""); } } @@ -2346,20 +2470,20 @@ xmlAttrDump(xmlDocPtr doc, xmlAttrPtr cur) { * Dump a list of XML attributes */ static void -xmlAttrListDump(xmlDocPtr doc, xmlAttrPtr cur) { +xmlAttrListDump(xmlBufferPtr buf, xmlDocPtr doc, xmlAttrPtr cur) { if (cur == NULL) { fprintf(stderr, "xmlAttrListDump : property == NULL\n"); return; } while (cur != NULL) { - xmlAttrDump(doc, cur); + xmlAttrDump(buf, doc, cur); cur = cur->next; } } static void -xmlNodeDump(xmlDocPtr doc, xmlNodePtr cur, int level); +xmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level); /** * xmlNodeListDump: * @doc: the document @@ -2369,7 +2493,7 @@ xmlNodeDump(xmlDocPtr doc, xmlNodePtr cur, int level); * Dump an XML node list, recursive behaviour,children are printed too. */ static void -xmlNodeListDump(xmlDocPtr doc, xmlNodePtr cur, int level) { +xmlNodeListDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level) { int needIndent = 0, i; if (cur == NULL) { @@ -2381,15 +2505,15 @@ xmlNodeListDump(xmlDocPtr doc, xmlNodePtr cur, int level) { (cur->type != XML_ENTITY_REF_NODE)) { if (!needIndent) { needIndent = 1; - xmlBufferWriteChar("\n"); + xmlBufferWriteChar(buf, "\n"); } } - xmlNodeDump(doc, cur, level); + xmlNodeDump(buf, doc, cur, level); cur = cur->next; } if ((xmlIndentTreeOutput) && (needIndent)) for (i = 1;i < level;i++) - xmlBufferWriteChar(" "); + xmlBufferWriteChar(buf, " "); } /** @@ -2401,7 +2525,7 @@ xmlNodeListDump(xmlDocPtr doc, xmlNodePtr cur, int level) { * Dump an XML node, recursive behaviour,children are printed too. */ static void -xmlNodeDump(xmlDocPtr doc, xmlNodePtr cur, int level) { +xmlNodeDump(xmlBufferPtr buf, xmlDocPtr doc, xmlNodePtr cur, int level) { int i; if (cur == NULL) { @@ -2410,57 +2534,57 @@ xmlNodeDump(xmlDocPtr doc, xmlNodePtr cur, int level) { } if (cur->type == XML_TEXT_NODE) { if (cur->content != NULL) - xmlBufferWriteCHAR(xmlEncodeEntities(doc, cur->content)); + xmlBufferWriteCHAR(buf, xmlEncodeEntities(doc, cur->content)); return; } if (cur->type == XML_COMMENT_NODE) { if (cur->content != NULL) { - xmlBufferWriteChar("<!--"); - xmlBufferWriteCHAR(cur->content); - xmlBufferWriteChar("-->"); + xmlBufferWriteChar(buf, "<!--"); + xmlBufferWriteCHAR(buf, cur->content); + xmlBufferWriteChar(buf, "-->"); } return; } if (cur->type == XML_ENTITY_REF_NODE) { - xmlBufferWriteChar("&"); - xmlBufferWriteCHAR(cur->name); - xmlBufferWriteChar(";"); + xmlBufferWriteChar(buf, "&"); + xmlBufferWriteCHAR(buf, cur->name); + xmlBufferWriteChar(buf, ";"); return; } if (xmlIndentTreeOutput) for (i = 0;i < level;i++) - xmlBufferWriteChar(" "); + xmlBufferWriteChar(buf, " "); - xmlBufferWriteChar("<"); + xmlBufferWriteChar(buf, "<"); if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) { - xmlBufferWriteCHAR(cur->ns->prefix); - xmlBufferWriteChar(":"); + xmlBufferWriteCHAR(buf, cur->ns->prefix); + xmlBufferWriteChar(buf, ":"); } - xmlBufferWriteCHAR(cur->name); + xmlBufferWriteCHAR(buf, cur->name); if (cur->nsDef) - xmlNsListDump(cur->nsDef); + xmlNsListDump(buf, cur->nsDef); if (cur->properties != NULL) - xmlAttrListDump(doc, cur->properties); + xmlAttrListDump(buf, doc, cur->properties); if ((cur->content == NULL) && (cur->childs == NULL)) { - xmlBufferWriteChar("/>\n"); + xmlBufferWriteChar(buf, "/>\n"); return; } - xmlBufferWriteChar(">"); + xmlBufferWriteChar(buf, ">"); if (cur->content != NULL) - xmlBufferWriteCHAR(xmlEncodeEntities(doc, cur->content)); + xmlBufferWriteCHAR(buf, xmlEncodeEntities(doc, cur->content)); if (cur->childs != NULL) { - xmlNodeListDump(doc, cur->childs, level + 1); + xmlNodeListDump(buf, doc, cur->childs, level + 1); } - xmlBufferWriteChar("</"); + xmlBufferWriteChar(buf, "</"); if ((cur->ns != NULL) && (cur->ns->prefix != NULL)) { - xmlBufferWriteCHAR(cur->ns->prefix); - xmlBufferWriteChar(":"); + xmlBufferWriteCHAR(buf, cur->ns->prefix); + xmlBufferWriteChar(buf, ":"); } - xmlBufferWriteCHAR(cur->name); - xmlBufferWriteChar(">\n"); + xmlBufferWriteCHAR(buf, cur->name); + xmlBufferWriteChar(buf, ">\n"); } /** @@ -2470,36 +2594,36 @@ xmlNodeDump(xmlDocPtr doc, xmlNodePtr cur, int level) { * Dump an XML document. */ static void -xmlDocContentDump(xmlDocPtr cur) { +xmlDocContentDump(xmlBufferPtr buf, xmlDocPtr cur) { if (oldXMLWDcompatibility) - xmlBufferWriteChar("<?XML version=\""); + xmlBufferWriteChar(buf, "<?XML version=\""); else - xmlBufferWriteChar("<?xml version=\""); - xmlBufferWriteCHAR(cur->version); - xmlBufferWriteChar("\""); + xmlBufferWriteChar(buf, "<?xml version=\""); + xmlBufferWriteCHAR(buf, cur->version); + xmlBufferWriteChar(buf, "\""); if (cur->encoding != NULL) { - xmlBufferWriteChar(" encoding=\""); - xmlBufferWriteCHAR(cur->encoding); - xmlBufferWriteChar("\""); + xmlBufferWriteChar(buf, " encoding=\""); + xmlBufferWriteCHAR(buf, cur->encoding); + xmlBufferWriteChar(buf, "\""); } switch (cur->standalone) { case 0: - xmlBufferWriteChar(" standalone=\"no\""); + xmlBufferWriteChar(buf, " standalone=\"no\""); break; case 1: - xmlBufferWriteChar(" standalone=\"yes\""); + xmlBufferWriteChar(buf, " standalone=\"yes\""); break; } - xmlBufferWriteChar("?>\n"); + xmlBufferWriteChar(buf, "?>\n"); if (cur->intSubset != NULL) - xmlDtdDump(cur); + xmlDtdDump(buf, cur); if (cur->root != NULL) { /* global namespace definitions, the old way */ if (oldXMLWDcompatibility) - xmlGlobalNsListDump(cur->oldNs); + xmlGlobalNsListDump(buf, cur->oldNs); else xmlUpgradeOldNs(cur); - xmlNodeDump(cur, cur->root, 0); + xmlNodeDump(buf, cur, cur->root, 0); } } @@ -2514,6 +2638,8 @@ xmlDocContentDump(xmlDocPtr cur) { */ void xmlDocDumpMemory(xmlDocPtr cur, CHAR**mem, int *size) { + xmlBufferPtr buf; + if (cur == NULL) { #ifdef DEBUG_TREE fprintf(stderr, "xmlDocDumpMemory : document == NULL\n"); @@ -2522,11 +2648,17 @@ xmlDocDumpMemory(xmlDocPtr cur, CHAR**mem, int *size) { *size = 0; return; } - buffer_index = 0; - xmlDocContentDump(cur); - - *mem = buffer; - *size = buffer_index; + buf = xmlBufferCreate(); + if (buf == NULL) { + *mem = NULL; + *size = 0; + return; + } + xmlDocContentDump(buf, cur); + *mem = buf->content; + *size = buf->use; + memset(buf, -1, sizeof(xmlBuffer)); + free(buf); } /** @@ -2592,16 +2724,19 @@ xmlSetCompressMode(int mode) { */ void xmlDocDump(FILE *f, xmlDocPtr cur) { + xmlBufferPtr buf; + if (cur == NULL) { #ifdef DEBUG_TREE fprintf(stderr, "xmlDocDump : document == NULL\n"); #endif return; } - buffer_index = 0; - xmlDocContentDump(cur); - - fwrite(buffer, sizeof(CHAR), buffer_index, f); + buf = xmlBufferCreate(); + if (buf == NULL) return; + xmlDocContentDump(buf, cur); + xmlBufferDump(f, buf); + xmlBufferFree(buf); } /** @@ -2615,6 +2750,7 @@ xmlDocDump(FILE *f, xmlDocPtr cur) { */ int xmlSaveFile(const char *filename, xmlDocPtr cur) { + xmlBufferPtr buf; #ifdef HAVE_ZLIB_H gzFile zoutput = NULL; char mode[15]; @@ -2622,6 +2758,13 @@ xmlSaveFile(const char *filename, xmlDocPtr cur) { FILE *output = NULL; int ret; + /* + * save the content to a temp buffer. + */ + buf = xmlBufferCreate(); + if (buf == NULL) return(0); + xmlDocContentDump(buf, cur); + #ifdef HAVE_ZLIB_H if ((cur->compression > 0) && (cur->compression <= 9)) { sprintf(mode, "w%d", cur->compression); @@ -2635,21 +2778,19 @@ xmlSaveFile(const char *filename, xmlDocPtr cur) { } #endif - /* - * save the content to a temp buffer. - */ - buffer_index = 0; - xmlDocContentDump(cur); + xmlDocContentDump(buf, cur); #ifdef HAVE_ZLIB_H if (zoutput != NULL) { - ret = gzwrite(zoutput, buffer, sizeof(CHAR) * buffer_index); + ret = gzwrite(zoutput, buf->content, sizeof(CHAR) * buf->use); gzclose(zoutput); - return(ret); + } else { +#endif + ret = xmlBufferDump(output, buf); + fclose(output); +#ifdef HAVE_ZLIB_H } #endif - ret = fwrite(buffer, sizeof(CHAR), buffer_index, output); - fclose(output); return(ret * sizeof(CHAR)); } @@ -241,6 +241,18 @@ typedef _xmlDoc xmlDoc; typedef xmlDoc *xmlDocPtr; /* + * A buffer structure + */ + +typedef struct xmlBuffer { + CHAR *content; /* The buffer content UTF8 */ + unsigned int use; /* The buffer size used */ + unsigned int size; /* The buffer size */ +} _xmlBuffer; +typedef _xmlBuffer xmlBuffer; +typedef xmlBuffer *xmlBufferPtr; + +/* * Variables. */ extern xmlNsPtr baseDTD; @@ -248,6 +260,17 @@ extern int oldXMLWDcompatibility;/* maintain compatibility with old WD */ extern int xmlIndentTreeOutput; /* try to indent the tree dumps */ /* + * Handling Buffers. + */ + +xmlBufferPtr xmlBufferCreate(void); +void xmlBufferFree(xmlBufferPtr buf); +int xmlBufferDump(FILE *file, xmlBufferPtr buf); +void xmlBufferAdd(xmlBufferPtr buf, const CHAR *str, int len); +void xmlBufferCat(xmlBufferPtr buf, const CHAR *str); +void xmlBufferCCat(xmlBufferPtr buf, const char *str); + +/* * Creating/freeing new structures */ xmlDtdPtr xmlCreateIntSubset(xmlDocPtr doc, const CHAR *name, @@ -337,8 +360,8 @@ CHAR *xmlNodeGetContent(xmlNodePtr cur); /* * Internal, don't use */ -void xmlBufferWriteCHAR(const CHAR *string); -void xmlBufferWriteChar(const char *string); +void xmlBufferWriteCHAR(xmlBufferPtr buf, const CHAR *string); +void xmlBufferWriteChar(xmlBufferPtr buf, const char *string); /* * Saving @@ -101,67 +101,65 @@ xmlFreeElementContent(xmlElementContentPtr cur) { /** * xmlDumpElementContent: + * @buf: An XML buffer * @content: An element table * @glob: 1 if one must print the englobing parenthesis, 0 otherwise * * This will dump the content of the element table as an XML DTD definition - * - * NOTE: TODO an extra parameter allowing a reentant implementation will - * be added. */ void -xmlDumpElementContent(xmlElementContentPtr content, int glob) { +xmlDumpElementContent(xmlBufferPtr buf, xmlElementContentPtr content, int glob) { if (content == NULL) return; - if (glob) xmlBufferWriteChar("("); + if (glob) xmlBufferWriteChar(buf, "("); switch (content->type) { case XML_ELEMENT_CONTENT_PCDATA: - xmlBufferWriteChar("#PCDATA"); + xmlBufferWriteChar(buf, "#PCDATA"); break; case XML_ELEMENT_CONTENT_ELEMENT: - xmlBufferWriteCHAR(content->name); + xmlBufferWriteCHAR(buf, content->name); break; case XML_ELEMENT_CONTENT_SEQ: if ((content->c1->type == XML_ELEMENT_CONTENT_OR) || (content->c1->type == XML_ELEMENT_CONTENT_SEQ)) - xmlDumpElementContent(content->c1, 1); + xmlDumpElementContent(buf, content->c1, 1); else - xmlDumpElementContent(content->c1, 0); - xmlBufferWriteChar(" , "); + xmlDumpElementContent(buf, content->c1, 0); + xmlBufferWriteChar(buf, " , "); if (content->c2->type == XML_ELEMENT_CONTENT_OR) - xmlDumpElementContent(content->c2, 1); + xmlDumpElementContent(buf, content->c2, 1); else - xmlDumpElementContent(content->c2, 0); + xmlDumpElementContent(buf, content->c2, 0); break; case XML_ELEMENT_CONTENT_OR: if ((content->c1->type == XML_ELEMENT_CONTENT_OR) || (content->c1->type == XML_ELEMENT_CONTENT_SEQ)) - xmlDumpElementContent(content->c1, 1); + xmlDumpElementContent(buf, content->c1, 1); else - xmlDumpElementContent(content->c1, 0); - xmlBufferWriteChar(" | "); + xmlDumpElementContent(buf, content->c1, 0); + xmlBufferWriteChar(buf, " | "); if (content->c2->type == XML_ELEMENT_CONTENT_SEQ) - xmlDumpElementContent(content->c2, 1); + xmlDumpElementContent(buf, content->c2, 1); else - xmlDumpElementContent(content->c2, 0); + xmlDumpElementContent(buf, content->c2, 0); break; default: fprintf(stderr, "xmlDumpElementContent: unknown type %d\n", content->type); } if (glob) - xmlBufferWriteChar(")"); + xmlBufferWriteChar(buf, ")"); switch (content->ocur) { case XML_ELEMENT_CONTENT_ONCE: break; case XML_ELEMENT_CONTENT_OPT: - xmlBufferWriteChar("?"); + xmlBufferWriteChar(buf, "?"); break; case XML_ELEMENT_CONTENT_MULT: - xmlBufferWriteChar("*"); + xmlBufferWriteChar(buf, "*"); break; case XML_ELEMENT_CONTENT_PLUS: - xmlBufferWriteChar("+"); + xmlBufferWriteChar(buf, "+"); break; } } @@ -404,7 +402,7 @@ xmlCopyElementTable(xmlElementTablePtr table) { * be added. */ void -xmlDumpElementTable(xmlElementTablePtr table) { +xmlDumpElementTable(xmlBufferPtr buf, xmlElementTablePtr table) { int i; xmlElementPtr cur; @@ -414,28 +412,28 @@ xmlDumpElementTable(xmlElementTablePtr table) { cur = &table->table[i]; switch (cur->type) { case XML_ELEMENT_TYPE_EMPTY: - xmlBufferWriteChar("<!ELEMENT "); - xmlBufferWriteCHAR(cur->name); - xmlBufferWriteChar(" EMPTY>\n"); + xmlBufferWriteChar(buf, "<!ELEMENT "); + xmlBufferWriteCHAR(buf, cur->name); + xmlBufferWriteChar(buf, " EMPTY>\n"); break; case XML_ELEMENT_TYPE_ANY: - xmlBufferWriteChar("<!ELEMENT "); - xmlBufferWriteCHAR(cur->name); - xmlBufferWriteChar(" ANY>\n"); + xmlBufferWriteChar(buf, "<!ELEMENT "); + xmlBufferWriteCHAR(buf, cur->name); + xmlBufferWriteChar(buf, " ANY>\n"); break; case XML_ELEMENT_TYPE_MIXED: - xmlBufferWriteChar("<!ELEMENT "); - xmlBufferWriteCHAR(cur->name); - xmlBufferWriteChar(" "); - xmlDumpElementContent(cur->content, 1); - xmlBufferWriteChar(">\n"); + xmlBufferWriteChar(buf, "<!ELEMENT "); + xmlBufferWriteCHAR(buf, cur->name); + xmlBufferWriteChar(buf, " "); + xmlDumpElementContent(buf, cur->content, 1); + xmlBufferWriteChar(buf, ">\n"); break; case XML_ELEMENT_TYPE_ELEMENT: - xmlBufferWriteChar("<!ELEMENT "); - xmlBufferWriteCHAR(cur->name); - xmlBufferWriteChar(" "); - xmlDumpElementContent(cur->content, 1); - xmlBufferWriteChar(">\n"); + xmlBufferWriteChar(buf, "<!ELEMENT "); + xmlBufferWriteCHAR(buf, cur->name); + xmlBufferWriteChar(buf, " "); + xmlDumpElementContent(buf, cur->content, 1); + xmlBufferWriteChar(buf, ">\n"); break; default: fprintf(stderr, @@ -765,7 +763,7 @@ xmlCopyAttributeTable(xmlAttributeTablePtr table) { * be added. */ void -xmlDumpAttributeTable(xmlAttributeTablePtr table) { +xmlDumpAttributeTable(xmlBufferPtr buf, xmlAttributeTablePtr table) { int i; xmlAttributePtr cur; @@ -773,40 +771,40 @@ xmlDumpAttributeTable(xmlAttributeTablePtr table) { for (i = 0;i < table->nb_attributes;i++) { cur = &table->table[i]; - xmlBufferWriteChar("<!ATTLIST "); - xmlBufferWriteCHAR(cur->elem); - xmlBufferWriteChar(" "); - xmlBufferWriteCHAR(cur->name); + xmlBufferWriteChar(buf, "<!ATTLIST "); + xmlBufferWriteCHAR(buf, cur->elem); + xmlBufferWriteChar(buf, " "); + xmlBufferWriteCHAR(buf, cur->name); switch (cur->type) { case XML_ATTRIBUTE_CDATA: - xmlBufferWriteChar(" CDATA"); + xmlBufferWriteChar(buf, " CDATA"); break; case XML_ATTRIBUTE_ID: - xmlBufferWriteChar(" ID"); + xmlBufferWriteChar(buf, " ID"); break; case XML_ATTRIBUTE_IDREF: - xmlBufferWriteChar(" IDREF"); + xmlBufferWriteChar(buf, " IDREF"); break; case XML_ATTRIBUTE_IDREFS: - xmlBufferWriteChar(" IDREFS"); + xmlBufferWriteChar(buf, " IDREFS"); break; case XML_ATTRIBUTE_ENTITY: - xmlBufferWriteChar(" ENTITY"); + xmlBufferWriteChar(buf, " ENTITY"); break; case XML_ATTRIBUTE_ENTITIES: - xmlBufferWriteChar(" ENTITIES"); + xmlBufferWriteChar(buf, " ENTITIES"); break; case XML_ATTRIBUTE_NMTOKEN: - xmlBufferWriteChar(" NMTOKEN"); + xmlBufferWriteChar(buf, " NMTOKEN"); break; case XML_ATTRIBUTE_NMTOKENS: - xmlBufferWriteChar(" NMTOKENS"); + xmlBufferWriteChar(buf, " NMTOKENS"); break; case XML_ATTRIBUTE_ENUMERATION: - xmlBufferWriteChar(" (pbm)"); + xmlBufferWriteChar(buf, " (pbm)"); break; case XML_ATTRIBUTE_NOTATION: - xmlBufferWriteChar(" NOTATION (pbm)"); + xmlBufferWriteChar(buf, " NOTATION (pbm)"); break; default: fprintf(stderr, @@ -817,27 +815,27 @@ xmlDumpAttributeTable(xmlAttributeTablePtr table) { case XML_ATTRIBUTE_NONE: break; case XML_ATTRIBUTE_REQUIRED: - xmlBufferWriteChar(" #REQUIRED"); + xmlBufferWriteChar(buf, " #REQUIRED"); break; case XML_ATTRIBUTE_IMPLIED: - xmlBufferWriteChar(" #IMPLIED"); + xmlBufferWriteChar(buf, " #IMPLIED"); if (cur->defaultValue != NULL) { - xmlBufferWriteChar(" \""); - xmlBufferWriteCHAR(cur->defaultValue); - xmlBufferWriteChar("\""); + xmlBufferWriteChar(buf, " \""); + xmlBufferWriteCHAR(buf, cur->defaultValue); + xmlBufferWriteChar(buf, "\""); } break; case XML_ATTRIBUTE_FIXED: - xmlBufferWriteChar(" #FIXED \""); - xmlBufferWriteCHAR(cur->defaultValue); - xmlBufferWriteChar("\""); + xmlBufferWriteChar(buf, " #FIXED \""); + xmlBufferWriteCHAR(buf, cur->defaultValue); + xmlBufferWriteChar(buf, "\""); break; default: fprintf(stderr, "xmlDumpAttributeTable: internal: unknown default %d\n", cur->def); } - xmlBufferWriteChar(">\n"); + xmlBufferWriteChar(buf, ">\n"); } } @@ -1063,7 +1061,7 @@ xmlCopyNotationTable(xmlNotationTablePtr table) { * be added. */ void -xmlDumpNotationTable(xmlNotationTablePtr table) { +xmlDumpNotationTable(xmlBufferPtr buf, xmlNotationTablePtr table) { int i; xmlNotationPtr cur; @@ -1071,20 +1069,20 @@ xmlDumpNotationTable(xmlNotationTablePtr table) { for (i = 0;i < table->nb_notations;i++) { cur = &table->table[i]; - xmlBufferWriteChar("<!NOTATION "); - xmlBufferWriteCHAR(cur->name); + xmlBufferWriteChar(buf, "<!NOTATION "); + xmlBufferWriteCHAR(buf, cur->name); if (cur->PublicID != NULL) { - xmlBufferWriteChar(" PUBLIC \""); - xmlBufferWriteCHAR(cur->PublicID); - xmlBufferWriteChar("\""); + xmlBufferWriteChar(buf, " PUBLIC \""); + xmlBufferWriteCHAR(buf, cur->PublicID); + xmlBufferWriteChar(buf, "\""); if (cur->SystemID != NULL) { - xmlBufferWriteChar(" "); - xmlBufferWriteCHAR(cur->SystemID); + xmlBufferWriteChar(buf, " "); + xmlBufferWriteCHAR(buf, cur->SystemID); } } else { - xmlBufferWriteChar(" SYSTEM "); - xmlBufferWriteCHAR(cur->SystemID); + xmlBufferWriteChar(buf, " SYSTEM "); + xmlBufferWriteCHAR(buf, cur->SystemID); } - xmlBufferWriteChar(" >\n"); + xmlBufferWriteChar(buf, " >\n"); } } @@ -58,7 +58,7 @@ xmlNotationPtr xmlAddNotationDecl(xmlDtdPtr dtd, const CHAR *name, const CHAR *PublicID, const CHAR *SystemID); xmlNotationTablePtr xmlCopyNotationTable(xmlNotationTablePtr table); void xmlFreeNotationTable(xmlNotationTablePtr table); -void xmlDumpNotationTable(xmlNotationTablePtr table); +void xmlDumpNotationTable(xmlBufferPtr buf, xmlNotationTablePtr table); /* Element Content */ xmlElementContentPtr xmlNewElementContent(CHAR *name, int type); @@ -70,7 +70,7 @@ xmlElementPtr xmlAddElementDecl(xmlDtdPtr dtd, const CHAR *name, int type, xmlElementContentPtr content); xmlElementTablePtr xmlCopyElementTable(xmlElementTablePtr table); void xmlFreeElementTable(xmlElementTablePtr table); -void xmlDumpElementTable(xmlElementTablePtr table); +void xmlDumpElementTable(xmlBufferPtr buf, xmlElementTablePtr table); /* Enumeration */ xmlEnumerationPtr xmlCreateEnumeration(CHAR *name); @@ -83,6 +83,6 @@ xmlAttributePtr xmlAddAttributeDecl(xmlDtdPtr dtd, const CHAR *elem, const CHAR *defaultValue, xmlEnumerationPtr tree); xmlAttributeTablePtr xmlCopyAttributeTable(xmlAttributeTablePtr table); void xmlFreeAttributeTable(xmlAttributeTablePtr table); -void xmlDumpAttributeTable(xmlAttributeTablePtr table); +void xmlDumpAttributeTable(xmlBufferPtr buf, xmlAttributeTablePtr table); #endif /* __XML_VALID_H__ */ |