1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-30 22:43:14 +03:00

preparing release of 2.4.29 rebuilt the docs and API a few more fixes for

* configure.in: preparing release of 2.4.29
* doc/*: rebuilt the docs and API
* xmlreader.c: a few more fixes for the XmlTextReader API
Daniel
This commit is contained in:
Daniel Veillard
2002-12-11 19:28:47 +00:00
parent f6273a0a4a
commit 9b4bb4d07a
14 changed files with 196 additions and 50 deletions

View File

@ -1,3 +1,9 @@
Wed Dec 11 20:26:15 CET 2002 Daniel Veillard <daniel@veillard.com>
* configure.in: preparing release of 2.4.29
* doc/*: rebuilt the docs and API
* xmlreader.c: a few more fixes for the XmlTextReader API
Wed Dec 11 18:01:15 CET 2002 Igor Zlatkovic <igor@stud.fh-frankfurt.de> Wed Dec 11 18:01:15 CET 2002 Igor Zlatkovic <igor@stud.fh-frankfurt.de>
* include/win32config.h: applied mingw patch from Magnus Henoch * include/win32config.h: applied mingw patch from Magnus Henoch

View File

@ -6,7 +6,7 @@ AC_CANONICAL_HOST
LIBXML_MAJOR_VERSION=2 LIBXML_MAJOR_VERSION=2
LIBXML_MINOR_VERSION=4 LIBXML_MINOR_VERSION=4
LIBXML_MICRO_VERSION=28 LIBXML_MICRO_VERSION=29
LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION
LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION

View File

@ -262,7 +262,7 @@ pnode=pxmlDoc-&gt;children-&gt;children;</pre>
<p><em>but it does not work. If I change it to</em></p> <p><em>but it does not work. If I change it to</em></p>
<pre>pnode=pxmlDoc-&gt;children-&gt;children-&gt;next;</pre> <pre>pnode=pxmlDoc-&gt;children-&gt;children-&gt;next;</pre>
<p><em>then it works. Can someone explain it to me.</em></p> <p><em>then it works. Can someone explain it to me.</em></p>
<p> <p></p>
<p>In XML all characters in the content of the document are significant <p>In XML all characters in the content of the document are significant
<strong>including blanks and formatting line breaks</strong>.</p> <strong>including blanks and formatting line breaks</strong>.</p>
<p>The extra nodes you are wondering about are just that, text nodes with <p>The extra nodes you are wondering about are just that, text nodes with
@ -365,7 +365,7 @@ xmlDtdPtr dtd = xmlParseDTD(NULL, filename_of_dtd); /* parse the DTD */
</li> </li>
<li>etc ...</li> <li>etc ...</li>
</ol> </ol>
<p> <p></p>
<p><a href="bugs.html">Daniel Veillard</a></p> <p><a href="bugs.html">Daniel Veillard</a></p>
</td></tr></table></td></tr></table></td></tr></table></td> </td></tr></table></td></tr></table></td></tr></table></td>
</tr></table></td></tr></table> </tr></table></td></tr></table>

View File

@ -111,7 +111,7 @@ of the block interfaces are public. The main components are:</p>
</ul> </ul>
<p>Graphically this gives the following:</p> <p>Graphically this gives the following:</p>
<p><img src="libxml.gif" alt="a graphical view of the various"></p> <p><img src="libxml.gif" alt="a graphical view of the various"></p>
<p> <p></p>
<p><a href="bugs.html">Daniel Veillard</a></p> <p><a href="bugs.html">Daniel Veillard</a></p>
</td></tr></table></td></tr></table></td></tr></table></td> </td></tr></table></td></tr></table></td></tr></table></td>
</tr></table></td></tr></table> </tr></table></td></tr></table>

View File

