diff --git a/doc/API.html b/doc/API.html index 2dd3baa9..bb0307d7 100644 --- a/doc/API.html +++ b/doc/API.html @@ -83,12 +83,12 @@ of libxslt/xsltproc.c and the tutorial
  1. configure the parser for XSLT:

    xmlSubstituteEntitiesDefault(1);

    -

    xmlLoadExtDtdDefaultValue = 1;

    -
  2. -
  3. parse the stylesheet with xsltParseStylesheetFile()
  4. -
  5. parse the document with xmlParseFile()
  6. -
  7. apply the stylesheet using xsltApplyStylesheet()
  8. -
  9. save the result using xsltSaveResultToFile() if needed set +

    xmlLoadExtDtdDefaultValue = 1;

    +
  10. +
  11. parse the stylesheet with xsltParseStylesheetFile()
  12. +
  13. parse the document with xmlParseFile()
  14. +
  15. apply the stylesheet using xsltApplyStylesheet()
  16. +
  17. save the result using xsltSaveResultToFile() if needed set xmlIndentTreeOutput to 1

Steps 2,3, and 5 will probably need to be changed depending on you diff --git a/doc/FAQ.html b/doc/FAQ.html index 3c0cd636..0746e047 100644 --- a/doc/FAQ.html +++ b/doc/FAQ.html @@ -75,21 +75,23 @@ A:link, A:visited, A:active { text-decoration: underline }
-
  1. +
      +
    1. passing parameters on the xsltproc command line doesn't work

      xsltproc --param test alpha foo.xsl foo.xml

      -

      the param does not get passed and ends up as ""

      -

      In a nutshell do a double escaping at the shell prompt:

      -

      xsltproc --param test "'alpha'" foo.xsl foo.xml

      -

      i.e. the string value is surrounded by " and ' then terminated by ' +

      the param does not get passed and ends up as ""

      +

      In a nutshell do a double escaping at the shell prompt:

      +

      xsltproc --param test "'alpha'" foo.xsl foo.xml

      +

      i.e. the string value is surrounded by " and ' then terminated by ' and ". Libxslt interpret the parameter values as XPath expressions, so the string ->alpha<- is intepreted as the node set matching this string. You really want ->'alpha'<- to be passed to the processor. And to allow this you need to escape the quotes at the shell level using ->"'alpha'"<- .

      -

      or use

      -

      xsltproc --stringparam test alpha foo.xsl foo.xml

      -
    +

    or use

    +

    xsltproc --stringparam test alpha foo.xsl foo.xml

    +
  2. +

Daniel Veillard

