on-line update, Daniel
diff --git a/doc/xml.html b/doc/xml.html
index a39279e..2f08585 100644
--- a/doc/xml.html
+++ b/doc/xml.html
@@ -3,14 +3,14 @@
<html>
<head>
<title>The XML library for Gnome</title>
- <meta name="GENERATOR" content="amaya V3.1">
+ <meta name="GENERATOR" content="amaya V3.2">
<meta http-equiv="Content-Type" content="text/html">
</head>
<body bgcolor="#ffffff">
-<p><a href="http://www.gnome.org/"><img src="smallfootonly.gif" alt="Gnome
-Logo"></a><a href="http://www.w3.org/Status"><img src="w3c.png" alt="W3C
-Logo"></a></p>
+<p><a href="http://www.gnome.org/"><img src="smallfootonly.gif"
+alt="Gnome Logo"></a><a href="http://www.w3.org/Status"><img src="w3c.png"
+alt="W3C Logo"></a></p>
<h1 align="center">The XML library for Gnome</h1>
@@ -190,6 +190,13 @@
if you want to test those.</li>
</ul>
+<h3>1.8.9: July 9 2000</h3>
+<ul>
+ <li>fixed the spec the RPMs should be better</li>
+ <li>fixed a serious bug in the FTP implementation, released 1.8.9 to solve
+ rpmfind users problem</li>
+</ul>
+
<h3>2.1.1: July 1 2000</h3>
<ul>
<li>fixes a couple of bugs in the 2.1.0 packaging</li>
@@ -223,7 +230,7 @@
workload.</li>
<li>The include are now located under $prefix/include/libxml (instead of
$prefix/include/gnome-xml), they also are referenced by
- <pre>#include <libxml/xxx.h></pre>
+ <pre>#include <libxml/xxx.h></pre>
<p>instead of</p>
<pre>#include "xxx.h"</pre>
</li>
@@ -282,8 +289,8 @@
that for adherence to XML spec, this behaviour will be disabled by default
in 2.x . The same function will allow to keep compatibility for old
code.</li>
- <li>Blanks in <a> </a> constructs are not ignored anymore, avoiding
- heuristic is really the Right Way :-\</li>
+ <li>Blanks in <a> </a> constructs are not ignored anymore,
+ avoiding heuristic is really the Right Way :-\</li>
<li>The unchecked use of snprintf which was breaking libxml-1.8.6
compilation on some platforms has been fixed</li>
<li>nanoftp.c nanohttp.c: Fixed '#' and '?' stripping when processing
@@ -303,8 +310,8 @@
href="http://www.w3.org/TR/REC-xml#NT-content">[43] content</a> of the XML
spec)</li>
<li>fixed a hideous bug in xmlGetProp pointed by Rune.Djurhuus@fast.no</li>
- <li>Jody Goldberg <jgoldberg@home.com> provided another patch trying to
- solve the zlib checks problems</li>
+ <li>Jody Goldberg <jgoldberg@home.com> provided another patch trying
+ to solve the zlib checks problems</li>
<li>The current state in gnome CVS base is expected to ship as 1.8.5 with
gnumeric soon</li>
</ul>
@@ -411,27 +418,27 @@
<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">an example XML
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"/>
- <p>...</p>
- </chapter>
-</EXAMPLE></pre>
+<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"/>
+ <p>...</p>
+ </chapter>
+</EXAMPLE></pre>
<p>The first line specifies that it's an XML document and gives useful
information about its encoding. Then the document is a text format whose
structure is specified by tags between brackets. <strong>Each tag opened has
to be closed</strong>. XML is pedantic about this. However, if a tag is empty
(no content), a single tag can serve as both the opening and closing tag if it
-ends with <code>/></code> rather than with <code>></code>. Note that, for
-example, the image tag has no content (just an attribute) and is closed by
-ending the tag with <code>/></code>.</p>
+ends with <code>/></code> rather than with <code>></code>. Note that,
+for example, the image tag has no content (just an attribute) and is closed by
+ending the tag with <code>/></code>.</p>
<p>XML can be applied sucessfully to a wide range of uses, from long term
structured document maintenance (where it follows the steps of SGML) to simple
@@ -447,7 +454,7 @@
as the file name, the document type, and a <strong>children</strong> pointer
which is the root of the document (or more exactly the first child under the
root which is the document). The tree is made of <strong>xmlNode</strong>s,
-chained in double-linked lists of siblings and with children<->parent
+chained in double-linked lists of siblings and with children<->parent
relationship. An xmlNode can also carry properties (a chain of xmlAttr
structures). An attribute may have a value which is a list of TEXT or
ENTITY_REF nodes.</p>
@@ -506,7 +513,7 @@
<p>To get more detailed step-by-step guidance on using the SAX interface of
libxml, see the
-href="http://www.daa.com.au/~james/gnome/xml-sax/xml-sax.html">nice
+href="http://www.daa.com.au/~james/gnome/xml-sax/xml-sax.html">nice
documentation.written by <a href="mailto:james@daa.com.au">James
Henstridge</a>.</p>
@@ -614,14 +621,14 @@
xmlParserCtxtPtr ctxt;
res = fread(chars, 1, 4, f);
- if (res > 0) {
+ if (res > 0) {
ctxt = xmlCreatePushParserCtxt(NULL, NULL,
chars, res, filename);
- while ((res = fread(chars, 1, size, f)) > 0) {
+ while ((res = fread(chars, 1, size, f)) > 0) {
xmlParseChunk(ctxt, chars, res, 0);
}
xmlParseChunk(ctxt, chars, 0, 1);
- doc = ctxt->myDoc;
+ doc = ctxt->myDoc;
xmlFreeParserCtxt(ctxt);
}
}</pre>
@@ -644,19 +651,19 @@
<p>The other way to get an XML tree in memory is by building it. Basically
there is a set of functions dedicated to building new elements. (These are
-also described in <libxml/tree.h>.) For example, here is a piece of code
+also described in <libxml/tree.h>.) For example, here is a piece of code
that produces the XML document used in the previous examples:</p>
-<pre> #include <libxml/tree.h>
+<pre> #include <libxml/tree.h>
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);
+ 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);
+ 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);
@@ -672,17 +679,17 @@
<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>
+<pre><code>doc->children->children->children</code></pre>
<p>points to the title element,</p>
-<pre>doc->children->children->next->child->child</pre>
+<pre>doc->children->children->next->child->child</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
+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">Modifying the tree</a></h3>
@@ -784,20 +791,20 @@
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"?>
+<pre>1 <?xml version="1.0"?>
2 <!DOCTYPE EXAMPLE SYSTEM "example.dtd" [
-3 <!ENTITY xml "Extensible Markup Language">
-4 ]>
-5 <EXAMPLE>
+3 <!ENTITY xml "Extensible Markup Language">
+4 ]>
+5 <EXAMPLE>
6 &xml;
-7 </EXAMPLE></pre>
+7 </EXAMPLE></pre>
<p>Line 3 declares the xml entity. Line 6 uses the xml entity, by prefixing
it's name with '&' and following it by ';' without any spaces added. There
are 5 predefined entities in libxml allowing you to escape charaters 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 ''',
+for the character '>', <strong>&apos;</strong> for the character ''',
<strong>&quot;</strong> for the character '"', and
<strong>&amp;</strong> for the character '&'.</p>
@@ -814,7 +821,7 @@
<p>Here is the DOM tree built by libxml for the previous document in the
default case:</p>
-<pre>/gnome/src/gnome-xml -> ./xmllint --debug test/ent1
+<pre>/gnome/src/gnome-xml -> ./xmllint --debug test/ent1
DOCUMENT
version=1.0
ELEMENT EXAMPLE
@@ -827,7 +834,7 @@
content=</pre>
<p>And here is the result when substituting entities:</p>
-<pre>/gnome/src/gnome-xml -> ./tester --debug --noent test/ent1
+<pre>/gnome/src/gnome-xml -> ./tester --debug --noent test/ent1
DOCUMENT
version=1.0
ELEMENT EXAMPLE
@@ -861,10 +868,10 @@
refinement and merging of data from different sources. This doesn't augment
significantly the size of the XML output, but significantly increase its value
in the long-term. Example:</p>
-<pre><mydoc xmlns="http://mydoc.example.org/schemas/">
- <elem1>...</elem1>
- <elem2>...</elem2>
-</mydoc></pre>
+<pre><mydoc xmlns="http://mydoc.example.org/schemas/">
+ <elem1>...</elem1>
+ <elem2>...</elem2>
+</mydoc></pre>
<p>Concerning the namespace value, this has to be an URL, but the URL doesn't
have to point to any existing resource on the Web. It will bind all the
@@ -877,10 +884,10 @@
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
and be liberal in what you accept as the input. Also do *not* try to base
-namespace checking on the prefix value. <foo:text> may be exactly the same
-as <bar:text> in another document. What really matter is the URI 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 a
+namespace checking on the prefix value. <foo:text> may be exactly the
+same as <bar:text> in another document. What really matter is the URI
+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 a
<code>ns</code> field pointing to an xmlNs structure detailing the namespace
prefix and it's URI.</p>
@@ -972,49 +979,49 @@
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">
- <gjob:Jobs>
+<pre><?xml version="1.0"?>
+<gjob:Helping xmlns:gjob="http://www.gnome.org/some-location">
+ <gjob:Jobs>
- <gjob:Job>
- <gjob:Project ID="3"/>
- <gjob:Application>GBackup</gjob:Application>
- <gjob:Category>Development</gjob:Category>
+ <gjob:Job>
+ <gjob:Project ID="3"/>
+ <gjob:Application>GBackup</gjob:Application>
+ <gjob:Category>Development</gjob:Category>
- <gjob:Update>
- <gjob:Status>Open</gjob:Status>
- <gjob:Modified>Mon, 07 Jun 1999 20:27:45 -0400 MET DST</gjob:Modified>
- <gjob:Salary>USD 0.00</gjob:Salary>
- </gjob:Update>
+ <gjob:Update>
+ <gjob:Status>Open</gjob:Status>
+ <gjob:Modified>Mon, 07 Jun 1999 20:27:45 -0400 MET DST</gjob:Modified>
+ <gjob:Salary>USD 0.00</gjob:Salary>
+ </gjob:Update>
- <gjob:Developers>
- <gjob:Developer>
- </gjob:Developer>
- </gjob:Developers>
+ <gjob:Developers>
+ <gjob:Developer>
+ </gjob:Developer>
+ </gjob:Developers>
- <gjob:Contact>
- <gjob:Person>Nathan Clemons</gjob:Person>
- <gjob:Email>nathan@windsofstorm.net</gjob:Email>
- <gjob:Company>
- </gjob:Company>
- <gjob:Organisation>
- </gjob:Organisation>
- <gjob:Webpage>
- </gjob:Webpage>
- <gjob:Snailmail>
- </gjob:Snailmail>
- <gjob:Phone>
- </gjob:Phone>
- </gjob:Contact>
+ <gjob:Contact>
+ <gjob:Person>Nathan Clemons</gjob:Person>
+ <gjob:Email>nathan@windsofstorm.net</gjob:Email>
+ <gjob:Company>
+ </gjob:Company>
+ <gjob:Organisation>
+ </gjob:Organisation>
+ <gjob:Webpage>
+ </gjob:Webpage>
+ <gjob:Snailmail>
+ </gjob:Snailmail>
+ <gjob:Phone>
+ </gjob:Phone>
+ </gjob:Contact>
- <gjob:Requirements>
+ <gjob:Requirements>
The program should be released as free software, under the GPL.
- </gjob:Requirements>
+ </gjob:Requirements>
- <gjob:Skills>
- </gjob:Skills>
+ <gjob:Skills>
+ </gjob:Skills>
- <gjob:Details>
+ <gjob:Details>
A GNOME based system that will allow a superuser to configure
compressed and uncompressed files and/or file systems to be backed
up with a supported media in the system. This should be able to
@@ -1022,12 +1029,12 @@
to tar, dd, cpio, cp, gzip, etc., to be directed to the tape machine
or via operations performed on the filesystem itself. Email
notification and GUI status display very important.
- </gjob:Details>
+ </gjob:Details>
- </gjob:Job>
+ </gjob:Job>
- </gjob:Jobs>
-</gjob:Helping></pre>
+ </gjob:Jobs>
+</gjob:Helping></pre>
<p>While loading the XML file into an internal DOM tree is a matter of calling
only a couple of functions, browsing the tree to gather the informations and
@@ -1070,13 +1077,13 @@
memset(ret, 0, sizeof(person));
/* We don't care what the top level element name is */
- cur = cur->xmlChildrenNode;
+ cur = cur->xmlChildrenNode;
while (cur != NULL) {
- if ((!strcmp(cur->name, "Person")) && (cur->ns == ns))
- ret->name = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
- if ((!strcmp(cur->name, "Email")) && (cur->ns == ns))
- ret->email = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
- cur = cur->next;
+ if ((!strcmp(cur->name, "Person")) && (cur->ns == ns))
+ ret->name = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
+ if ((!strcmp(cur->name, "Email")) && (cur->ns == ns))
+ ret->email = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
+ cur = cur->next;
}
return(ret);
@@ -1093,7 +1100,7 @@
entities and it's a good coding practice to define a namespace for your
application set of data and test that the element and attributes you're
analyzing actually pertains to your application space. This is done by a
- simple equality test (cur->ns == ns).</li>
+ simple equality test (cur->ns == ns).</li>
<li>To retrieve text and attributes value, it is suggested to use the
function <em>xmlNodeListGetString</em> to gather all the text and entity
reference nodes generated by the DOM output and produce an single text
@@ -1102,7 +1109,7 @@
<p>Here is another piece of code used to parse another level of the
structure:</p>
-<pre>#include <libxml/tree.h>
+<pre>#include <libxml/tree.h>
/*
* a Description for a Job
*/
@@ -1133,22 +1140,22 @@
memset(ret, 0, sizeof(job));
/* We don't care what the top level element name is */
- cur = cur->xmlChildrenNode;
+ cur = cur->xmlChildrenNode;
while (cur != NULL) {
- if ((!strcmp(cur->name, "Project")) && (cur->ns == ns)) {
- ret->projectID = xmlGetProp(cur, "ID");
- if (ret->projectID == NULL) {
+ if ((!strcmp(cur->name, "Project")) && (cur->ns == ns)) {
+ ret->projectID = xmlGetProp(cur, "ID");
+ if (ret->projectID == NULL) {
fprintf(stderr, "Project has no ID\n");
}
}
- if ((!strcmp(cur->name, "Application")) && (cur->ns == ns))
- ret->application = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
- if ((!strcmp(cur->name, "Category")) && (cur->ns == ns))
- ret->category = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
- if ((!strcmp(cur->name, "Contact")) && (cur->ns == ns))
- ret->contact = parsePerson(doc, ns, cur);
- cur = cur->next;
+ if ((!strcmp(cur->name, "Application")) && (cur->ns == ns))
+ ret->application = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
+ if ((!strcmp(cur->name, "Category")) && (cur->ns == ns))
+ ret->category = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
+ if ((!strcmp(cur->name, "Contact")) && (cur->ns == ns))
+ ret->contact = parsePerson(doc, ns, cur);
+ cur = cur->next;
}
return(ret);
@@ -1190,6 +1197,6 @@
<p><a href="mailto:Daniel.Veillard@w3.org">Daniel Veillard</a></p>
-<p>$Id: xml.html,v 1.39 2000/07/03 12:38:45 veillard Exp $</p>
+<p>$Id: xml.html,v 1.40 2000/07/03 16:07:19 veillard Exp $</p>
</body>
</html>