@ -147,7 +147,7 @@ started.</p>
Catalogs</a> is far more flexible, more recent, uses an XML syntax and Catalogs</a> is far more flexible, more recent, uses an XML syntax and
should scale quite better. This is the default option of libxml.</li> should scale quite better. This is the default option of libxml.</li>
</ul> </ul>
<p> <p></p>
<h3><a name="Simple">Using catalog</a></h3> <h3><a name="Simple">Using catalog</a></h3>
<p>In a normal environment libxml will by default check the presence of a <p>In a normal environment libxml will by default check the presence of a
catalog in /etc/xml/catalog, and assuming it has been correctly populated, catalog in /etc/xml/catalog, and assuming it has been correctly populated,
@ -386,7 +386,7 @@ provided because this functionality may be useful for client tools.</p>
try to avoid troubles in multithreaded environments. The code is now thread try to avoid troubles in multithreaded environments. The code is now thread
safe assuming that the libxml library has been compiled with threads safe assuming that the libxml library has been compiled with threads
support.</p> support.</p>
<p> <p></p>
<h3><a name="Other">Other resources</a></h3> <h3><a name="Other">Other resources</a></h3>
<p>The XML Catalog specification is relatively recent so there isn't much <p>The XML Catalog specification is relatively recent so there isn't much
literature to point at:</p> literature to point at:</p>

View File

@ -134,7 +134,7 @@ A:link, A:visited, A:active { text-decoration: underline }
Digital Signature</a> <a href="http://www.aleksey.com/xmlsec/">implementations for libxml2</a> Digital Signature</a> <a href="http://www.aleksey.com/xmlsec/">implementations for libxml2</a>
</li> </li>
</ul> </ul>
<p> <p></p>
<p><a href="bugs.html">Daniel Veillard</a></p> <p><a href="bugs.html">Daniel Veillard</a></p>
</td></tr></table></td></tr></table></td></tr></table></td> </td></tr></table></td></tr></table></td></tr></table></td>
</tr></table></td></tr></table> </tr></table></td></tr></table>

View File

@ -93,7 +93,7 @@ A:link, A:visited, A:active { text-decoration: underline }
</table> </table>
</td></tr></table></td> </td></tr></table></td>
<td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd"> <td valign="top" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%"><tr><td><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table border="0" cellpadding="3" cellspacing="1" width="100%"><tr><td bgcolor="#fffacd">
<p> <p></p>
<p>Libxml is the XML C library developed for the Gnome project. XML itself <p>Libxml is the XML C library developed for the Gnome project. XML itself
is a metalanguage to design markup languages, i.e. text language where is a metalanguage to design markup languages, i.e. text language where
semantic and structure are added to the content using extra &quot;markup&quot; semantic and structure are added to the content using extra &quot;markup&quot;

View File