diff --git a/doc/bugs.html b/doc/bugs.html index 2823b6a6..6f6e8602 100644 --- a/doc/bugs.html +++ b/doc/bugs.html @@ -81,18 +81,18 @@ useful resources:

  • I strongly suggest to subscribe to XSL-list, check the XSL-list archives
  • -
  • The XSL FAQ.
  • -
  • The tutorial +
  • The XSL FAQ.
  • +
  • The tutorial written by Paul Grosso and Norman Walsh is a very good on-line introdution to the language.
  • -
  • The only +
  • The only Zvon XSLT tutorial details a lot of constructs with examples.
  • -
  • +
  • Jeni Tennison's XSLT pages provide links to a lot of answers
  • -
  • the Gallery of +
  • the Gallery of XSLT Tricks provides non-standard use case of XSLT
  • -
  • And I suggest to buy Michael Kay "XSLT Programmer's Reference" book +
  • And I suggest to buy Michael Kay "XSLT Programmer's Reference" book published by Wrox if you plan to work seriously with XSLT in the future.
  • @@ -115,16 +115,16 @@ really appreciated!).

    Of course, bugs reports with a suggested patch for fixing them will diff --git a/doc/contribs.html b/doc/contribs.html index 72f3c69b..fe793950 100644 --- a/doc/contribs.html +++ b/doc/contribs.html @@ -78,34 +78,34 @@ A:link, A:visited, A:active { text-decoration: underline }

    I'm still waiting for someone to contribute a simple XSLT processing diff --git a/doc/docbook.html b/doc/docbook.html index fee2f30a..6d5fc083 100644 --- a/doc/docbook.html +++ b/doc/docbook.html @@ -86,39 +86,39 @@ few pointers and informations which may be helpful:

  • The DocBook homepage at Oasis you should find pointers there on all the lastest versions of the DTDs and XSLT stylesheets
  • -
  • +
  • DocBook: The Definitive Guide is the official reference documentation for DocBook.
  • -
  • +
  • DocBook Open Repository contains a lot of informations about DocBook
  • -
  • Here is a shell script to generate +
  • Here is a shell script to generate XML Catalogs for DocBook 4.1.2 . If it can write to the /etc/xml/ directory, it will set-up /etc/xml/catalog and /etc/xml/docbook based on the resources found on the system. Otherwise it will just create ~/xmlcatalog and ~/dbkxmlcatalog and doing:

    export XMLCATALOG=$HOME/xmlcatalog

    -

    should allow to process DocBook documentations without requiring +

    should allow to process DocBook documentations without requiring network accesses for the DTd or stylesheets

    -
  • -
  • I have uploaded a +
  • +
  • I have uploaded a small tarball containing XML Catalogs for DocBook 4.1.2 which seems to work fine for me too
  • -
  • Informations on installing a Windows +
  • Informations on installing a Windows DocBook processing setup based on Cygwin (using the binaries from the official Windows port should be possible too)
  • -
  • Alexander Kirillov's page on Using DocBook XML +
  • Alexander Kirillov's page on Using DocBook XML 4.1.2 (RPM packages)
  • -
  • Tim Waugh's xmlto front-end +
  • Tim Waugh's xmlto front-end conversion script
  • -
  • Linux Documentation Project +
  • Linux Documentation Project DocBook-Install-mini-HOWTO
  • -
  • ScrollKeeper the open documentation cataloging project has a DocBook +
  • ScrollKeeper the open documentation cataloging project has a DocBook section
  • -
  • Dan York presentation on Publishing +
  • Dan York presentation on Publishing using DocBook XML
  • @@ -132,13 +132,13 @@ again:

    XML Catalogs pointing to a local installation of the DTD of DocBook. Check the XML Catalog page to understand more on this subject. -
  • before processing a new document, use the command +
  • before processing a new document, use the command

    xmllint --valid --noout path_to_document

    -

    to make sure that your input is valid DocBook. And fixes the errors +

    to make sure that your input is valid DocBook. And fixes the errors before processing further. Note that XSLT processing may work correctly with some forms of validity errors left, but in general it can give troubles on output.

    -
  • +

    Daniel Veillard

    diff --git a/doc/docs.html b/doc/docs.html index d7833ccb..af75871e 100644 --- a/doc/docs.html +++ b/doc/docs.html @@ -80,9 +80,9 @@ A:link, A:visited, A:active { text-decoration: underline }
  • Check the API documentation automatically extracted from code comments (using gtk doc).
  • -
  • Look at the mailing-list +
  • Look at the mailing-list archive.
  • -
  • Of course since libxslt is based on libxml, it's a good idea to at +
  • Of course since libxslt is based on libxml, it's a good idea to at least read libxml description
  • diff --git a/doc/downloads.html b/doc/downloads.html index 3bd42fb9..a9ed9174 100644 --- a/doc/downloads.html +++ b/doc/downloads.html @@ -95,11 +95,13 @@ platform, get in touch with me to upload the package. I will keep them in the

    Libxslt is also available from CVS:

    Daniel Veillard

    diff --git a/doc/extensions.html b/doc/extensions.html index e77fe4cf..1c950f98 100644 --- a/doc/extensions.html +++ b/doc/extensions.html @@ -78,24 +78,24 @@ A:link, A:visited, A:active { text-decoration: underline }

    Table of content

    Introduction

    This document describes the work needed to write extensions to the @@ -110,7 +110,7 @@ two ways to extend an XSLT engine:

    In both cases the extensions need to be associated to a new namespace, @@ -133,8 +133,8 @@ element.

    And extension module is defined by 3 objects:

    Registering a module

    Currently a libxslt module has to be compiled within the application using @@ -174,10 +174,10 @@ typedef void *(*xsltExtInitFunction)(xsltTransformContextPtr ctxt,

  • the function gets passed the namespace name URI as an argument, this allow a single function to provide the initialization for multiple logical modules
  • -
  • it also gets passed a transformation context, the initialization is +
  • it also gets passed a transformation context, the initialization is done at run time before any processing occurs on the stylesheet but it will be invoked separately each time for each transformation
  • -
  • it returns a pointer, this can be used to store module specific +
  • it returns a pointer, this can be used to store module specific informations which can be retrieved later when a function or an element from the extension are used, an obvious example is a connection to a database which should be kept and reused along the transformation. NULL @@ -188,7 +188,7 @@ typedef void *(*xsltExtInitFunction)(xsltTransformContextPtr ctxt,

    Registering an extension function

    There is a single call to do this registration:

    @@ -222,8 +222,8 @@ find one from the other:

    xsltTransformContextPtr
              xsltXPathGetTransformContext
                               (xmlXPathParserContextPtr ctxt);
    -
  • -
  • The xmlXPathContextPtr associated to an +
  • +
  • The xmlXPathContextPtr associated to an xsltTransformContext is stored in the xpathCtxt field.
  • @@ -260,7 +260,7 @@ registering the module.

  • push the return value on the stack using valuePush(ctxt, obj)
  • -
  • deallocate the parameters passed to the function using +
  • deallocate the parameters passed to the function using xmlXPathFreeObject(obj)
  • @@ -420,11 +420,11 @@ close the connection to the database to keep the same example.

    Well some of the pieces missing:

    diff --git a/doc/help.html b/doc/help.html index 150503ed..e336ee3b 100644 --- a/doc/help.html +++ b/doc/help.html @@ -80,14 +80,14 @@ subscribe to the mailing-list as explained before, check the Get in touch with me before to avoid synchronization problems and check that the suggested fix will fit in nicely :-) diff --git a/doc/index.html b/doc/index.html index ca437eb5..36ad7831 100644 --- a/doc/index.html +++ b/doc/index.html @@ -88,8 +88,8 @@ reused in commercial applications (see the intro)

  • John Fleck wrote a tutorial for libxslt
  • -
  • xsltproc user manual
  • -
  • the libxml documentation
  • +
  • xsltproc user manual
  • +
  • the libxml documentation
  • Daniel Veillard

    diff --git a/doc/internals.html b/doc/internals.html index a0a97b5d..b84e029b 100644 --- a/doc/internals.html +++ b/doc/internals.html @@ -78,22 +78,22 @@ A:link, A:visited, A:active { text-decoration: underline }

    Table of contents

    Introduction

    This document describes the processing of libxslt, the XSLT C library developed for the Gnome project.

    @@ -107,10 +107,10 @@ stylesheet document and generates an output document:

    the following operations:

    Keep it simple stupid

    @@ -129,7 +129,7 @@ stylesheets. In general the implementation of libxslt follows the following pattern:

    @@ -148,19 +148,19 @@ variations depending on the node type:

    indicates the kind of node it represents, the most common ones are:

    For the XSLT processing, entity nodes should not be generated (i.e. they should be replaced by their content). Most nodes also contains the following "navigation" informations:

    Elements nodes carries the list of attributes in the properties, an attribute itself holds the navigation pointers and the children list (the @@ -176,21 +176,21 @@ used by the application to hold specific data on this node.

    level:

    1. parse the stylesheet and generate a DOM tree
    2. -
    3. take the stylesheet tree and build a compiled version of it (the +
    4. take the stylesheet tree and build a compiled version of it (the compilation phase)
    5. -
    6. take the input and generate a DOM tree
    7. -
    8. process the stylesheet against the input tree and generate an output +
    9. take the input and generate a DOM tree
    10. +
    11. process the stylesheet against the input tree and generate an output tree
    12. -
    13. serialize the output tree
    14. +
    15. serialize the output tree

    A few things should be noted here:

    The XSLT stylesheet compilation

    @@ -267,22 +267,22 @@ applying the following algorithm:

    hash table, walking the hash list until the node satisfies all the steps of the pattern, then checking the appropriate(s) global templates to see if there isn't a higher priority rule to apply -
  • If there is no template, apply the default rule (recurse on the +
  • If there is no template, apply the default rule (recurse on the children)
  • -
  • else walk the content list of the selected templates, for each of them: +
  • else walk the content list of the selected templates, for each of them: +
  • otherwise copy the node.
  • +

    The closure is usually done through the XSLT apply-templates construct recursing by applying the adequate template on the input node children or on the result of an associated XPath selection lookup.

    - +

    Note that large parts of the input tree may not be processed by a given stylesheet and that on the opposite some may be processed multiple times. @@ -292,15 +292,15 @@ logic. xsltApplyStylesheet() is the entry point, it allocates an xsltTransformContext containing the following:

    Then a new document gets allocated (HTML or XML depending on the type of output), the user parameters and global variables and parameters are @@ -354,13 +354,13 @@ transformation the context is maintained within the XSLT context. Its content follows the requirements from the XPath specification:

    For the purpose of XSLT an extra pointer has been added @@ -403,17 +403,17 @@ the stack).

    Sometime the work can be done directly by modifying in-situ the top object on the stack ctxt->value.

    @@ -452,11 +452,11 @@ for output should be added directly to libxml).

    especially:

    diff --git a/doc/intro.html b/doc/intro.html index abdbcad4..a79a9d6b 100644 --- a/doc/intro.html +++ b/doc/intro.html @@ -81,15 +81,15 @@ the XSLT C library developed for the

    Here are some key points about libxslt:

    Daniel Veillard

    diff --git a/doc/news.html b/doc/news.html index 4f28799a..46d2c5be 100644 --- a/doc/news.html +++ b/doc/news.html @@ -83,317 +83,317 @@ for a really accurate description (DocBook), xsl:include crash (Igor), documentation (Christian Cornelssen, Charles Bozeman and Geert Kloosterman), element-available (Richard Jinks) -
  • xsltproc can now list teh registered extensions thanks to Mark +
  • xsltproc can now list teh registered extensions thanks to Mark Vakoc
  • -
  • there is a new API to save directly to a string +
  • there is a new API to save directly to a string xsltSaveResultToString() by Morus Walter
  • -
  • specific error registration function for the python API
  • +
  • specific error registration function for the python API
  • 1.0.17: April 29 2002

    1.0.16: April 15 2002

    1.0.15: Mar 25 2002

    1.0.14: Mar 18 2002

    1.0.13: Mar 8 2002

    1.0.12: Feb 11 2002

    1.0.11: Feb 8 2002

    1.0.10: Jan 14 2002

    1.0.9: Dec 7 2001

    1.0.8: Nov 26 2001

    1.0.7: Nov 10 2001

    1.0.6: Oct 30 2001

    1.0.5: Oct 10 2001

    1.0.4: Sep 12 2001

    1.0.3: Aug 23 2001

    1.0.2: Aug 15 2001

    1.0.1: July 24 2001

    1.0.0: July 10 2001

    0.14.0: July 5 2001

    0.13.0: June 26 2001

    0.12.0: June 18 2001

    0.11.0: June 1 2001

    Mostly a bug fix release.

    0.10.0: May 19 2001

    0.9.0: May 3 2001

    0.8.0: Apr 22 2001

    0.7.0: Apr 10 2001

    0.6.0: Mar 22 2001

    0.5.0: Mar 10 2001

    0.4.0: Mar 1 2001

    0.3.0: Feb 24 2001

    0.2.0: Feb 15 2001

    0.1.0: Feb 8 2001

    0.0.1: Jan 25 2001

    Daniel Veillard

    diff --git a/doc/python.html b/doc/python.html index 20736fff..63ba42c4 100644 --- a/doc/python.html +++ b/doc/python.html @@ -87,16 +87,16 @@ or libxslt wrappers or bindings:

    and XML::LibXSLT, a perl wrapper for libxml2/libxslt as part of the AxKit XML application server -
  • +
  • Dave Kuhlman provides and earlier version of the libxml/libxslt wrappers for Python
  • -
  • Petr Kozelka provides Pascal units to glue +
  • Petr Kozelka provides Pascal units to glue libxml2 with Kylix, Delphi and other Pascal compilers
  • -
  • Wai-Sun "Squidster" Chia provides bindings for Ruby and +
  • Wai-Sun "Squidster" Chia provides bindings for Ruby and libxml2 bindings are also available in Ruby through the libgdome-ruby module maintained by Tobias Peters.
  • -
  • Steve Ball and contributors maintains libxml2 and libxslt bindings for +
  • Steve Ball and contributors maintains libxml2 and libxslt bindings for Tcl
  • @@ -109,7 +109,7 @@ interface have not yet reached the maturity of the C API.

  • If you use an RPM based distribution, simply install the libxml2-python RPM and the libxslt-python RPM.
  • -
  • Otherwise use the libxml2-python +
  • Otherwise use the libxml2-python module distribution 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 @@ -139,17 +139,17 @@ in that example and how is the processing done:

  • styledoc : is a libxml2 document tree. It is obtained by parsing the XML file "test.xsl" containing the stylesheet.
  • -
  • +
  • style : this is a precompiled stylesheet ready to be used by the following transformations (note the plural form, multiple transformations can resuse the same stylesheet).
  • -
  • +
  • doc : this is the document to apply the transformation to. In this case it is simply generated by parsing it from a file but any other processing is possible as long as one get a libxml2 Doc. Note that HTML tree are suitable for XSLT processing in libxslt. This is actually how this page is generated !
  • -
  • +
  • result : this is a document generated by applying the stylesheet to the document. Note that some of the stylesheet informations may be related to the serialization of that document and as in this @@ -217,11 +217,11 @@ string with libxml2. Note how this stylesheet:

    • Uses a global parameter bar
    • -
    • Reference the extension function f
    • -
    • how the Namespace name "http://example.com/foo" has to be bound to a +
    • Reference the extension function f
    • +
    • how the Namespace name "http://example.com/foo" has to be bound to a prefix
    • -
    • how that prefix is excluded from the output
    • -
    • how the function is called from the select
    • +
    • how that prefix is excluded from the output
    • +
    • how the function is called from the select
    style = libxslt.parseStylesheetDoc(styledoc)
     doc = libxml2.parseDoc("<doc/>")
    diff --git a/doc/xslt.html b/doc/xslt.html
    index c58320d8..839d0ab5 100644
    --- a/doc/xslt.html
    +++ b/doc/xslt.html
    @@ -208,7 +208,7 @@ platform, get in touch with me to upload the package. I will keep them in the
         page; the CVS module is libxslt.

  • daily + href="ftp://xmlsoft.org/XSLT/cvs-snapshot.tar.gz">daily snapshots from CVS are also provided