diff --git a/ChangeLog b/ChangeLog
index 7dbca206..9ed0abc6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Mon Feb 26 09:30:23 CET 2001 Daniel Veillard
Alternatively, you can just send the bug to the xml@rpmfind.net list, if it's really libxml +href="mailto:xml@rpmfind.net">xml@rpmfind.net list; if it's really libxml related I will approve it..
-Of course, bugs reports with a suggested patch for fixing them will +
Of course, bugs reported with a suggested patch for fixing them will probably be processed faster.
If you're looking for help, a quick look at :
Item floating around but not actively worked on, get in touch with me if +
Items floating around but not actively worked on, get in touch with me if you want to test those
Libxml is made of multiple components, some of them optionals, and most of +
Libxml is made of multiple components; some of them are optional, +and most of the block interfaces are public. The main components are:
Graphically this gives the following:
@@ -697,7 +698,7 @@ returned is an xmlDocPtr (i.e., a pointer to an as the file name, the document type, and a children 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 xmlNodes, -chained in double-linked lists of siblings and with children<->parent +chained in double-linked lists of siblings and with a 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. @@ -711,7 +712,7 @@ should be only one ELEMENT under the root): called xmllint which parses XML files given as argument and prints them back as parsed. This is useful for detecting errors both in XML code and in the XML parser itself. It has an option --debug -which prints the actual in-memory structure of the document, here is the +which prints the actual in-memory structure of the document; here is the result with the example given before:DOCUMENT version=1.0 @@ -800,7 +801,7 @@ SAX.characters( , 1) SAX.endElement(EXAMPLE) SAX.endDocument()-
Most of the other functionalities of libxml are based on the DOM +
Most of the other interfaces of libxml are based on the DOM tree-building facility, so nearly everything up to the end of this document presupposes the use of the standard DOM tree build. Note that the DOM tree itself is built by a set of registered default callbacks, without internal @@ -841,7 +842,7 @@ failure).
In order for the application to keep the control when the document is been +
In order for the application to keep the control when the document is being fetched (which is common for GUI based programs) libxml provides a push interface, too, as of version 1.8.3. Here are the interface functions:
xmlParserCtxtPtr xmlCreatePushParserCtxt(xmlSAXHandlerPtr sax, @@ -876,18 +877,19 @@ int xmlParseChunk (xmlParserCtxtPtr ctxt, } }-
Also note that the HTML parser embedded into libxml also has a push -interface; the functions are just prefixed by "html" rather than "xml"
+The HTML parser embedded into libxml also has a push +interface; the functions are just prefixed by "html" rather than "xml".
A couple of comments can be made, first this mean that the parser is -memory-hungry, first to load the document in memory, second to build the tree. +
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 James
Henstridge's documentation). Note also that the push interface can be
-limited to SAX. Just use the two first arguments of
+limited to SAX: just use the two first arguments of
xmlCreatePushParserCtxt()
.
doc->children->children->children
points to the title element,
-doc->children->children->next->child->child+
doc->children->children->next->children->children
points to the text node containing the chapter title "The Linux adventure".
NOTE: XML allows PIs and comments to be
present before the document root, so doc->children
may point
-to an element which is not the document Root Element, a function
+to an element which is not the document Root Element; a function
xmlDocGetRootElement()
was added for this purpose.
xmlNodePtr xmlStringGetNodeList(xmlDocPtr doc, const xmlChar
*value);
This function takes an "external" string and convert it to one text +
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 a single node.
@@ -974,8 +976,7 @@ elements: 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"). Set this argument if you want - to use the string for non-XML usage like User Interface. + "GNU Network Object Model Environment").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 +its 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: < for the character '<', > @@ -1089,16 +1090,16 @@ suggest that you keep the non-substituting default behaviour and avoid using entities in your XML document or data if you are not willing to handle the entity references elements in the DOM tree.
-Note that at save time libxml enforce the conversion of the predefined +
Note that at save time libxml enforces the conversion of the predefined entities where necessary to prevent well-formedness problems, and will also -transparently replace those with chars (i.e., it will not generate entity +transparently replace those with chars (i.e. it will not generate entity reference elements in the DOM tree or call the reference() SAX callback when finding them in the input).
WARNING: handling entities -on top of libxml SAX interface is difficult !!! If you plan to use +on top of the libxml SAX interface is difficult!!! If you plan to use non-predefined entities in your documents, then the learning cuvre to handle -then using the SAX API may be long. If you plan to use complex document, I +then using the SAX API may be long. If you plan to use complex documents, I strongly suggest you consider using the DOM interface instead and let libxml deal with the complexity rather than trying to do it yourself.
@@ -1115,15 +1116,15 @@ equality operation at the user level.I suggest that people using libxml use a namespace, and declare it in the 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 augment -significantly the size of the XML output, but significantly increase its value +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:
<mydoc xmlns="http://mydoc.example.org/schemas/"> <elem1>...</elem1> <elem2>...</elem2> </mydoc>-
Concerning the namespace value, this has to be an URL, but the URL doesn't +
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 atributes 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
@@ -1135,22 +1136,22 @@ 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
+same as <bar:text> in another document. What really matters 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
+just a shortcut for the full URI). In libxml, element and attributes have an
ns
field pointing to an xmlNs structure detailing the namespace
-prefix and it's URI.
@@Interfaces@@
@@Examples@@
-Usually people object using namespace in the case of validation, I object -this and will make sure that using namespaces won't break validity checking, -so even is you plan to use or currently are using validation I strongly +
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
xmlns="http://...."
should not break validity even on less
-flexible parsers. Now using namespace to mix and differentiate content coming
+flexible parsers. Using namespaces to mix and differentiate content coming
from multiple DTDs will certainly break current validation schemes. I will try
to provide ways to do this, but this may not be portable or standardized.
Well what is validation and what is a DTD ?
Validation is the process of checking a document against a set of -construction rules, a DTD (Document Type Definition) is such +construction rules; a DTD (Document Type Definition) is such a set of rules.
The validation process and building DTDs are the two most difficult parts -of XML life cycle. Briefly a DTD defines all the possibles element to be +of the XML life cycle. Briefly a DTD defines all the possibles element to be found within your document, what is the formal shape of your document tree (by defining the allowed content of an element, either text, a regular expression for the allowed list of children, or mixed content i.e. both text and children). The DTD also defines the allowed attributes for all elements and -the types of the attributes. For more detailed informations, I suggest to read +the types of the attributes. For more detailed information, +I suggest that you read the related parts of the XML specification, the examples found under -gnome-xml/test/valid/dtd and the large amount of books available on XML. The +gnome-xml/test/valid/dtd and any of the +large number of books available on XML. The dia example in gnome-xml/test/valid should be both simple and complete enough to allow you to build your own.
-A word of warning, building a good DTD which will fit your needs of your -application in the long-term is far from trivial, however the extra level of -quality it can insure is well worth the price for some sets of applications or +
A word of warning, building a good DTD which will fit the needs of your +application in the long-term is far from trivial; however, the extra level of +quality it can ensure is well worth the price for some sets of applications or if you already have already a DTD defined for your application field.
The validation is not completely finished but in a (very IMHO) usable @@ -1202,13 +1205,13 @@ core.
DOM stands for the Document Object -Model this is an API for accessing XML or HTML structured documents. -Native support for DOM in Gnome is on the way (module gnome-dom), and it will +Model; this is an API for accessing XML or HTML structured documents. +Native support for DOM in Gnome is on the way (module gnome-dom), and will be based on gnome-xml. This will be a far cleaner interface to manipulate XML files within Gnome since it won't expose the internal structure. DOM defines a -set of IDL (or Java) interfaces allowing to traverse and manipulate a +set of IDL (or Java) interfaces allowing you to traverse and manipulate a document. The DOM library will allow accessing and modifying "live" documents -presents on other programs like this:
+present in other programs like this: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 -generate the internals structures is harder, and more error prone.
+only a couple of functions, browsing the tree to gather the ata and +generate the internal structures is harder, and more error prone.The suggested principle is to be tolerant with respect to the input structure. For example, the ordering of the attributes is not significant, -Cthe XML specification is clear about it. It's also usually a good idea to not -be dependent of the orders of the children of a given node, unless it really -makes things harder. Here is some code to parse the informations for a +the XML specification is clear about it. It's also usually a good idea not to +depend on the order of the children of a given node, unless it really +makes things harder. Here is some code to parse the information for a person:
/* * A person record @@ -1339,10 +1342,10 @@ DEBUG("parsePerson\n"); return(ret); }-
Here is a couple of things to notice:
+Here are a couple of things to notice:
One can notice that once used to it, writing this kind of code is quite +
Once you are used to it, writing this kind of code is quite simple, but boring. Ultimately, it could be possble to write stubbers taking either C data structure definitions, a set of XML examples or an XML DTD and produce the code needed to import and export the content between C data and @@ -1447,6 +1450,6 @@ Gnome CVS base under gnome-xml/example
-$Id: xml.html,v 1.67 2001/02/15 15:55:44 veillard Exp $
+$Id: xml.html,v 1.68 2001/02/24 17:48:53 veillard Exp $