@ -4339,20 +4339,20 @@ actually an xmlCharEncoding'/>
<info>Do a complete resolution lookup of an External Identifier</info> <info>Do a complete resolution lookup of an External Identifier</info>
<return type='xmlChar *' info='the URI of the resource or NULL if not found, it must be freed by the caller.'/> <return type='xmlChar *' info='the URI of the resource or NULL if not found, it must be freed by the caller.'/>
<arg name='catal' type='xmlCatalogPtr' info='a Catalog'/> <arg name='catal' type='xmlCatalogPtr' info='a Catalog'/>
<arg name='pubID' type='const xmlChar *' info=''/> <arg name='pubID' type='const xmlChar *' info='the public ID string'/>
<arg name='sysID' type='const xmlChar *' info=''/> <arg name='sysID' type='const xmlChar *' info='the system ID string'/>
</function> </function>
<function name='xmlACatalogResolvePublic' file='catalog'> <function name='xmlACatalogResolvePublic' file='catalog'>
<info>Try to lookup the system ID associated to a public ID in that catalog</info> <info>Try to lookup the system ID associated to a public ID in that catalog</info>
<return type='xmlChar *' info='the system ID if found or NULL otherwise, the value returned must be freed by the caller.'/> <return type='xmlChar *' info='the system ID if found or NULL otherwise, the value returned must be freed by the caller.'/>
<arg name='catal' type='xmlCatalogPtr' info='a Catalog'/> <arg name='catal' type='xmlCatalogPtr' info='a Catalog'/>
<arg name='pubID' type='const xmlChar *' info=''/> <arg name='pubID' type='const xmlChar *' info='the public ID string'/>
</function> </function>
<function name='xmlACatalogResolveSystem' file='catalog'> <function name='xmlACatalogResolveSystem' file='catalog'>
<info>Try to lookup the catalog resource for a system ID</info> <info>Try to lookup the catalog resource for a system ID</info>
<return type='xmlChar *' info='the system ID if found or NULL otherwise, the value returned must be freed by the caller.'/> <return type='xmlChar *' info='the system ID if found or NULL otherwise, the value returned must be freed by the caller.'/>
<arg name='catal' type='xmlCatalogPtr' info='a Catalog'/> <arg name='catal' type='xmlCatalogPtr' info='a Catalog'/>
<arg name='sysID' type='const xmlChar *' info=''/> <arg name='sysID' type='const xmlChar *' info='the public ID string'/>
</function> </function>
<function name='xmlACatalogResolveURI' file='catalog'> <function name='xmlACatalogResolveURI' file='catalog'>
<info>Do a complete resolution lookup of an URI</info> <info>Do a complete resolution lookup of an URI</info>
@ -4769,12 +4769,12 @@ actually an xmlCharEncoding'/>
<function name='xmlCatalogGetPublic' file='catalog'> <function name='xmlCatalogGetPublic' file='catalog'>
<info>Try to lookup the system ID associated to a public ID DEPRECATED, use xmlCatalogResolvePublic()</info> <info>Try to lookup the system ID associated to a public ID DEPRECATED, use xmlCatalogResolvePublic()</info>
<return type='const xmlChar *' info='the system ID if found or NULL otherwise.'/> <return type='const xmlChar *' info='the system ID if found or NULL otherwise.'/>
<arg name='pubID' type='const xmlChar *' info=''/> <arg name='pubID' type='const xmlChar *' info='the public ID string'/>
</function> </function>
<function name='xmlCatalogGetSystem' file='catalog'> <function name='xmlCatalogGetSystem' file='catalog'>
<info>Try to lookup the system ID associated to a public ID DEPRECATED, use xmlCatalogResolveSystem()</info> <info>Try to lookup the system ID associated to a public ID DEPRECATED, use xmlCatalogResolveSystem()</info>
<return type='const xmlChar *' info='the system ID if found or NULL otherwise.'/> <return type='const xmlChar *' info='the system ID if found or NULL otherwise.'/>
<arg name='sysID' type='const xmlChar *' info=''/> <arg name='sysID' type='const xmlChar *' info='the system ID string'/>
</function> </function>
<function name='xmlCatalogIsEmpty' file='catalog'> <function name='xmlCatalogIsEmpty' file='catalog'>
<info>Check is a catalog is empty</info> <info>Check is a catalog is empty</info>
@ -4785,8 +4785,8 @@ actually an xmlCharEncoding'/>
<info>Do a complete resolution lookup of an External Identifier using a document&apos;s private catalog list</info> <info>Do a complete resolution lookup of an External Identifier using a document&apos;s private catalog list</info>
<return type='xmlChar *' info='the URI of the resource or NULL if not found, it must be freed by the caller.'/> <return type='xmlChar *' info='the URI of the resource or NULL if not found, it must be freed by the caller.'/>
<arg name='catalogs' type='void *' info='a document&apos;s list of catalogs'/> <arg name='catalogs' type='void *' info='a document&apos;s list of catalogs'/>
<arg name='pubID' type='const xmlChar *' info=''/> <arg name='pubID' type='const xmlChar *' info='the public ID string'/>
<arg name='sysID' type='const xmlChar *' info=''/> <arg name='sysID' type='const xmlChar *' info='the system ID string'/>
</function> </function>
<function name='xmlCatalogLocalResolveURI' file='catalog'> <function name='xmlCatalogLocalResolveURI' file='catalog'>
<info>Do a complete resolution lookup of an URI using a document&apos;s private catalog list</info> <info>Do a complete resolution lookup of an URI using a document&apos;s private catalog list</info>
@ -4802,18 +4802,18 @@ actually an xmlCharEncoding'/>
<function name='xmlCatalogResolve' file='catalog'> <function name='xmlCatalogResolve' file='catalog'>
<info>Do a complete resolution lookup of an External Identifier</info> <info>Do a complete resolution lookup of an External Identifier</info>
<return type='xmlChar *' info='the URI of the resource or NULL if not found, it must be freed by the caller.'/> <return type='xmlChar *' info='the URI of the resource or NULL if not found, it must be freed by the caller.'/>
<arg name='pubID' type='const xmlChar *' info=''/> <arg name='pubID' type='const xmlChar *' info='the public ID string'/>
<arg name='sysID' type='const xmlChar *' info=''/> <arg name='sysID' type='const xmlChar *' info='the system ID string'/>
</function> </function>
<function name='xmlCatalogResolvePublic' file='catalog'> <function name='xmlCatalogResolvePublic' file='catalog'>
<info>Try to lookup the system ID associated to a public ID</info> <info>Try to lookup the system ID associated to a public ID</info>
<return type='xmlChar *' info='the system ID if found or NULL otherwise, the value returned must be freed by the caller.'/> <return type='xmlChar *' info='the system ID if found or NULL otherwise, the value returned must be freed by the caller.'/>
<arg name='pubID' type='const xmlChar *' info=''/> <arg name='pubID' type='const xmlChar *' info='the public ID string'/>
</function> </function>
<function name='xmlCatalogResolveSystem' file='catalog'> <function name='xmlCatalogResolveSystem' file='catalog'>
<info>Try to lookup the catalog resource for a system ID</info> <info>Try to lookup the catalog resource for a system ID</info>
<return type='xmlChar *' info='the system ID if found or NULL otherwise, the value returned must be freed by the caller.'/> <return type='xmlChar *' info='the system ID if found or NULL otherwise, the value returned must be freed by the caller.'/>
<arg name='sysID' type='const xmlChar *' info=''/> <arg name='sysID' type='const xmlChar *' info='the public ID string'/>
</function> </function>
<function name='xmlCatalogResolveURI' file='catalog'> <function name='xmlCatalogResolveURI' file='catalog'>
<info>Do a complete resolution lookup of an URI</info> <info>Do a complete resolution lookup of an URI</info>
@ -6274,7 +6274,7 @@ actually an xmlCharEncoding'/>
<function name='xmlLoadCatalogs' file='catalog'> <function name='xmlLoadCatalogs' file='catalog'>
<info>Load the catalogs and makes their definitions effective for the default external entity loader. this function is not thread safe, catalog initialization should preferably be done once at startup</info> <info>Load the catalogs and makes their definitions effective for the default external entity loader. this function is not thread safe, catalog initialization should preferably be done once at startup</info>
<return type='void'/> <return type='void'/>
<arg name='pathss' type='const char *' info=''/> <arg name='pathss' type='const char *' info='a list of directories separated by a colon or a space.'/>
</function> </function>
<function name='xmlLoadExternalEntity' file='parser'> <function name='xmlLoadExternalEntity' file='parser'>
<info>Load an external entity, note that the use of this function for unparsed entities may generate problems TODO: a more generic External entity API must be designed</info> <info>Load an external entity, note that the use of this function for unparsed entities may generate problems TODO: a more generic External entity API must be designed</info>
@ -8452,9 +8452,9 @@ actually an xmlCharEncoding'/>
<arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/> <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
</function> </function>
<function name='xmlTextReaderIsDefault' file='xmlreader'> <function name='xmlTextReaderIsDefault' file='xmlreader'>
<info></info> <info>Whether an Attribute node was generated from the default value defined in the DTD or schema.</info>
<return type='int' info=''/> <return type='int' info='0 if not defaulted, 1 if defaulted, and -1 in case of error'/>
<arg name='reader' type='xmlTextReaderPtr' info=''/> <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
</function> </function>
<function name='xmlTextReaderIsEmptyElement' file='xmlreader'> <function name='xmlTextReaderIsEmptyElement' file='xmlreader'>
<info>Check if the current node is empty</info> <info>Check if the current node is empty</info>
@ -8487,9 +8487,9 @@ actually an xmlCharEncoding'/>
<arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/> <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
</function> </function>
<function name='xmlTextReaderQuoteChar' file='xmlreader'> <function name='xmlTextReaderQuoteChar' file='xmlreader'>
<info></info> <info>The quotation mark character used to enclose the value of an attribute.</info>
<return type='int' info=''/> <return type='int' info='&quot; or &apos; and -1 in case of error'/>
<arg name='reader' type='xmlTextReaderPtr' info=''/> <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
</function> </function>
<function name='xmlTextReaderRead' file='xmlreader'> <function name='xmlTextReaderRead' file='xmlreader'>
<info>Moves the position of the current instance to the next node in the stream, exposing its properties.</info> <info>Moves the position of the current instance to the next node in the stream, exposing its properties.</info>
@ -8497,9 +8497,9 @@ actually an xmlCharEncoding'/>
<arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/> <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
</function> </function>
<function name='xmlTextReaderValue' file='xmlreader'> <function name='xmlTextReaderValue' file='xmlreader'>
<info></info> <info>Provides the text value of the node if present</info>
<return type='xmlChar *' info=''/> <return type='xmlChar *' info='the string or NULL if not available. The retsult must be deallocated with xmlFree()'/>
<arg name='reader' type='xmlTextReaderPtr' info=''/> <arg name='reader' type='xmlTextReaderPtr' info='the xmlTextReaderPtr used'/>
</function> </function>
<function name='xmlTextReaderXmlLang' file='xmlreader'> <function name='xmlTextReaderXmlLang' file='xmlreader'>
<info>The xml:lang scope within which the node resides.</info> <info>The xml:lang scope within which the node resides.</info>

