diff --git a/ChangeLog b/ChangeLog index 93756701..f48c96dd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +Tue Jul 10 17:47:09 CEST 2001 Daniel Veillard + + * configure.in include/libxml/xmlwin32version.h: release of 2.4.0 + * doc/xml.html doc/html/*: updated the docs + Mon Jul 9 22:06:53 CEST 2001 Daniel Veillard * valid.c: fixed "Internal: MIXED struct bad" when #CDATA elements diff --git a/configure.in b/configure.in index bcb8f66c..977dde3c 100644 --- a/configure.in +++ b/configure.in @@ -5,8 +5,8 @@ AM_CONFIG_HEADER(config.h) AC_CANONICAL_HOST LIBXML_MAJOR_VERSION=2 -LIBXML_MINOR_VERSION=3 -LIBXML_MICRO_VERSION=14 +LIBXML_MINOR_VERSION=4 +LIBXML_MICRO_VERSION=0 LIBXML_VERSION=$LIBXML_MAJOR_VERSION.$LIBXML_MINOR_VERSION.$LIBXML_MICRO_VERSION LIBXML_VERSION_INFO=`expr $LIBXML_MAJOR_VERSION + $LIBXML_MINOR_VERSION`:$LIBXML_MICRO_VERSION:$LIBXML_MINOR_VERSION diff --git a/doc/html/libxml-catalog.html b/doc/html/libxml-catalog.html index 180e9d9f..f9bb3fa8 100644 --- a/doc/html/libxml-catalog.html +++ b/doc/html/libxml-catalog.html @@ -122,7 +122,7 @@ NAME="LIBXML-CATALOG" >

Name

Synopsis

Description

Details







Name

Synopsis

Description

Details
















Name

Synopsis

Description

Details



















Name

Synopsis

Description

Details






























Name

Synopsis

Description

Details























Name

Synopsis

Description

Details













Name

Synopsis

Description

Details



















































































































Name

Synopsis

Description

Details

Name

Synopsis

Description

Details









































Name

Synopsis

Description

Details



















an XPath evaluation function, the parameters are on thei XPath context stack

  an XPath parser context  the number of arguments passed to the function











































Name

Synopsis

Description

Details














































































































Name

Synopsis

Description

Details























The XML C library for Gnome - + @@ -114,7 +116,8 @@ libxml2

internationalization support
  • This page provides a global overview and some examples on how to use libxml.
  • -
  • James Henstridge wrote James Henstridge + wrote some nice documentation explaining how to use the libxml SAX interface.
  • George Lebl wrote

    Reporting bugs and getting help

    -

    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 -Gnome bug -tracking database (make sure to use the "libxml" module name). I look at -reports there regularly and it's good to have a reminder when a bug is still -open. Check the instructions on reporting -bugs and be sure to specify that the bug is for the package libxml.

    +

    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 Gnome +bug tracking database (make sure to use the "libxml" module name). I look +at reports there regularly and it's good to have a reminder when a bug is +still open. Check the instructions on +reporting bugs and be sure to specify that the bug is for the package +libxml.

    There is also a mailing-list xml@gnome.org for libxml, with an on-line archive (old). To subscribe to this list, please -visit the associated -Web page and follow the instructions. Do not send code, I won't -debug it (but patches are really appreciated!).

    +href="http://xmlsoft.org/messages">old). To subscribe to this list, +please visit the associated Web page and +follow the instructions. Do not send code, I won't debug it +(but patches are really appreciated!).

    Check the following too before posting:

      @@ -154,8 +159,8 @@ debug it (but patches are really appreciated!).

      version, and that the problem still shows up in those
    • check the list archives to see if the problem was reported already, in this case - there is probably a fix available, similary check the registered open - bugs
    • + there is probably a fix available, similary check the registered + open bugs
    • make sure you can reproduce the bug with xmllint or one of the test programs found in source in the distribution
    • Please send the command showing the error as well as the input (as an @@ -164,9 +169,10 @@ debug it (but patches are really appreciated!).

      Alternatively, you can just send the bug to the xml@gnome.org list; if it's really libxml -related I will approve it.. Please do not send me mail directly especially for -portability problem, it makes things really harder to track and in some cases -I'm not the best person to answer a given question, ask the list instead.

      +related I will approve it.. Please do not send me mail directly especially +for portability problem, it makes things really harder to track and in some +cases I'm not the best person to answer a given question, ask the list +instead.

      Of course, bugs reported with a suggested patch for fixing them will probably be processed faster.

      @@ -234,8 +240,8 @@ platform, get in touch with me to upload the package. I will keep them in the
    • The Gnome CVS base. Check the Gnome CVS Tools page; - the CVS module is gnome-xml.

      + href="http://developer.gnome.org/tools/cvs.html">Gnome CVS Tools + page; the CVS module is gnome-xml.

    • The libxslt module is also present there
    @@ -249,18 +255,26 @@ for a really accurate description
  • Items floating around but not actively worked on, get in touch with me if you want to test those

      -
    • Implementing XSLT, this is done as - a separate C library on top of libxml called libxslt
    • +
    • Implementing XSLT, this is done + as a separate C library on top of libxml called libxslt
    • Finishing up XPointer and XInclude
    • -
    • (seeems working but delayed from release) parsing/import of Docbook SGML - docs
    • +
    • (seeems working but delayed from release) parsing/import of Docbook + SGML docs
    • +
    + +

    2.4.0: July 10 2001

    +
      +
    • Fixed a few bugs in XPath, validation, and tree handling.
    • +
    • Fixed XML Base implementation, added a coupel of examples to the + regression tests
    • +
    • A bit of cleanup

    2.3.14: July 5 2001

      -
    • fixed some entities problems and reduce mem requirement when substituing - them
    • +
    • fixed some entities problems and reduce mem requirement when + substituing them
    • lots of improvements in the XPath queries interpreter can be substancially faster
    • Makefiles and configure cleanups
    • @@ -317,8 +331,8 @@ you want to test those

      2.3.10: June 1 2001

      • fixed the SGML catalog support
      • -
      • a number of reported bugs got fixed, in XPath, iconv detection, XInclude - processing
      • +
      • a number of reported bugs got fixed, in XPath, iconv detection, + XInclude processing
      • XPath string function should now handle unicode correctly
      @@ -353,8 +367,8 @@ you want to test those

    • Fixed a few things in the HTML parser
    • Fixed some XPath bugs raised by XSLT use, tried to fix the floating point portability issue
    • -
    • Speed improvement (8M/s for SAX, 3M/s for DOM, 1.5M/s for DOM+validation - using the XML REC as input and a 700MHz celeron).
    • +
    • Speed improvement (8M/s for SAX, 3M/s for DOM, 1.5M/s for + DOM+validation using the XML REC as input and a 700MHz celeron).
    • incorporated more Windows cleanup
    • added xmlSaveFormatFile()
    • fixed problems in copying nodes with entities references (gdome)
    • @@ -383,9 +397,9 @@ you want to test those

    • cleaned up the user of some of the string formatting function. used the trio library code to provide the one needed when the platform is missing them
    • -
    • xpath: removed a memory leak and fixed the predicate evaluation problem, - extended the testsuite and cleaned up the result. XPointer seems broken - ...
    • +
    • xpath: removed a memory leak and fixed the predicate evaluation + problem, extended the testsuite and cleaned up the result. XPointer seems + broken ...

    2.3.5: Mar 23 2001

    @@ -515,8 +529,8 @@ you want to test those

  • XPointer implementation and testsuite
  • Lot of XPath fixes, added variable and functions registration, more tests
  • -
  • Portability fixes, lots of enhancements toward an easy Windows build and - release
  • +
  • Portability fixes, lots of enhancements toward an easy Windows build + and release
  • Late validation fixes
  • Integrated a lot of contributed patches
  • added memory management docs
  • @@ -556,8 +570,8 @@ you want to test those

  • a purely bug fixes release
  • fixed an encoding support problem when parsing from a memory block
  • fixed a DOCTYPE parsing problem
  • -
  • removed a bug in the function allowing to override the memory allocation - routines
  • +
  • removed a bug in the function allowing to override the memory + allocation routines
  • 2.2.0: July 14 2000

    @@ -630,8 +644,8 @@ you want to test those

    parser context using xmlCreateIOParserCtxt()
  • there is a C preprocessor macro LIBXML_VERSION providing the version number of the libxml module in use
  • -
  • a number of optional features of libxml can now be excluded at configure - time (FTP/HTTP/HTML/XPath/Debug)
  • +
  • a number of optional features of libxml can now be excluded at + configure time (FTP/HTTP/HTML/XPath/Debug)
  • 2.0.0beta: Mar 14 2000

    @@ -650,8 +664,8 @@ you want to test those

    • fix I18N support. ISO-Latin-x/UTF-8/UTF-16 (nearly) seems correctly handled now
    • -
    • Better handling of entities, especially well formedness checking and - proper PEref extensions in external subsets
    • +
    • Better handling of entities, especially well formedness checking + and proper PEref extensions in external subsets
    • DTD conditional sections
    • Validation now correcly handle entities content
    • change @@ -670,9 +684,9 @@ you want to test those

    • This is a bug fix release:
    • It is possible to disable the ignorable blanks heuristic used by libxml-1.x, a new function xmlKeepBlanksDefault(0) will allow this. Note - 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.
    • + 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.
    • Blanks in <a> </a> constructs are not ignored anymore, avoiding heuristic is really the Right Way :-\
    • The unchecked use of snprintf which was breaking libxml-1.8.6 @@ -691,8 +705,8 @@ you want to test those

      1.8.5: Jan 21 2000

      • adding APIs to parse a well balanced chunk of XML (production [43] content of the XML - spec)
      • + href="http://www.w3.org/TR/REC-xml#NT-content">[43] content of the + XML spec)
      • fixed a hideous bug in xmlGetProp pointed by Rune.Djurhuus@fast.no
      • Jody Goldberg <jgoldberg@home.com> provided another patch trying to solve the zlib checks problems
      • @@ -776,8 +790,8 @@ you want to test those

        • The basic type for strings manipulated by libxml has been renamed in 1.7.1 from CHAR to xmlChar. The reason - is that CHAR was conflicting with a predefined type on Windows. However on - non WIN32 environment, compatibility is provided by the way of a + is that CHAR was conflicting with a predefined type on Windows. However + on non WIN32 environment, compatibility is provided by the way of a #define .
        • Changed another error : the use of a structure field called errno, and leading to troubles on platforms where it's a macro
        • @@ -819,14 +833,14 @@ document:

          information about its encoding. Then the document is a text format whose structure is specified by tags between brackets. Each tag opened has to be closed. 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 /> rather than with >. Note that, -for example, the image tag has no content (just an attribute) and is closed by -ending the tag with />.

          +(no content), a single tag can serve as both the opening and closing tag if +it ends with /> rather than with >. Note +that, for example, the image tag has no content (just an attribute) and is +closed by ending the tag with />.

          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 -data encoding mechanisms like configuration file formatting (glade), +structured document maintenance (where it follows the steps of SGML) to +simple data encoding mechanisms like configuration file formatting (glade), spreadsheets (gnumeric), or even shorter lived documents such as WebDAV where it is used to encode remote calls between a client and a server.

          @@ -834,16 +848,16 @@ it is used to encode remote calls between a client and a server.

          Check the separate libxslt page

          -

          XSL Transformations, is a language -for transforming XML documents into other XML documents (or HTML/textual -output).

          +

          XSL Transformations, is a +language for transforming XML documents into other XML documents (or +HTML/textual output).

          A separate library called libxslt is being built on top of libxml2. This module "libxslt" can be found in the Gnome CVS base too.

          You can check the features supported -and the progresses on the features +supported and the progresses on the Changelog

          An overview of libxml architecture

          @@ -931,10 +945,10 @@ standalone=true

          Sometimes the DOM tree output is just too large to fit reasonably into memory. In that case (and if you don't expect to save back the XML document -loaded using libxml), it's better to use the SAX interface of libxml. SAX is a -callback-based interface to the parser. Before parsing, the -application layer registers a customized set of callbacks which are called by -the library as it progresses through the XML input.

          +loaded using libxml), it's better to use the SAX interface of libxml. SAX is +a callback-based interface to the parser. Before parsing, +the application layer registers a customized set of callbacks which are +called by the library as it progresses through the XML input.

          To get more detailed step-by-step guidance on using the SAX interface of libxml, see the

          The XML library interfaces

          This section is directly intended to help programmers getting bootstrapped -using the XML library from the C language. It is not intended to be extensive. -I hope the automatically generated documents will provide the completeness -required, but as a separate set of documents. The interfaces of the XML -library are by principle low level, there is nearly zero abstraction. Those -interested in a higher level API should look at DOM.

          +using the XML library from the C language. It is not intended to be +extensive. I hope the automatically generated documents will provide the +completeness required, but as a separate set of documents. The interfaces of +the XML library are by principle low level, there is nearly zero abstraction. +Those interested in a higher level API should look at +DOM.

          The parser interfaces for XML are separated from the HTML parser @@ -1023,8 +1038,8 @@ failure).

          Invoking the parser: the push method

          -

          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 +

          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,
                                                    void *user_data,
          @@ -1075,8 +1090,8 @@ limited to SAX: just use the two first arguments of
           
           

          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 -that produces the XML document used in the previous examples:

          +also described in <libxml/tree.h>.) For example, here is a piece of +code that produces the XML document used in the previous examples:

              #include <libxml/tree.h>
               xmlDocPtr doc;
               xmlNodePtr tree, subtree;
          @@ -1098,8 +1113,8 @@ that produces the XML document used in the previous examples:

          Traversing the tree

          Basically by including "tree.h" your -code has access to the internal structure of all the elements of the tree. The -names should be somewhat simple like parent, +code has access to the internal structure of all the elements of the tree. +The names should be somewhat simple like parent, children, next, prev, properties, etc... For example, still with the previous example:

          @@ -1123,8 +1138,8 @@ is an excerpt from the tree API:

          xmlAttrPtr xmlSetProp(xmlNodePtr node, const xmlChar *name, const xmlChar *value);
          -

          This sets (or changes) an attribute carried by an ELEMENT node. The - value can be NULL.

          +

          This sets (or changes) an attribute carried by an ELEMENT node. + The value can be NULL.

          @@ -1135,8 +1150,8 @@ is an excerpt from the tree API:

          -

          Two functions are provided for reading and writing the text associated with -elements:

          +

          Two functions are provided for reading and writing the text associated +with elements:

          xmlNodePtr xmlStringGetNodeList(xmlDocPtr doc, const xmlChar *value);
          @@ -1236,9 +1251,9 @@ for the character '>', &apos; for the character ''', 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 content to be able to save the document back without losing this usually -precious information (if the user went through the pain of explicitly defining -entities, he may have a a rather negative attitude if you blindly susbtitute -them as saving time). The xmlSubstituteEntitiesDefault() function allows you to check and change the behaviour, which is to not substitute entities by default.

          @@ -1332,8 +1347,9 @@ 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. 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.

          +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.

          Validation, or are you afraid of DTDs ?

          @@ -1345,25 +1361,25 @@ a set of rules.

          The validation process and building DTDs are the two most difficult parts 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 information, I suggest that you -read the related parts of the XML specification, the examples found under -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 +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 information, I suggest +that you read the related parts of the XML specification, the examples found +under 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 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.

          +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 state. Until a real validation interface is defined the way to do it is to -define and set the xmlDoValidityCheckingDefaultValue external -variable to 1, this will of course be changed at some point:

          +define and set the xmlDoValidityCheckingDefaultValue +external variable to 1, this will of course be changed at some point:

          extern int xmlDoValidityCheckingDefaultValue;

          @@ -1382,11 +1398,12 @@ core.

          DOM Principles

          -

          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 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 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 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.

          The current DOM implementation on top of libxml is the gdome2 Gnome module, this @@ -1458,13 +1475,13 @@ base:

          </gjob:Jobs> </gjob:Helping>
          -

          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 ata and generate -the internal structures is harder, and more error prone.

          +

          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 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, the -XML specification is clear about it. It's also usually a good idea not to +structure. For example, the ordering of the attributes is not significant, +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:

          /*
          @@ -1515,13 +1532,13 @@ DEBUG("parsePerson\n");
             
        • Usually a recursive parsing style is the more convenient one: XML data is by nature subject to repetitive constructs and usually exibits highly stuctured patterns.
        • -
        • The two arguments of type xmlDocPtr and xmlNsPtr, i.e. - the pointer to the global XML document and the namespace reserved to the - application. Document wide information are needed for example to decode - 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).
        • +
        • The two arguments of type xmlDocPtr and xmlNsPtr, + i.e. the pointer to the global XML document and the namespace reserved to + the application. Document wide information are needed for example to + decode 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).
        • To retrieve text and attributes value, you can use the function xmlNodeListGetString to gather all the text and entity reference nodes generated by the DOM output and produce an single text string.
        • @@ -1582,10 +1599,10 @@ DEBUG("parseJob\n"); }

          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 XML storage. -This is left as an exercise to the reader :-)

          +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 XML +storage. This is left as an exercise to the reader :-)

          Feel free to use the code for the full C parsing example as a template, it is also available with Makefile in the @@ -1593,15 +1610,15 @@ Gnome CVS base under gnome-xml/example

          Contributions