diff options
author | Daniel Veillard <veillard@src.gnome.org> | 2003-12-10 16:43:49 +0000 |
---|---|---|
committer | Daniel Veillard <veillard@src.gnome.org> | 2003-12-10 16:43:49 +0000 |
commit | 024f19966eafc5943d32f212894b1e73cf06e2ea (patch) | |
tree | b1d352a5984c190a54e57477a8c176614e817717 | |
parent | c480c4ea56bbb5aad5ac991dafef5702dabb6360 (diff) | |
download | libxml2-024f19966eafc5943d32f212894b1e73cf06e2ea.tar.gz |
fixed to point to releases of libxml2-2.6, Daniel
-rw-r--r-- | doc/FAQ.html | 18 | ||||
-rw-r--r-- | doc/XMLinfo.html | 6 | ||||
-rw-r--r-- | doc/XSLT.html | 2 | ||||
-rw-r--r-- | doc/bugs.html | 10 | ||||
-rw-r--r-- | doc/catalog.html | 104 | ||||
-rw-r--r-- | doc/downloads.html | 2 | ||||
-rw-r--r-- | doc/encoding.html | 18 | ||||
-rw-r--r-- | doc/entities.html | 8 | ||||
-rw-r--r-- | doc/example.html | 30 | ||||
-rw-r--r-- | doc/index.html | 2 | ||||
-rw-r--r-- | doc/library.html | 36 | ||||
-rw-r--r-- | doc/namespaces.html | 10 | ||||
-rw-r--r-- | doc/news.html | 14 | ||||
-rw-r--r-- | doc/python.html | 82 | ||||
-rw-r--r-- | doc/threads.html | 2 | ||||
-rw-r--r-- | doc/upgrade.html | 4 | ||||
-rw-r--r-- | doc/xml.html | 4 | ||||
-rw-r--r-- | doc/xmldtd.html | 8 | ||||
-rw-r--r-- | doc/xmlmem.html | 2 |
19 files changed, 181 insertions, 181 deletions
diff --git a/doc/FAQ.html b/doc/FAQ.html index 3424e3f0..472863fb 100644 --- a/doc/FAQ.html +++ b/doc/FAQ.html @@ -25,7 +25,7 @@ A:link, A:visited, A:active { text-decoration: underline } </ol><h3><a name="Installati" id="Installati">Installation</a></h3><ol><li><strong><span style="background-color: #FF0000">Do Not Use libxml1</span></strong>, use libxml2</li> <li><em>Where can I get libxml</em> ? - <p>The original distribution comes from <a href="ftp://rpmfind.net/pub/libxml/">rpmfind.net</a> or <a href="ftp://ftp.gnome.org/pub/GNOME/sources/libxml2/2.5/">gnome.org</a></p> + <p>The original distribution comes from <a href="ftp://rpmfind.net/pub/libxml/">rpmfind.net</a> or <a href="ftp://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6/">gnome.org</a></p> <p>Most Linux and BSD distributions include libxml, this is probably the safer way for end-users to use libxml.</p> <p>David Doolin provides precompiled Windows versions at <a href="http://www.ce.berkeley.edu/~doolin/code/libxmlwin32/ ">http://www.ce.berkeley.edu/~doolin/code/libxmlwin32/</a></p> @@ -61,7 +61,7 @@ A:link, A:visited, A:active { text-decoration: underline } applications with libxml(2)) that you can install locally.</p> </li> </ol><h3><a name="Compilatio" id="Compilatio">Compilation</a></h3><ol><li><em>What is the process to compile libxml2 ?</em> - <p>As most UNIX libraries libxml2 follows the "standard":</p> + <p>As most UNIX libraries libxml2 follows the "standard":</p> <p><code>gunzip -c xxx.tar.gz | tar xvf -</code></p> <p><code>cd libxml-xxxx</code></p> <p><code>./configure --help</code></p> @@ -134,15 +134,15 @@ A:link, A:visited, A:active { text-decoration: underline } </ol></li> <li>Extra nodes in the document: <p><em>For a XML file as below:</em></p> - <pre><?xml version="1.0"?> -<PLAN xmlns="http://www.argus.ca/autotest/1.0/"> -<NODE CommFlag="0"/> -<NODE CommFlag="1"/> + <pre><?xml version="1.0"?> +<PLAN xmlns="http://www.argus.ca/autotest/1.0/"> +<NODE CommFlag="0"/> +<NODE CommFlag="1"/> </PLAN></pre> <p><em>after parsing it with the function pxmlDoc=xmlParseFile(...);</em></p> <p><em>I want to the get the content of the first node (node with the - CommFlag="0")</em></p> + CommFlag="0")</em></p> <p><em>so I did it as following;</em></p> <pre>xmlNodePtr pnode; pnode=pxmlDoc->children->children;</pre> @@ -227,14 +227,14 @@ pnode=pxmlDoc->children->children;</pre> <pre>xmlDocPtr doc; /* your existing document */ xmlDtdPtr dtd = xmlParseDTD(NULL, filename_of_dtd); /* parse the DTD */ - dtd->name = xmlStrDup((xmlChar*)"root_name"); /* use the given root */ + dtd->name = xmlStrDup((xmlChar*)"root_name"); /* use the given root */ doc->intSubset = dtd; if (doc->children == NULL) xmlAddChild((xmlNodePtr)doc, (xmlNodePtr)dtd); else xmlAddPrevSibling(doc->children, (xmlNodePtr)dtd); </pre> </li> - <li>So what is this funky "xmlChar" used all the time? + <li>So what is this funky "xmlChar" used all the time? <p>It is a null terminated sequence of utf-8 characters. And only utf-8! You need to convert strings encoded in different ways to utf-8 before passing them to the API. This can be accomplished with the iconv library diff --git a/doc/XMLinfo.html b/doc/XMLinfo.html index ef03b245..2642bcb1 100644 --- a/doc/XMLinfo.html +++ b/doc/XMLinfo.html @@ -9,15 +9,15 @@ H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } </style><title>XML</title></head><body bgcolor="#8b7765" text="#000000" link="#000000" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>XML</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">News</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://garypennington.net/libxml2/">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></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"><p><a href="http://www.w3.org/TR/REC-xml">XML is a standard</a> for markup-based structured documents. Here is <a name="example" id="example">an example XML -document</a>:</p><pre><?xml version="1.0"?> -<EXAMPLE prop1="gnome is great" prop2="&amp; linux too"> +document</a>:</p><pre><?xml version="1.0"?> +<EXAMPLE prop1="gnome is great" prop2="&amp; linux too"> <head> <title>Welcome to Gnome</title> </head> <chapter> <title>The Linux adventure</title> <p>bla bla bla ...</p> - <image href="linus.gif"/> + <image href="linus.gif"/> <p>...</p> </chapter> </EXAMPLE></pre><p>The first line specifies that it is an XML document and gives useful diff --git a/doc/XSLT.html b/doc/XSLT.html index 138e5120..00f4b498 100644 --- a/doc/XSLT.html +++ b/doc/XSLT.html @@ -10,5 +10,5 @@ A:link, A:visited, A:active { text-decoration: underline } </style><title>XSLT</title></head><body bgcolor="#8b7765" text="#000000" link="#000000" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>XSLT</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">News</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://garypennington.net/libxml2/">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></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"><p>Check <a href="http://xmlsoft.org/XSLT">the separate libxslt page</a></p><p><a href="http://www.w3.org/TR/xslt">XSL Transformations</a>, is a language for transforming XML documents into other XML documents (or HTML/textual output).</p><p>A separate library called libxslt is available implementing XSLT-1.0 for -libxml2. This module "libxslt" too can be found in the Gnome CVS base.</p><p>You can check the <a href="http://cvs.gnome.org/lxr/source/libxslt/FEATURES">features</a> +libxml2. This module "libxslt" too can be found in the Gnome CVS base.</p><p>You can check the <a href="http://cvs.gnome.org/lxr/source/libxslt/FEATURES">features</a> supported and the progresses on the <a href="http://cvs.gnome.org/lxr/source/libxslt/ChangeLog" name="Changelog" id="Changelog">Changelog</a>.</p><p><a href="bugs.html">Daniel Veillard</a></p></td></tr></table></td></tr></table></td></tr></table></td></tr></table></td></tr></table></body></html> diff --git a/doc/bugs.html b/doc/bugs.html index fcd3e18a..270912bd 100644 --- a/doc/bugs.html +++ b/doc/bugs.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } </style><title>Reporting bugs and getting help</title></head><body bgcolor="#8b7765" text="#000000" link="#000000" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Reporting bugs and getting help</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">News</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://garypennington.net/libxml2/">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></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"><p>Well, bugs or missing features are always possible, and I will make a point of fixing them in a timely fashion. The best way to report a bug is to use the <a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Gnome -bug tracking database</a> (make sure to use the "libxml2" module name). I +bug tracking database</a> (make sure to use the "libxml2" module name). I look at reports there regularly and it's good to have a reminder when a bug is still open. Be sure to specify that the bug is for the package libxml2.</p><p>For small problems you can try to get help on IRC, the #xml channel on irc.gnome.org (port 6667) usually have a few person subscribed which may help @@ -37,16 +37,16 @@ things really hard to track and in some cases I am not the best person to answer a given question, ask on the list.</p><p>To <span style="color: #E50000">be really clear about support</span>:</p><ul><li>Support or help <span style="color: #E50000">requests MUST be sent to the list or on bugzilla</span> in case of problems, so that the Question and Answers can be shared publicly. Failing to do so carries the implicit - message "I want free support but I don't want to share the benefits with - others" and is not welcome. I will automatically Carbon-Copy the + message "I want free support but I don't want to share the benefits with + others" and is not welcome. I will automatically Carbon-Copy the xml@gnome.org mailing list for any technical reply made about libxml2 or libxslt.</li> <li>There is <span style="color: #E50000">no garantee of support</span>, if your question remains unanswered after a week, repost it, making sure you gave all the detail needed and the information requested.</li> <li>Failing to provide information as requested or double checking first - for prior feedback also carries the implicit message "the time of the - library maintainers is less valuable than my time" and might not be + for prior feedback also carries the implicit message "the time of the + library maintainers is less valuable than my time" and might not be welcome.</li> </ul><p>Of course, bugs reported with a suggested patch for fixing them will probably be processed faster than those without.</p><p>If you're looking for help, a quick look at <a href="http://mail.gnome.org/archives/xml/">the list archive</a> may actually diff --git a/doc/catalog.html b/doc/catalog.html index d2d7d021..23e55c23 100644 --- a/doc/catalog.html +++ b/doc/catalog.html @@ -22,19 +22,19 @@ A:link, A:visited, A:active { text-decoration: underline } is inserted between the moment the reference is recognized by the software (XML parser, stylesheet processing, or even images referenced for inclusion in a rendering) and the time where loading that resource is actually -started.</p><p>It is basically used for 3 things:</p><ul><li>mapping from "logical" names, the public identifiers and a more +started.</p><p>It is basically used for 3 things:</p><ul><li>mapping from "logical" names, the public identifiers and a more concrete name usable for download (and URI). For example it can associate the logical name - <p>"-//OASIS//DTD DocBook XML V4.1.2//EN"</p> + <p>"-//OASIS//DTD DocBook XML V4.1.2//EN"</p> <p>of the DocBook 4.1.2 XML DTD with the actual URL where it can be downloaded</p> <p>http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd</p> </li> <li>remapping from a given URL to another one, like an HTTP indirection saying that - <p>"http://www.oasis-open.org/committes/tr.xsl"</p> + <p>"http://www.oasis-open.org/committes/tr.xsl"</p> <p>should really be looked at</p> - <p>"http://www.oasis-open.org/committes/entity/stylesheets/base/tr.xsl"</p> + <p>"http://www.oasis-open.org/committes/entity/stylesheets/base/tr.xsl"</p> </li> <li>providing a local cache mechanism allowing to load the entities associated to public identifiers or remote resources, this is a really @@ -53,11 +53,11 @@ catalog in /etc/xml/catalog, and assuming it has been correctly populated, the processing is completely transparent to the document user. To take a concrete example, suppose you are authoring a DocBook document, this one starts with the following DOCTYPE definition:</p><pre><?xml version='1.0'?> -<!DOCTYPE book PUBLIC "-//Norman Walsh//DTD DocBk XML V3.1.4//EN" - "http://nwalsh.com/docbook/xml/3.1.4/db3xml.dtd"></pre><p>When validating the document with libxml, the catalog will be -automatically consulted to lookup the public identifier "-//Norman Walsh//DTD -DocBk XML V3.1.4//EN" and the system identifier -"http://nwalsh.com/docbook/xml/3.1.4/db3xml.dtd", and if these entities have +<!DOCTYPE book PUBLIC "-//Norman Walsh//DTD DocBk XML V3.1.4//EN" + "http://nwalsh.com/docbook/xml/3.1.4/db3xml.dtd"></pre><p>When validating the document with libxml, the catalog will be +automatically consulted to lookup the public identifier "-//Norman Walsh//DTD +DocBk XML V3.1.4//EN" and the system identifier +"http://nwalsh.com/docbook/xml/3.1.4/db3xml.dtd", and if these entities have been installed on your system and the catalogs actually point to them, libxml will fetch them from the local disk.</p><p style="font-size: 10pt"><strong>Note</strong>: Really don't use this DOCTYPE example it's a really old version, but is fine as an example.</p><p>Libxml2 will check the catalog each time that it is requested to load an @@ -65,36 +65,36 @@ entity, this includes DTD, external parsed entities, stylesheets, etc ... If your system is correctly configured all the authoring phase and processing should use only local files, even if your document stays portable because it uses the canonical public and system ID, referencing the remote document.</p><h3><a name="Some" id="Some">Some examples:</a></h3><p>Here is a couple of fragments from XML Catalogs used in libxml2 early -regression tests in <code>test/catalogs</code> :</p><pre><?xml version="1.0"?> +regression tests in <code>test/catalogs</code> :</p><pre><?xml version="1.0"?> <!DOCTYPE catalog PUBLIC - "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" - "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> -<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> - <public publicId="-//OASIS//DTD DocBook XML V4.1.2//EN" - uri="http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"/> + "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" + "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> +<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> + <public publicId="-//OASIS//DTD DocBook XML V4.1.2//EN" + uri="http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"/> ...</pre><p>This is the beginning of a catalog for DocBook 4.1.2, XML Catalogs are written in XML, there is a specific namespace for catalog elements -"urn:oasis:names:tc:entity:xmlns:xml:catalog". The first entry in this +"urn:oasis:names:tc:entity:xmlns:xml:catalog". The first entry in this catalog is a <code>public</code> mapping it allows to associate a Public Identifier with an URI.</p><pre>... - <rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/" - rewritePrefix="file:///usr/share/xml/docbook/"/> + <rewriteSystem systemIdStartString="http://www.oasis-open.org/docbook/" + rewritePrefix="file:///usr/share/xml/docbook/"/> ...</pre><p>A <code>rewriteSystem</code> is a very powerful instruction, it says that any URI starting with a given prefix should be looked at another URI constructed by replacing the prefix with an new one. In effect this acts like a cache system for a full area of the Web. In practice it is extremely useful with a file prefix if you have installed a copy of those resources on your local system.</p><pre>... -<delegatePublic publicIdStartString="-//OASIS//DTD XML Catalog //" - catalog="file:///usr/share/xml/docbook.xml"/> -<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook XML" - catalog="file:///usr/share/xml/docbook.xml"/> -<delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML" - catalog="file:///usr/share/xml/docbook.xml"/> -<delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/" - catalog="file:///usr/share/xml/docbook.xml"/> -<delegateURI uriStartString="http://www.oasis-open.org/docbook/" - catalog="file:///usr/share/xml/docbook.xml"/> +<delegatePublic publicIdStartString="-//OASIS//DTD XML Catalog //" + catalog="file:///usr/share/xml/docbook.xml"/> +<delegatePublic publicIdStartString="-//OASIS//ENTITIES DocBook XML" + catalog="file:///usr/share/xml/docbook.xml"/> +<delegatePublic publicIdStartString="-//OASIS//DTD DocBook XML" + catalog="file:///usr/share/xml/docbook.xml"/> +<delegateSystem systemIdStartString="http://www.oasis-open.org/docbook/" + catalog="file:///usr/share/xml/docbook.xml"/> +<delegateURI uriStartString="http://www.oasis-open.org/docbook/" + catalog="file:///usr/share/xml/docbook.xml"/> ...</pre><p>Delegation is the core features which allows to build a tree of catalogs, easier to maintain than a single catalog, based on Public Identifier, System Identifier or URI prefixes it instructs the catalog software to look up @@ -110,34 +110,34 @@ empty one should deactivate loading the default <code>/etc/xml/catalog</code> default catalog</p><h3><a name="validate" id="validate">How to debug catalog processing:</a></h3><p>Setting up the <code>XML_DEBUG_CATALOG</code> environment variable will make libxml2 output debugging informations for each catalog operations, for example:</p><pre>orchis:~/XML -> xmllint --memory --noout test/ent2 -warning: failed to load external entity "title.xml" +warning: failed to load external entity "title.xml" orchis:~/XML -> export XML_DEBUG_CATALOG= orchis:~/XML -> xmllint --memory --noout test/ent2 Failed to parse catalog /etc/xml/catalog Failed to parse catalog /etc/xml/catalog -warning: failed to load external entity "title.xml" +warning: failed to load external entity "title.xml" Catalogs cleanup orchis:~/XML -> </pre><p>The test/ent2 references an entity, running the parser from memory makes -the base URI unavailable and the the "title.xml" entity cannot be loaded. +the base URI unavailable and the the "title.xml" entity cannot be loaded. Setting up the debug environment variable allows to detect that an attempt is made to load the <code>/etc/xml/catalog</code> but since it's not present the resolution fails.</p><p>But the most advanced way to debug XML catalog processing is to use the <strong>xmlcatalog</strong> command shipped with libxml2, it allows to load catalogs and make resolution queries to see what is going on. This is also used for the regression tests:</p><pre>orchis:~/XML -> ./xmlcatalog test/catalogs/docbook.xml \ - "-//OASIS//DTD DocBook XML V4.1.2//EN" + "-//OASIS//DTD DocBook XML V4.1.2//EN" http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd orchis:~/XML -> </pre><p>For debugging what is going on, adding one -v flags increase the verbosity level to indicate the processing done (adding a second flag also indicate what elements are recognized at parsing):</p><pre>orchis:~/XML -> ./xmlcatalog -v test/catalogs/docbook.xml \ - "-//OASIS//DTD DocBook XML V4.1.2//EN" + "-//OASIS//DTD DocBook XML V4.1.2//EN" Parsing catalog test/catalogs/docbook.xml's content Found public match -//OASIS//DTD DocBook XML V4.1.2//EN http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd Catalogs cleanup orchis:~/XML -> </pre><p>A shell interface is also available to debug and process multiple queries (and for regression tests):</p><pre>orchis:~/XML -> ./xmlcatalog -shell test/catalogs/docbook.xml \ - "-//OASIS//DTD DocBook XML V4.1.2//EN" + "-//OASIS//DTD DocBook XML V4.1.2//EN" > help Commands available: public PublicID: make a PUBLIC identifier lookup @@ -149,40 +149,40 @@ dump: print the current catalog state debug: increase the verbosity level quiet: decrease the verbosity level exit: quit the shell -> public "-//OASIS//DTD DocBook XML V4.1.2//EN" +> public "-//OASIS//DTD DocBook XML V4.1.2//EN" http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd > quit orchis:~/XML -> </pre><p>This should be sufficient for most debugging purpose, this was actually used heavily to debug the XML Catalog implementation itself.</p><h3><a name="Declaring" id="Declaring">How to create and maintain</a> catalogs:</h3><p>Basically XML Catalogs are XML files, you can either use XML tools to manage them or use <strong>xmlcatalog</strong> for this. The basic step is to create a catalog the -create option provide this facility:</p><pre>orchis:~/XML -> ./xmlcatalog --create tst.xml -<?xml version="1.0"?> -<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" - "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> -<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"/> +<?xml version="1.0"?> +<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" + "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> +<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"/> orchis:~/XML -> </pre><p>By default xmlcatalog does not overwrite the original catalog and save the result on the standard output, this can be overridden using the -noout option. The <code>-add</code> command allows to add entries in the -catalog:</p><pre>orchis:~/XML -> ./xmlcatalog --noout --create --add "public" \ - "-//OASIS//DTD DocBook XML V4.1.2//EN" \ +catalog:</p><pre>orchis:~/XML -> ./xmlcatalog --noout --create --add "public" \ + "-//OASIS//DTD DocBook XML V4.1.2//EN" \ http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd tst.xml orchis:~/XML -> cat tst.xml -<?xml version="1.0"?> -<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" \ - "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> -<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> -<public publicId="-//OASIS//DTD DocBook XML V4.1.2//EN" - uri="http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"/> +<?xml version="1.0"?> +<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" \ + "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> +<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> +<public publicId="-//OASIS//DTD DocBook XML V4.1.2//EN" + uri="http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd"/> </catalog> orchis:~/XML -> </pre><p>The <code>-add</code> option will always take 3 parameters even if some of the XML Catalog constructs (like nextCatalog) will have only a single argument, just pass a third empty string, it will be ignored.</p><p>Similarly the <code>-del</code> option remove matching entries from the catalog:</p><pre>orchis:~/XML -> ./xmlcatalog --del \ - "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" tst.xml -<?xml version="1.0"?> -<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" - "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> -<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"/> + "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" tst.xml +<?xml version="1.0"?> +<!DOCTYPE catalog PUBLIC "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN" + "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> +<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"/> orchis:~/XML -> </pre><p>The catalog is now empty. Note that the matching of <code>-del</code> is exact and would have worked in a similar fashion with the Public ID string.</p><p>This is rudimentary but should be sufficient to manage a not too complex diff --git a/doc/downloads.html b/doc/downloads.html index 94ada617..dc418c15 100644 --- a/doc/downloads.html +++ b/doc/downloads.html @@ -8,7 +8,7 @@ H2 {font-family: Verdana,Arial,Helvetica} H3 {font-family: Verdana,Arial,Helvetica} A:link, A:visited, A:active { text-decoration: underline } </style><title>Downloads</title></head><body bgcolor="#8b7765" text="#000000" link="#000000" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Downloads</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Main Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html">Home</a></li><li><a href="intro.html">Introduction</a></li><li><a href="FAQ.html">FAQ</a></li><li><a href="docs.html" style="font-weight:bold">Developer Menu</a></li><li><a href="bugs.html">Reporting bugs and getting help</a></li><li><a href="help.html">How to help</a></li><li><a href="downloads.html">Downloads</a></li><li><a href="news.html">News</a></li><li><a href="XMLinfo.html">XML</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="xmldtd.html">Validation & DTDs</a></li><li><a href="encoding.html">Encodings support</a></li><li><a href="catalog.html">Catalog support</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="contribs.html">Contributions</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="html/index.html" style="font-weight:bold">API Menu</a></li><li><a href="guidelines.html">XML Guidelines</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://garypennington.net/libxml2/">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></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"><p>The latest versions of libxml2 can be found on <a href="ftp://xmlsoft.org/">xmlsoft.org</a> (<a href="ftp://speakeasy.rpmfind.net/pub/libxml/">Seattle</a>, <a href="ftp://fr.rpmfind.net/pub/libxml/">France</a>) or on the <a href="ftp://ftp.gnome.org/pub/GNOME/MIRRORS.html">Gnome FTP server</a> either -as a <a href="ftp://ftp.gnome.org/pub/GNOME/sources/libxml2/2.5/">source +as a <a href="ftp://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6/">source archive</a><!-- commenting this out because they seem to have disappeared or <a href="ftp://ftp.gnome.org/pub/GNOME/stable/redhat/i386/libxml/">RPM packages</a> --> diff --git a/doc/encoding.html b/doc/encoding.html index 8f5da77e..3124888e 100644 --- a/doc/encoding.html +++ b/doc/encoding.html @@ -28,7 +28,7 @@ bit overkill for Western languages encoding. Moreover the XML specification allows document to be encoded in other encodings at the condition that they are clearly labeled as such. For example the following is a wellformed XML document encoded in ISO-8859 1 and using accentuated letter that we French -likes for both markup and content:</p><pre><?xml version="1.0" encoding="ISO-8859-1"?> +likes for both markup and content:</p><pre><?xml version="1.0" encoding="ISO-8859-1"?> <très>là</très></pre><p>Having internationalization support in libxml2 means the following:</p><ul><li>the document is properly parsed</li> <li>informations about it's encoding are saved</li> <li>it can be modified</li> @@ -40,11 +40,11 @@ exception of a few routines to read with a specific encoding or save to a specific encoding, is completely agnostic about the original encoding of the document.</p><p>It should be noted too that the HTML parser embedded in libxml2 now obey the same rules too, the following document will be (as of 2.2.2) handled in -an internationalized fashion by libxml2 too:</p><pre><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" - "http://www.w3.org/TR/REC-html40/loose.dtd"> -<html lang="fr"> +an internationalized fashion by libxml2 too:</p><pre><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" + "http://www.w3.org/TR/REC-html40/loose.dtd"> +<html lang="fr"> <head> - <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> + <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1"> </head> <body> <p>W3C crée des standards pour le Web.</body> @@ -116,7 +116,7 @@ err.xml:1: error: Bytes: 0xE8 0x73 0x3E 0x6C will report an error and stops processing: <pre>~/XML -> ./xmllint err2.xml err2.xml:1: error: Unsupported encoding UnsupportedEnc -<?xml version="1.0" encoding="UnsupportedEnc"?> +<?xml version="1.0" encoding="UnsupportedEnc"?> ^</pre> </li> <li>From that point the encoder processes progressively the input (it is @@ -154,14 +154,14 @@ encoding:</p><ol><li>if no encoding is given, libxml2 will look for an encoding resume the conversion. This guarantees that any document will be saved without losses (except for markup names where this is not legal, this is a problem in the current version, in practice avoid using non-ascii - characters for tags or attributes names @@). A special "ascii" encoding + characters for tags or attributes names @@). A special "ascii" encoding name is used to save documents to a pure ascii form can be used when portability is really crucial</li> </ol><p>Here is a few examples based on the same test document:</p><pre>~/XML -> ./xmllint isolat1 -<?xml version="1.0" encoding="ISO-8859-1"?> +<?xml version="1.0" encoding="ISO-8859-1"?> <très>là</très> ~/XML -> ./xmllint --encode UTF-8 isolat1 -<?xml version="1.0" encoding="UTF-8"?> +<?xml version="1.0" encoding="UTF-8"?> <très>là </très> ~/XML -> </pre><p>The same processing is applied (and reuse most of the code) for HTML I18N processing. Looking up and modifying the content encoding is a bit more diff --git a/doc/entities.html b/doc/entities.html index 654fa2c1..563def47 100644 --- a/doc/entities.html +++ b/doc/entities.html @@ -12,9 +12,9 @@ abbreviation for a given string that you can reuse many times throughout the content of your document. Entities are especially useful when a given string may occur frequently within a document, or to confine the change needed to a document to a restricted area in the internal subset of the document (at the -beginning). Example:</p><pre>1 <?xml version="1.0"?> -2 <!DOCTYPE EXAMPLE SYSTEM "example.dtd" [ -3 <!ENTITY xml "Extensible Markup Language"> +beginning). Example:</p><pre>1 <?xml version="1.0"?> +2 <!DOCTYPE EXAMPLE SYSTEM "example.dtd" [ +3 <!ENTITY xml "Extensible Markup Language"> 4 ]> 5 <EXAMPLE> 6 &xml; @@ -24,7 +24,7 @@ are 5 predefined entities in libxml2 allowing you to escape characters with predefined meaning in some parts of the xml document content: <strong>&lt;</strong> for the character '<', <strong>&gt;</strong> for the character '>', <strong>&apos;</strong> for the character ''', -<strong>&quot;</strong> for the character '"', and +<strong>&quot;</strong> for the character '"', and <strong>&amp;</strong> for the character '&'.</p><p>One of the problems related to entities is that you may want the parser to substitute an entity's content so that you can see the replacement text in your application. Or you may prefer to keep entity references as such in the diff --git a/doc/example.html b/doc/example.html index 29d6efcf..b84524f6 100644 --- a/doc/example.html +++ b/doc/example.html @@ -11,12 +11,12 @@ A:link, A:visited, A:active { text-decoration: underline } data is not kept in the DOM tree but uses internal structures. It is based on a proposal to keep a database of jobs related to Gnome, with an XML based storage structure. Here is an <a href="gjobs.xml">XML encoded jobs -base</a>:</p><pre><?xml version="1.0"?> -<gjob:Helping xmlns:gjob="http://www.gnome.org/some-location"> +base</a>:</p><pre><?xml version="1.0"?> +<gjob:Helping xmlns:gjob="http://www.gnome.org/some-location"> <gjob:Jobs> <gjob:Job> - <gjob:Project ID="3"/> + <gjob:Project ID="3"/> <gjob:Application>GBackup</gjob:Application> <gjob:Category>Development</gjob:Category> @@ -91,13 +91,13 @@ typedef struct person { personPtr parsePerson(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur) { personPtr ret = NULL; -DEBUG("parsePerson\n"); +DEBUG("parsePerson\n"); /* * allocate the struct */ ret = (personPtr) malloc(sizeof(person)); if (ret == NULL) { - fprintf(stderr,"out of memory\n"); + fprintf(stderr,"out of memory\n"); return(NULL); } memset(ret, 0, sizeof(person)); @@ -105,9 +105,9 @@ DEBUG("parsePerson\n"); /* We don't care what the top level element name is */ cur = cur->xmlChildrenNode; while (cur != NULL) { - if ((!strcmp(cur->name, "Person")) && (cur->ns == ns)) + if ((!strcmp(cur->name, "Person")) && (cur->ns == ns)) ret->name = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); - if ((!strcmp(cur->name, "Email")) && (cur->ns == ns)) + if ((!strcmp(cur->name, "Email")) && (cur->ns == ns)) ret->email = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); cur = cur->next; } @@ -146,13 +146,13 @@ typedef struct job { jobPtr parseJob(xmlDocPtr doc, xmlNsPtr ns, xmlNodePtr cur) { jobPtr ret = NULL; -DEBUG("parseJob\n"); +DEBUG("parseJob\n"); /* * allocate the struct */ ret = (jobPtr) malloc(sizeof(job)); if (ret == NULL) { - fprintf(stderr,"out of memory\n"); + fprintf(stderr,"out of memory\n"); return(NULL); } memset(ret, 0, sizeof(job)); @@ -161,17 +161,17 @@ DEBUG("parseJob\n"); cur = cur->xmlChildrenNode; while (cur != NULL) { - if ((!strcmp(cur->name, "Project")) && (cur->ns == ns)) { - ret->projectID = xmlGetProp(cur, "ID"); + if ((!strcmp(cur->name, "Project")) && (cur->ns == ns)) { + ret->projectID = xmlGetProp(cur, "ID"); if (ret->projectID == NULL) { - fprintf(stderr, "Project has no ID\n"); + fprintf(stderr, "Project has no ID\n"); } } - if ((!strcmp(cur->name, "Application")) && (cur->ns == ns)) + if ((!strcmp(cur->name, "Application")) && (cur->ns == ns)) ret->application = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); - if ((!strcmp(cur->name, "Category")) && (cur->ns == ns)) + if ((!strcmp(cur->name, "Category")) && (cur->ns == ns)) ret->category = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); - if ((!strcmp(cur->name, "Contact")) && (cur->ns == ns)) + if ((!strcmp(cur->name, "Contact")) && (cur->ns == ns)) ret->contact = parsePerson(doc, ns, cur); cur = cur->next; } diff --git a/doc/index.html b/doc/index.html index 88d340c8..a9b30dd8 100644 --- a/doc/index.html +++ b/doc/index.html @@ -203,7 +203,7 @@ A:link, A:visited, A:active { text-decoration: underline } under the <a href="http://www.opensource.org/licenses/mit-license.html">MIT License</a>. XML itself is a metalanguage to design markup languages, i.e. text language where semantic and structure are added to the content using -extra "markup" information enclosed between angle brackets. HTML is the most +extra "markup" information enclosed between angle brackets. HTML is the most well-known markup language. Though the library is written in C <a href="python.html">a variety of language bindings</a> make it available in other environments.</p> <p>Libxml2 is known to be very portable, the library should build and work diff --git a/doc/library.html b/doc/library.html index c2a2b3e5..842dea16 100644 --- a/doc/library.html +++ b/doc/library.html @@ -16,7 +16,7 @@ API should <a href="#DOM">look at DOM</a>.</p><p>The <a href="html/libxml-parser separated from the <a href="html/libxml-htmlparser.html">HTML parser interfaces</a>. Let's have a look at how the XML parser can be called:</p><h3><a name="Invoking" id="Invoking">Invoking the parser : the pull method</a></h3><p>Usually, the first thing to do is to read an XML input. The parser accepts documents either from in-memory strings or from files. The functions are -defined in "parser.h":</p><dl><dt><code>xmlDocPtr xmlParseMemory(char *buffer, int size);</code></dt> +defined in "parser.h":</p><dl><dt><code>xmlDocPtr xmlParseMemory(char *buffer, int size);</code></dt> <dd><p>Parse a null-terminated string containing the document.</p> </dd> </dl><dl><dt><code>xmlDocPtr xmlParseFile(const char *filename);</code></dt> @@ -37,7 +37,7 @@ int xmlParseChunk (xmlParserCtxtPtr ctxt, int size, int terminate);</pre><p>and here is a simple example showing how to use the interface:</p><pre> FILE *f; - f = fopen(filename, "r"); + f = fopen(filename, "r"); if (f != NULL) { int res, size = 1024; char chars[1024]; @@ -55,7 +55,7 @@ int xmlParseChunk (xmlParserCtxtPtr ctxt, xmlFreeParserCtxt(ctxt); } }</pre><p>The HTML parser embedded into libxml2 also has a push interface; the -functions are just prefixed by "html" rather than "xml".</p><h3 id="Invoking2">Invoking the parser: the SAX interface</h3><p>The tree-building interface makes the parser memory-hungry, first loading +functions are just prefixed by "html" rather than "xml".</p><h3 id="Invoking2">Invoking the parser: the SAX interface</h3><p>The tree-building interface makes the parser memory-hungry, first loading the document in memory and then building the tree itself. Reading a document without building the tree is possible using the SAX interfaces (see SAX.h and <a href="http://www.daa.com.au/~james/gnome/xml-sax/xml-sax.html">James @@ -68,23 +68,23 @@ code that produces the XML document used in the previous examples:</p><pre> # xmlDocPtr doc; xmlNodePtr tree, subtree; - doc = xmlNewDoc("1.0"); - doc->children = xmlNewDocNode(doc, NULL, "EXAMPLE", NULL); - xmlSetProp(doc->children, "prop1", "gnome is great"); - xmlSetProp(doc->children, "prop2", "& linux too"); - tree = xmlNewChild(doc->children, NULL, "head", NULL); - subtree = xmlNewChild(tree, NULL, "title", "Welcome to Gnome"); - tree = xmlNewChild(doc->children, NULL, "chapter", NULL); - subtree = xmlNewChild(tree, NULL, "title", "The Linux adventure"); - subtree = xmlNewChild(tree, NULL, "p", "bla bla bla ..."); - subtree = xmlNewChild(tree, NULL, "image", NULL); - xmlSetProp(subtree, "href", "linus.gif");</pre><p>Not really rocket science ...</p><h3><a name="Traversing" id="Traversing">Traversing the tree</a></h3><p>Basically by <a href="html/libxml-tree.html">including "tree.h"</a> your + doc = xmlNewDoc("1.0"); + doc->children = xmlNewDocNode(doc, NULL, "EXAMPLE", NULL); + xmlSetProp(doc->children, "prop1", "gnome is great"); + xmlSetProp(doc->children, "prop2", "& linux too"); + tree = xmlNewChild(doc->children, NULL, "head", NULL); + subtree = xmlNewChild(tree, NULL, "title", "Welcome to Gnome"); + tree = xmlNewChild(doc->children, NULL, "chapter", NULL); + subtree = xmlNewChild(tree, NULL, "title", "The Linux adventure"); + subtree = xmlNewChild(tree, NULL, "p", "bla bla bla ..."); + subtree = xmlNewChild(tree, NULL, "image", NULL); + xmlSetProp(subtree, "href", "linus.gif");</pre><p>Not really rocket science ...</p><h3><a name="Traversing" id="Traversing">Traversing the tree</a></h3><p>Basically by <a href="html/libxml-tree.html">including "tree.h"</a> your code has access to the internal structure of all the elements of the tree. The names should be somewhat simple like <strong>parent</strong>, <strong>children</strong>, <strong>next</strong>, <strong>prev</strong>, <strong>properties</strong>, etc... For example, still with the previous -example:</p><pre><code>doc->children->children->children</code></pre><p>points to the title element,</p><pre>doc->children->children->next->children->children</pre><p>points to the text node containing the chapter title "The Linux -adventure".</p><p><strong>NOTE</strong>: XML allows <em>PI</em>s and <em>comments</em> to be +example:</p><pre><code>doc->children->children->children</code></pre><p>points to the title element,</p><pre>doc->children->children->next->children->children</pre><p>points to the text node containing the chapter title "The Linux +adventure".</p><p><strong>NOTE</strong>: XML allows <em>PI</em>s and <em>comments</em> to be present before the document root, so <code>doc->children</code> may point to an element which is not the document Root Element; a function <code>xmlDocGetRootElement()</code> was added for this purpose.</p><h3><a name="Modifying" id="Modifying">Modifying the tree</a></h3><p>Functions are provided for reading and writing the document content. Here @@ -101,7 +101,7 @@ is an excerpt from the <a href="html/libxml-tree.html">tree API</a>:</p><dl><dt> </dl><p>Two functions are provided for reading and writing the text associated with elements:</p><dl><dt><code>xmlNodePtr xmlStringGetNodeList(xmlDocPtr doc, const xmlChar *value);</code></dt> - <dd><p>This function takes an "external" string and converts it to one + <dd><p>This function takes an "external" string and converts it to one text node or possibly to a list of entity and text nodes. All non-predefined entity references like &Gnome; will be stored internally as entity nodes, hence the result of the function may not be @@ -115,7 +115,7 @@ with elements:</p><dl><dt><code>xmlNodePtr xmlStringGetNodeList(xmlDocPtr doc, c argument inLine. If this argument is set to 1, the function will expand entity references. For example, instead of returning the &Gnome; XML encoding in the string, it will substitute it with its value (say, - "GNU Network Object Model Environment").</p> + "GNU Network Object Model Environment").</p> </dd> </dl><h3><a name="Saving" id="Saving">Saving a tree</a></h3><p>Basically 3 options are possible:</p><dl><dt><code>void xmlDocDumpMemory(xmlDocPtr cur, xmlChar**mem, int *size);</code></dt> diff --git a/doc/namespaces.html b/doc/namespaces.html index 689a721d..6b9ab996 100644 --- a/doc/namespaces.html +++ b/doc/namespaces.html @@ -17,14 +17,14 @@ root element of their document as the default namespace. Then they don't need to use the prefix in the content but we will have a basis for future semantic refinement and merging of data from different sources. This doesn't increase the size of the XML output significantly, but significantly increases its -value in the long-term. Example:</p><pre><mydoc xmlns="http://mydoc.example.org/schemas/"> +value in the long-term. Example:</p><pre><mydoc xmlns="http://mydoc.example.org/schemas/"> <elem1>...</elem1> <elem2>...</elem2> </mydoc></pre><p>The namespace value has to be an absolute URL, but the URL doesn't have to point to any existing resource on the Web. It will bind all the element and attributes with that URL. I suggest to use an URL within a domain you control, and that the URL should contain some kind of version information if -possible. For example, <code>"http://www.gnome.org/gnumeric/1.0/"</code> is a +possible. For example, <code>"http://www.gnome.org/gnumeric/1.0/"</code> is a good namespace scheme.</p><p>Then when you load a file, make sure that a namespace carrying the version-independent prefix is installed on the root element of your document, and if the version information don't match something you know, warn the user @@ -35,15 +35,15 @@ associated with the element or the attribute, not the prefix string (which is just a shortcut for the full URI). In libxml, element and attributes have an <code>ns</code> field pointing to an xmlNs structure detailing the namespace prefix and its URI.</p><p>@@Interfaces@@</p><pre>xmlNodePtr node; -if(!strncmp(node->name,"mytag",5) +if(!strncmp(node->name,"mytag",5) && node->ns - && !strcmp(node->ns->href,"http://www.mysite.com/myns/1.0")) { + && !strcmp(node->ns->href,"http://www.mysite.com/myns/1.0")) { ... }</pre><p>Usually people object to using namespaces together with validity checking. I will try to make sure that using namespaces won't break validity checking, so even if you plan to use or currently are using validation I strongly suggest adding namespaces to your document. A default namespace scheme -<code>xmlns="http://...."</code> should not break validity even on less +<code>xmlns="http://...."</code> should not break validity even on less flexible parsers. Using namespaces to mix and differentiate content coming from multiple DTDs will certainly break current validation schemes. To check such documents one needs to use schema-validation, which is supported in diff --git a/doc/news.html b/doc/news.html index 7dca4215..cd71924e 100644 --- a/doc/news.html +++ b/doc/news.html @@ -135,7 +135,7 @@ to test those</p><ul><li>More testing on RelaxNG</li> xmlSearchNs() by Luca Padovani. The xmlReader should do far less allocation and it speed should get closer to SAX. Chris Anderson worked on speeding and cleaning up repetitive checking code.</li> - <li>cleanup of "make tests"</li> + <li>cleanup of "make tests"</li> <li>libxml-2.0-uninstalled.pc from Malcolm Tredinnick</li> <li>deactivated the broken docBook SGML parser code and plugged the XML parser instead.</li> @@ -191,7 +191,7 @@ to test those</p><ul><li>More testing on RelaxNG</li> <li>Fixes: update of the Trio code (Bjorn), WXS Date and Duration fixes (Charles Bozeman), DTD and namespaces (Brent Hendricks), HTML push parser and zero bytes handling, some missing Windows file path conversions, - behaviour of the parser and validator in the presence of "out of memory" + behaviour of the parser and validator in the presence of "out of memory" error conditions</li> <li>extended the API to be able to plug a garbage collecting memory allocator, added xmlMallocAtomic() and modified the allocations @@ -284,7 +284,7 @@ to test those</p><ul><li>More testing on RelaxNG</li> <li>2 bug fixes in the XML push parser</li> <li>potential memory leak removed (Martin Stoilov)</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>nasty threading bug fixed (William Brack)</li> </ul><h3>2.4.27: Nov 17 2002</h3><ul><li>fixes for the Python bindings</li> @@ -370,8 +370,8 @@ it's actually not compiled in by default. The real fixes are:</p><ul><li>a coupl <li>serious cleanup of the Python makefiles</li> <li>speedup patch to XPath very effective for DocBook stylesheets</li> <li>Fixes for Windows build, cleanup of the documentation</li> -</ul><h3>2.4.17: Mar 8 2002</h3><ul><li>a lot of bug fixes, including "namespace nodes have no parents in - XPath"</li> +</ul><h3>2.4.17: Mar 8 2002</h3><ul><li>a lot of bug fixes, including "namespace nodes have no parents in + XPath"</li> <li>fixed/improved the Python wrappers, added more examples and more regression tests, XPath extension functions can now return node-sets</li> <li>added the XML Canonicalization support from Aleksey Sanin</li> @@ -684,7 +684,7 @@ it's actually not compiled in by default. The real fixes are:</p><ul><li>a coupl $prefix/include/gnome-xml), they also are referenced by <pre>#include <libxml/xxx.h></pre> <p>instead of</p> - <pre>#include "xxx.h"</pre> + <pre>#include "xxx.h"</pre> </li> <li>a new URI module for parsing URIs and following strictly RFC 2396</li> <li>the memory allocation routines used by libxml can now be overloaded @@ -765,7 +765,7 @@ it's actually not compiled in by default. The real fixes are:</p><ul><li>a coupl xmlDocSetRootElement</li> <li>Tried to improve the HTML output with help from <a href="mailto:clahey@umich.edu">Chris Lahey</a></li> </ul><h3>1.8.1: Dec 18 1999</h3><ul><li>various patches to avoid troubles when using libxml with C++ compilers - the "namespace" keyword and C escaping in include files</li> + the "namespace" keyword and C escaping in include files</li> <li>a problem in one of the core macros IS_CHAR was corrected</li> <li>fixed a bug introduced in 1.8.0 breaking default namespace processing, and more specifically the Dia application</li> diff --git a/doc/python.html b/doc/python.html index 99477340..44e3d097 100644 --- a/doc/python.html +++ b/doc/python.html @@ -33,7 +33,7 @@ or libxslt wrappers or bindings:</p><ul><li><a href="http://libxmlplusplus.sourc libxml2</a> with Kylix, Delphi and other Pascal compilers.</li> <li>Uwe Fechner also provides <a href="http://sourceforge.net/projects/idom2-pas/">idom2</a>, a DOM2 implementation for Kylix2/D5/D6 from Borland.</li> - <li>Wai-Sun "Squidster" Chia provides <a href="http://www.rubycolor.org/arc/redist/">bindings for Ruby</a> and + <li>Wai-Sun "Squidster" Chia provides <a href="http://www.rubycolor.org/arc/redist/">bindings for Ruby</a> and libxml2 bindings are also available in Ruby through the <a href="http://libgdome-ruby.berlios.de/">libgdome-ruby</a> module maintained by Tobias Peters.</li> <li>Steve Ball and contributors maintains <a href="http://tclxml.sourceforge.net/">libxml2 and libxslt bindings for @@ -58,23 +58,23 @@ build the bindings is python/generator.py in the source distribution.</p><p>To i <li>Otherwise use the <a href="ftp://xmlsoft.org/python/">libxml2-python module distribution</a> corresponding to your installed version of libxml2 and libxslt. Note that to install it you will need both libxml2 - and libxslt installed and run "python setup.py build install" in the + and libxslt installed and run "python setup.py build install" in the module tree.</li> </ul><p>The distribution includes a set of examples and regression tests for the python bindings in the <code>python/tests</code> directory. Here are some excerpts from those tests:</p><h3>tst.py:</h3><p>This is a basic test of the file interface and DOM navigation:</p><pre>import libxml2, sys -doc = libxml2.parseFile("tst.xml") -if doc.name != "tst.xml": - print "doc.name failed" +doc = libxml2.parseFile("tst.xml") +if doc.name != "tst.xml": + print "doc.name failed" sys.exit(1) root = doc.children -if root.name != "doc": - print "root.name failed" +if root.name != "doc": + print "root.name failed" sys.exit(1) child = root.children -if child.name != "foo": - print "child.name failed" +if child.name != "foo": + print "child.name failed" sys.exit(1) doc.freeDoc()</pre><p>The Python module is called libxml2; parseFile is the equivalent of xmlParseFile (most of the bindings are automatically generated, and the xml @@ -101,14 +101,14 @@ def noerr(ctx, str): libxml2.registerErrorHandler(noerr, None) -ctxt = libxml2.createFileParserCtxt("invalid.xml") +ctxt = libxml2.createFileParserCtxt("invalid.xml") ctxt.validate(1) ctxt.parseDocument() doc = ctxt.doc() valid = ctxt.isValid() doc.freeDoc() if valid != 0: - print "validity check failed"</pre><p>The first thing to notice is the call to registerErrorHandler(), it + print "validity check failed"</pre><p>The first thing to notice is the call to registerErrorHandler(), it defines a new error handler global to the library. It is used to avoid seeing the error messages when trying to validate the invalid document.</p><p>The main interest of that test is the creation of a parser context with createFileParserCtxt() and how the behaviour can be changed before calling @@ -118,8 +118,8 @@ C function interfaces in terms of objects method as much as possible. The best to get a complete view of what methods are supported is to look at the libxml2.py module containing all the wrappers.</p><h3>push.py:</h3><p>This test show how to activate the push parser interface:</p><pre>import libxml2 -ctxt = libxml2.createPushParser(None, "<foo", 4, "test.xml") -ctxt.parseChunk("/>", 2, 1) +ctxt = libxml2.createPushParser(None, "<foo", 4, "test.xml") +ctxt.parseChunk("/>", 2, 1) doc = ctxt.doc() doc.freeDoc()</pre><p>The context is created with a special call based on the @@ -129,71 +129,71 @@ the resource in case URI-References need to be computed by the parser.</p><p>The setting the third argument terminate to 1.</p><h3>pushSAX.py:</h3><p>this test show the use of the event based parsing interfaces. In this case the parser does not build a document, but provides callback information as the parser makes progresses analyzing the data being provided:</p><pre>import libxml2 -log = "" +log = "" class callback: def startDocument(self): global log - log = log + "startDocument:" + log = log + "startDocument:" def endDocument(self): global log - log = log + "endDocument:" + log = log + "endDocument:" def startElement(self, tag, attrs): global log - log = log + "startElement %s %s:" % (tag, attrs) + log = log + "startElement %s %s:" % (tag, attrs) def endElement(self, tag): global log - log = log + "endElement %s:" % (tag) + log = log + "endElement %s:" % (tag) def characters(self, data): global log - log = log + "characters: %s:" % (data) + log = log + "characters: %s:" % (data) def warning(self, msg): global log - log = log + "warning: %s:" % (msg) + log = log + "warning: %s:" % (msg) def error(self, msg): global log - log = log + "error: %s:" % (msg) + log = log + "error: %s:" % (msg) def fatalError(self, msg): global log - log = log + "fatalError: %s:" % (msg) + log = log + "fatalError: %s:" % (msg) handler = callback() -ctxt = libxml2.createPushParser(handler, "<foo", 4, "test.xml") -chunk = " url='tst'>b" +ctxt = libxml2.createPushParser(handler, "<foo", 4, "test.xml") +chunk = " url='tst'>b" ctxt.parseChunk(chunk, len(chunk), 0) -chunk = "ar</foo>" +chunk = "ar</foo>" ctxt.parseChunk(chunk, len(chunk), 1) -reference = "startDocument:startElement foo {'url': 'tst'}:" + \ - "characters: bar:endElement foo:endDocument:" +reference = "startDocument:startElement foo {'url': 'tst'}:" + \ + "characters: bar:endElement foo:endDocument:" if log != reference: - print "Error got: %s" % log - print "Expected: %s" % reference</pre><p>The key object in that test is the handler, it provides a number of entry + print "Error got: %s" % log + print "Expected: %s" % reference</pre><p>The key object in that test is the handler, it provides a number of entry points which can be called by the parser as it makes progresses to indicate the information set obtained. The full set of callback is larger than what the callback class in that specific example implements (see the SAX definition for a complete list). The wrapper will only call those supplied by the object when activated. The startElement receives the names of the element and a dictionary containing the attributes carried by this element.</p><p>Also note that the reference string generated from the callback shows a -single character call even though the string "bar" is passed to the parser +single character call even though the string "bar" is passed to the parser from 2 different call to parseChunk()</p><h3>xpath.py:</h3><p>This is a basic test of XPath wrappers support</p><pre>import libxml2 -doc = libxml2.parseFile("tst.xml") +doc = libxml2.parseFile("tst.xml") ctxt = doc.xpathNewContext() -res = ctxt.xpathEval("//*") +res = ctxt.xpathEval("//*") if len(res) != 2: - print "xpath query: wrong node set size" + print "xpath query: wrong node set size" sys.exit(1) -if res[0].name != "doc" or res[1].name != "foo": - print "xpath query: wrong node set value" +if res[0].name != "doc" or res[1].name != "foo": + print "xpath query: wrong node set value" sys.exit(1) doc.freeDoc() ctxt.xpathFreeContext()</pre><p>This test parses a file, then create an XPath context to evaluate XPath @@ -208,12 +208,12 @@ python:</p><pre>import libxml2 def foo(ctx, x): return x + 1 -doc = libxml2.parseFile("tst.xml") +doc = libxml2.parseFile("tst.xml") ctxt = doc.xpathNewContext() -libxml2.registerXPathFunction(ctxt._o, "foo", None, foo) -res = ctxt.xpathEval("foo(1)") +libxml2.registerXPathFunction(ctxt._o, "foo", None, foo) +res = ctxt.xpathEval("foo(1)") if res != 2: - print "xpath extension failure" + print "xpath extension failure" doc.freeDoc() ctxt.xpathFreeContext()</pre><p>Note how the extension function is registered with the context (but that part is not yet finalized, this may change slightly in the future).</p><h3>tstxpath.py:</h3><p>This test is similar to the previous one but shows how the extension @@ -232,9 +232,9 @@ evaluation point.</p><h3>Memory debugging:</h3><p>last but not least, all tests libxml2.debugMemory(1)</pre><p>and ends with the following epilogue:</p><pre>#memory debug specific libxml2.cleanupParser() if libxml2.debugMemory(1) == 0: - print "OK" + print "OK" else: - print "Memory leak %d bytes" % (libxml2.debugMemory(1)) + print "Memory leak %d bytes" % (libxml2.debugMemory(1)) libxml2.dumpMemory()</pre><p>Those activate the memory debugging interface of libxml2 where all allocated block in the library are tracked. The prologue then cleans up the library state and checks that all allocated memory has been freed. If not it diff --git a/doc/threads.html b/doc/threads.html index 27c68bfe..3eacf999 100644 --- a/doc/threads.html +++ b/doc/threads.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } </style><title>Thread safety</title></head><body bgcolor="#8b7765" text="#000000" link="#000000" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Thread safety</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://garypennington.net/libxml2/">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></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"><p>Starting with 2.4.7, libxml2 makes provisions to ensure that concurrent threads can safely work in parallel parsing different documents. There is however a couple of things to do to ensure it:</p><ul><li>configure the library accordingly using the --with-threads options</li> - <li>call xmlInitParser() in the "main" thread before using any of the + <li>call xmlInitParser() in the "main" thread before using any of the libxml2 API (except possibly selecting a different memory allocator)</li> </ul><p>Note that the thread safety cannot be ensured for multiple threads sharing the same document, the locking must be done at the application level, libxml diff --git a/doc/upgrade.html b/doc/upgrade.html index 34fac4d5..a7ea3e34 100644 --- a/doc/upgrade.html +++ b/doc/upgrade.html @@ -10,7 +10,7 @@ A:link, A:visited, A:active { text-decoration: underline } </style><title>Upgrading 1.x code</title></head><body bgcolor="#8b7765" text="#000000" link="#000000" vlink="#000000"><table border="0" width="100%" cellpadding="5" cellspacing="0" align="center"><tr><td width="120"><a href="http://swpat.ffii.org/"><img src="epatents.png" alt="Action against software patents" /></a></td><td width="180"><a href="http://www.gnome.org/"><img src="gnome2.png" alt="Gnome2 Logo" /></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C Logo" /></a><a href="http://www.redhat.com/"><img src="redhat.gif" alt="Red Hat Logo" /></a><div align="left"><a href="http://xmlsoft.org/"><img src="Libxml2-Logo-180x168.gif" alt="Made with Libxml2 Logo" /></a></div></td><td><table border="0" width="90%" cellpadding="2" cellspacing="0" align="center" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3" bgcolor="#fffacd"><tr><td align="center"><h1>The XML C parser and toolkit of Gnome</h1><h2>Upgrading 1.x code</h2></td></tr></table></td></tr></table></td></tr></table><table border="0" cellpadding="4" cellspacing="0" width="100%" align="center"><tr><td bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="2" width="100%"><tr><td valign="top" width="200" bgcolor="#8b7765"><table border="0" cellspacing="0" cellpadding="1" width="100%" bgcolor="#000000"><tr><td><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Developer Menu</b></center></td></tr><tr><td bgcolor="#fffacd"><form action="search.php" enctype="application/x-www-form-urlencoded" method="get"><input name="query" type="text" size="20" value="" /><input name="submit" type="submit" value="Search ..." /></form><ul><li><a href="index.html" style="font-weight:bold">Main Menu</a></li><li><a href="examples/index.html" style="font-weight:bold">Code Examples</a></li><li><a href="guidelines.html">XML Guidelines</a></li><li><a href="tutorial/index.html">Tutorial</a></li><li><a href="xmlreader.html">The Reader Interface</a></li><li><a href="XSLT.html">XSLT</a></li><li><a href="python.html">Python and bindings</a></li><li><a href="architecture.html">libxml2 architecture</a></li><li><a href="tree.html">The tree output</a></li><li><a href="interface.html">The SAX interface</a></li><li><a href="xmlmem.html">Memory Management</a></li><li><a href="xmlio.html">I/O Interfaces</a></li><li><a href="library.html">The parser interfaces</a></li><li><a href="entities.html">Entities or no entities</a></li><li><a href="namespaces.html">Namespaces</a></li><li><a href="upgrade.html">Upgrading 1.x code</a></li><li><a href="threads.html">Thread safety</a></li><li><a href="DOM.html">DOM Principles</a></li><li><a href="example.html">A real example</a></li><li><a href="xml.html">flat page</a>, <a href="site.xsl">stylesheet</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>API Indexes</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="APIchunk0.html">Alphabetic</a></li><li><a href="APIconstructors.html">Constructors</a></li><li><a href="APIfunctions.html">Functions/Types</a></li><li><a href="APIfiles.html">Modules</a></li><li><a href="APIsymbols.html">Symbols</a></li></ul></td></tr></table><table width="100%" border="0" cellspacing="1" cellpadding="3"><tr><td colspan="1" bgcolor="#eecfa1" align="center"><center><b>Related links</b></center></td></tr><tr><td bgcolor="#fffacd"><ul><li><a href="http://mail.gnome.org/archives/xml/">Mail archive</a></li><li><a href="http://xmlsoft.org/XSLT/">XSLT libxslt</a></li><li><a href="http://phd.cs.unibo.it/gdome2/">DOM gdome2</a></li><li><a href="http://www.aleksey.com/xmlsec/">XML-DSig xmlsec</a></li><li><a href="ftp://xmlsoft.org/">FTP</a></li><li><a href="http://www.zlatkovic.com/projects/libxml/">Windows binaries</a></li><li><a href="http://garypennington.net/libxml2/">Solaris binaries</a></li><li><a href="http://www.zveno.com/open_source/libxml2xslt.html">MacOsX binaries</a></li><li><a href="http://sourceforge.net/projects/libxml2-pas/">Pascal bindings</a></li><li><a href="http://bugzilla.gnome.org/buglist.cgi?product=libxml2">Bug Tracker</a></li></ul></td></tr></table></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"><p>Incompatible changes:</p><p>Version 2 of libxml2 is the first version introducing serious backward incompatible changes. The main goals were:</p><ul><li>a general cleanup. A number of mistakes inherited from the very early versions couldn't be changed due to compatibility constraints. Example - the "childs" element in the nodes.</li> + the "childs" element in the nodes.</li> <li>Uniformization of the various nodes, at least for their header and link parts (doc, parent, children, prev, next), the goal is a simpler programming model and simplifying the task of the DOM implementors.</li> @@ -29,7 +29,7 @@ mail</a>:</p><ol><li>The package name have changed from libxml to libxml2, the l select the right parameters libxml2</li> <li>Node <strong>childs</strong> field has been renamed <strong>children</strong> so s/childs/children/g should be applied - (probability of having "childs" anywhere else is close to 0+</li> + (probability of having "childs" anywhere else is close to 0+</li> <li>The document don't have anymore a <strong>root</strong> element it has been replaced by <strong>children</strong> and usually you will get a list of element here. For example a Dtd element for the internal subset diff --git a/doc/xml.html b/doc/xml.html index 63c99a26..fcd49ad2 100644 --- a/doc/xml.html +++ b/doc/xml.html @@ -194,7 +194,7 @@ libxml2</p> <li><em>Where can I get libxml</em> ? <p>The original distribution comes from <a href="ftp://rpmfind.net/pub/libxml/">rpmfind.net</a> or <a - href="ftp://ftp.gnome.org/pub/GNOME/sources/libxml2/2.5/">gnome.org</a></p> + href="ftp://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6/">gnome.org</a></p> <p>Most Linux and BSD distributions include libxml, this is probably the safer way for end-users to use libxml.</p> <p>David Doolin provides precompiled Windows versions at <a @@ -591,7 +591,7 @@ href="ftp://xmlsoft.org/">xmlsoft.org</a> (<a href="ftp://speakeasy.rpmfind.net/pub/libxml/">Seattle</a>, <a href="ftp://fr.rpmfind.net/pub/libxml/">France</a>) or on the <a href="ftp://ftp.gnome.org/pub/GNOME/MIRRORS.html">Gnome FTP server</a> either -as a <a href="ftp://ftp.gnome.org/pub/GNOME/sources/libxml2/2.5/">source +as a <a href="ftp://ftp.gnome.org/pub/GNOME/sources/libxml2/2.6/">source archive</a><!-- commenting this out because they seem to have disappeared or <a href="ftp://ftp.gnome.org/pub/GNOME/stable/redhat/i386/libxml/">RPM packages</a> --> diff --git a/doc/xmldtd.html b/doc/xmldtd.html index 8a25088b..5287148f 100644 --- a/doc/xmldtd.html +++ b/doc/xmldtd.html @@ -40,7 +40,7 @@ harder to design. I will just focus on DTDs for a formats with a fixed simple structure. It is just a set of basic rules, and definitely not exhaustive nor usable for complex DTD design.</p><h4><a name="reference1" id="reference1">How to reference a DTD from a document</a>:</h4><p>Assuming the top element of the document is <code>spec</code> and the dtd is placed in the file <code>mydtd</code> in the subdirectory -<code>dtds</code> of the directory from where the document were loaded:</p><p><code><!DOCTYPE spec SYSTEM "dtds/mydtd"></code></p><p>Notes:</p><ul><li>The system string is actually an URI-Reference (as defined in <a href="http://www.ietf.org/rfc/rfc2396.txt">RFC 2396</a>) so you can use a +<code>dtds</code> of the directory from where the document were loaded:</p><p><code><!DOCTYPE spec SYSTEM "dtds/mydtd"></code></p><p>Notes:</p><ul><li>The system string is actually an URI-Reference (as defined in <a href="http://www.ietf.org/rfc/rfc2396.txt">RFC 2396</a>) so you can use a full URL string indicating the location of your DTD on the Web. This is a really good thing to do if you want others to validate your document.</li> <li>It is also possible to associate a <code>PUBLIC</code> identifier (a @@ -64,9 +64,9 @@ order.</p><h4><a name="Declaring1" id="Declaring1">Declaring attributes</a>:</h4 attribute containing text (<code>CDATA</code>) and which is optional (<code>#IMPLIED</code>). The attribute value can also be defined within a set:</p><p><code><!ATTLIST list type (bullets|ordered|glossary) -"ordered"></code></p><p>means <code>list</code> element have a <code>type</code> attribute with 3 -allowed values "bullets", "ordered" or "glossary" and which default to -"ordered" if the attribute is not explicitly specified.</p><p>The content type of an attribute can be text (<code>CDATA</code>), +"ordered"></code></p><p>means <code>list</code> element have a <code>type</code> attribute with 3 +allowed values "bullets", "ordered" or "glossary" and which default to +"ordered" if the attribute is not explicitly specified.</p><p>The content type of an attribute can be text (<code>CDATA</code>), anchor/reference/references (<code>ID</code>/<code>IDREF</code>/<code>IDREFS</code>), entity(ies) (<code>ENTITY</code>/<code>ENTITIES</code>) or name(s) diff --git a/doc/xmlmem.html b/doc/xmlmem.html index a2d3c595..ba85307e 100644 --- a/doc/xmlmem.html +++ b/doc/xmlmem.html @@ -52,7 +52,7 @@ or call a specific routine when a given block number is allocated:</p><ul><li><a ()</a> dumps all the informations about the allocated memory block lefts in the <code>.memdump</code> file</li> </ul><p>When developing libxml2 memory debug is enabled, the tests programs call -xmlMemoryDump () and the "make test" regression tests will check for any +xmlMemoryDump () and the "make test" regression tests will check for any memory leak during the full regression test sequence, this helps a lot ensuring that libxml2 does not leak memory and bullet proof memory allocations use (some libc implementations are known to be far too permissive |