View File

@ -102,6 +102,20 @@ to test those</p>
Schemas</a> and <a href="http://www.w3.org/TR/xinclude">XInclude</a> Schemas</a> and <a href="http://www.w3.org/TR/xinclude">XInclude</a>
</li> </li>
</ul> </ul>
<h3>2.4.29: Dec 11 2002</h3>
<ul>
<li>Windows fixes (Igor): Windows CE port, pthread linking, python bindings
(St<53>phane Bidoul), Mingw (Magnus Henoch), and export list updates</li>
<li>Fix for prev in python bindings (ERDI Gergo)</li>
<li>Fix for entities handling (Marcus Clarke)</li>
<li>Refactored the XML and HTML dumps to a single code path, fixed XHTML1
dump</li>
<li>Fix for URI parsing when handling URNs with fragment identifiers</li>
<li>Fix for HTTP URL escaping problem</li>
<li>added an TextXmlReader (C#) like API (work in progress)</li>
<li>Rewrote the API in XML generation script, includes a C parser and saves
more informations needed for C# bindings</li>
</ul>
<h3>2.4.28: Nov 22 2002</h3> <h3>2.4.28: Nov 22 2002</h3>
<ul> <ul>
<li>a couple of python binding fixes</li> <li>a couple of python binding fixes</li>
@ -110,7 +124,7 @@ to test those</p>
<li>fix to the configure script for Unix (Dimitri Papadopoulos)</li> <li>fix to the configure script for Unix (Dimitri Papadopoulos)</li>
<li>added encoding support for XInclude parse=&quot;text&quot;</li> <li>added encoding support for XInclude parse=&quot;text&quot;</li>
<li>autodetection of XHTML1 and specific serialization rules added</li> <li>autodetection of XHTML1 and specific serialization rules added</li>
<li>nasty threading bug fixed (William Brack) </li> <li>nasty threading bug fixed (William Brack)</li>
</ul> </ul>
<h3>2.4.27: Nov 17 2002</h3> <h3>2.4.27: Nov 17 2002</h3>
<ul> <ul>

View File

@ -589,6 +589,21 @@ to test those</p>
Schemas</a> and <a href="http://www.w3.org/TR/xinclude">XInclude</a></li> Schemas</a> and <a href="http://www.w3.org/TR/xinclude">XInclude</a></li>
</ul> </ul>
<h3>2.4.29: Dec 11 2002</h3>
<ul>
<li>Windows fixes (Igor): Windows CE port, pthread linking, python bindings
(St<53>phane Bidoul), Mingw (Magnus Henoch), and export list updates</li>
<li>Fix for prev in python bindings (ERDI Gergo)</li>
<li>Fix for entities handling (Marcus Clarke)</li>
<li>Refactored the XML and HTML dumps to a single code path, fixed XHTML1
dump</li>
<li>Fix for URI parsing when handling URNs with fragment identifiers</li>
<li>Fix for HTTP URL escaping problem</li>
<li>added an TextXmlReader (C#) like API (work in progress)</li>
<li>Rewrote the API in XML generation script, includes a C parser and saves
more informations needed for C# bindings</li>
</ul>
<h3>2.4.28: Nov 22 2002</h3> <h3>2.4.28: Nov 22 2002</h3>
<ul> <ul>
<li>a couple of python binding fixes</li> <li>a couple of python binding fixes</li>
@ -597,7 +612,7 @@ to test those</p>
<li>fix to the configure script for Unix (Dimitri Papadopoulos)</li> <li>fix to the configure script for Unix (Dimitri Papadopoulos)</li>
<li>added encoding support for XInclude parse="text"</li> <li>added encoding support for XInclude parse="text"</li>
<li>autodetection of XHTML1 and specific serialization rules added</li> <li>autodetection of XHTML1 and specific serialization rules added</li>
<li>nasty threading bug fixed (William Brack) </li> <li>nasty threading bug fixed (William Brack)</li>
</ul> </ul>
<h3>2.4.27: Nov 17 2002</h3> <h3>2.4.27: Nov 17 2002</h3>
@ -2735,6 +2750,7 @@ xmlOutputBufferCreateOwn(FILE *file, xmlCharEncodingHandlerPtr encoder) {
} </pre> } </pre>

View File

@ -247,7 +247,7 @@ will just list one for now, others pointers welcome:</p>
<p>I suggest looking at the examples found under test/valid/dtd and any of <p>I suggest looking at the examples found under test/valid/dtd and any of
the large number of books available on XML. The dia example in test/valid the large number of books available on XML. The dia example in test/valid
should be both simple and complete enough to allow you to build your own.</p> should be both simple and complete enough to allow you to build your own.</p>
<p> <p></p>
<p><a href="bugs.html">Daniel Veillard</a></p> <p><a href="bugs.html">Daniel Veillard</a></p>
</td></tr></table></td></tr></table></td></tr></table></td> </td></tr></table></td></tr></table></td></tr></table></td>
</tr></table></td></tr></table> </tr></table></td></tr></table>

View File

@ -250,6 +250,7 @@ xmlOutputBufferCreateOwn(FILE *file, xmlCharEncodingHandlerPtr encoder) {
} </pre> } </pre>

View File

@ -216,7 +216,7 @@ of a number of things:</p>
validation, DOM, XPath or XPointer, but really need to work fixed memory validation, DOM, XPath or XPointer, but really need to work fixed memory
requirements, then the SAX interface should be used.</li> requirements, then the SAX interface should be used.</li>
</ul> </ul>
<p> <p></p>
<p><a href="bugs.html">Daniel Veillard</a></p> <p><a href="bugs.html">Daniel Veillard</a></p>
</td></tr></table></td></tr></table></td></tr></table></td> </td></tr></table></td></tr></table></td></tr></table></td>
</tr></table></td></tr></table> </tr></table></td></tr></table>

View File

@ -604,7 +604,7 @@ xmlTextReaderLocalName(xmlTextReaderPtr reader) {
return(NULL); return(NULL);
if ((reader->node->type != XML_ELEMENT_NODE) && if ((reader->node->type != XML_ELEMENT_NODE) &&
(reader->node->type != XML_ATTRIBUTE_NODE)) (reader->node->type != XML_ATTRIBUTE_NODE))
return(NULL); return(xmlTextReaderName(reader));
return(xmlStrdup(reader->node->name)); return(xmlStrdup(reader->node->name));
} }
@ -622,16 +622,51 @@ xmlTextReaderName(xmlTextReaderPtr reader) {
if ((reader == NULL) || (reader->node == NULL)) if ((reader == NULL) || (reader->node == NULL))
return(NULL); return(NULL);
if ((reader->node->type != XML_ELEMENT_NODE) && switch (reader->node->type) {
(reader->node->type != XML_ATTRIBUTE_NODE)) case XML_ELEMENT_NODE:
return(NULL); case XML_ATTRIBUTE_NODE:
if ((reader->node->ns == NULL) || (reader->node->ns->prefix == NULL)) if ((reader->node->ns == NULL) ||
return(xmlStrdup(reader->node->name)); (reader->node->ns->prefix == NULL))
return(xmlStrdup(reader->node->name));
ret = xmlStrdup(reader->node->ns->prefix);
ret = xmlStrcat(ret, BAD_CAST ":"); ret = xmlStrdup(reader->node->ns->prefix);
ret = xmlStrcat(ret, reader->node->name); ret = xmlStrcat(ret, BAD_CAST ":");
return(ret); ret = xmlStrcat(ret, reader->node->name);
return(ret);
case XML_TEXT_NODE:
return(xmlStrdup(BAD_CAST "#text"));
case XML_CDATA_SECTION_NODE:
return(xmlStrdup(BAD_CAST "#cdata-section"));
case XML_ENTITY_NODE:
case XML_ENTITY_REF_NODE:
return(xmlStrdup(reader->node->name));
case XML_PI_NODE:
return(xmlStrdup(reader->node->name));
case XML_COMMENT_NODE:
return(xmlStrdup(BAD_CAST "#comment"));
case XML_DOCUMENT_NODE:
case XML_HTML_DOCUMENT_NODE:
#ifdef LIBXML_DOCB_ENABLED
case XML_DOCB_DOCUMENT_NODE:
#endif
return(xmlStrdup(BAD_CAST "#document"));
case XML_DOCUMENT_FRAG_NODE:
return(xmlStrdup(BAD_CAST "#document-fragment"));
case XML_NOTATION_NODE:
return(xmlStrdup(reader->node->name));
case XML_DOCUMENT_TYPE_NODE:
case XML_DTD_NODE:
return(xmlStrdup(reader->node->name));
case XML_ELEMENT_DECL:
case XML_ATTRIBUTE_DECL:
case XML_ENTITY_DECL:
case XML_NAMESPACE_DECL:
case XML_XINCLUDE_START:
case XML_XINCLUDE_END:
return(NULL);
}
return(NULL);
} }
/** /**
@ -744,15 +779,89 @@ xmlTextReaderHasValue(xmlTextReaderPtr reader) {
if (reader->node == NULL) if (reader->node == NULL)
return(0); return(0);
TODO switch (reader->node->type) {
case XML_ATTRIBUTE_NODE:
case XML_TEXT_NODE:
case XML_CDATA_SECTION_NODE:
case XML_PI_NODE:
case XML_COMMENT_NODE:
return(1);
default:
return(0);
}
return(0); return(0);
} }
/* /**
int xmlTextReaderIsDefault (xmlTextReaderPtr reader); * xmlTextReaderValue:
int xmlTextReaderQuoteChar (xmlTextReaderPtr reader); * @reader: the xmlTextReaderPtr used
xmlChar * xmlTextReaderValue (xmlTextReaderPtr reader); *
* Provides the text value of the node if present
*
* Returns the string or NULL if not available. The retsult must be deallocated
* with xmlFree()
*/ */
xmlChar *
xmlTextReaderValue(xmlTextReaderPtr reader) {
if (reader == NULL)
return(NULL);
if (reader->node == NULL)
return(NULL);
switch (reader->node->type) {
case XML_ATTRIBUTE_NODE:{
xmlAttrPtr attr = (xmlAttrPtr) reader->node;
if (attr->parent != NULL)
return (xmlNodeListGetString
(attr->parent->doc, attr->children, 1));
else
return (xmlNodeListGetString(NULL, attr->children, 1));
break;
}
case XML_TEXT_NODE:
case XML_CDATA_SECTION_NODE:
case XML_PI_NODE:
case XML_COMMENT_NODE:
if (reader->node->content != NULL)
return (xmlStrdup(reader->node->content));
default:
return(NULL);
}
return(NULL);
}
/**
* xmlTextReaderIsDefault:
* @reader: the xmlTextReaderPtr used
*
* Whether an Attribute node was generated from the default value
* defined in the DTD or schema.
*
* Returns 0 if not defaulted, 1 if defaulted, and -1 in case of error
*/
int
xmlTextReaderIsDefault(xmlTextReaderPtr reader) {
if (reader == NULL)
return(-1);
return(0);
}
/**
* xmlTextReaderQuoteChar:
* @reader: the xmlTextReaderPtr used
*
* The quotation mark character used to enclose the value of an attribute.
*
* Returns " or ' and -1 in case of error
*/
int
xmlTextReaderQuoteChar(xmlTextReaderPtr reader) {
if (reader == NULL)
return(-1);
/* TODO maybe lookup the attribute value for " first */
return((int) '"');
}
/** /**
* xmlTextReaderXmlLang: * xmlTextReaderXmlLang: