From c66126835d4df59cf4aaea9876c27546727b33eb Mon Sep 17 00:00:00 2001
From: Daniel Veillard xmlSubstituteEntitiesDefault(1); xmlLoadExtDtdDefaultValue = 1; xmlLoadExtDtdDefaultValue = 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 }
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 -> or use xsltproc --stringparam test alpha foo.xsl foo.xml or use xsltproc --stringparam test alpha foo.xsl foo.xml
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:
-
+
+ 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'"
<- .
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:
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
-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.
-Libxslt is also available from CVS:
The Gnome - CVS base. Check the Gnome CVS Tools - page; the CVS module is libxslt.
The Gnome + CVS base. Check the Gnome CVS Tools + page; the CVS module is libxslt.
+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:
Currently a libxslt module has to be compiled within the application using @@ -174,10 +174,10 @@ typedef void *(*xsltExtInitFunction)(xsltTransformContextPtr ctxt,
There is a single call to do this registration:
@@ -222,8 +222,8 @@ find one from the other:xsltTransformContextPtr xsltXPathGetTransformContext (xmlXPathParserContextPtr ctxt);-
xmlXPathContextPtr
associated to an
+ xmlXPathContextPtr
associated to an
xsltTransformContext
is stored in the xpathCtxt
field.valuePush(ctxt,
obj)
xmlXPathFreeObject(obj)
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/internals.html b/doc/internals.html index 03bf62f0..b84e029b 100644 --- a/doc/internals.html +++ b/doc/internals.html @@ -78,22 +78,22 @@ A:link, A:visited, A:active { text-decoration: underline }
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: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:A few things should be noted here:
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 @@ -335,7 +335,7 @@ containing the parsed expression tree, for example the expression:
This can be tested using the testXPath
command (in the
libxml codebase) using the --tree
option.
Again, the KISS approach is used. No optimization is done. This could be -an interesting thing to add. Michael +an interesting thing to add. Michael Kay describes a lot of possible and interesting optimizations done in Saxon which would be possible at this level. I'm unsure they would provide much gain since the expressions tends to be relatively simple in general and @@ -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).
nargs
for proper handling of errors or functions
with variable numbers of parametersobj =
+ - pop the parameters from the stack using
obj =
valuePop(ctxt);
-- do the function specific computation
-- push the result parameter on the stack using
valuePush(ctxt,
+ - do the function specific computation
+ - push the result parameter on the stack using
valuePush(ctxt,
res);
-- free up the input parameters with
+
- free up the input parameters with
xmlXPathFreeObject(obj);
-- return
+ - return
Sometime the work can be done directly by modifying in-situ the top object
on the stack ctxt->value
.
There is a separate document explaining how the extension support works.
Michael Kay wrote a
+ Michael Kay wrote a
really interesting article on Saxon internals and the work he did on
performance issues. I wishes I had read it before starting libxslt design (I
would probably have avoided a few mistakes and progressed faster). A lot of
@@ -452,11 +452,11 @@ for output should be added directly to libxml).
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:
Mostly a bug fix release.
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:
bar
style = libxslt.parseStylesheetDoc(styledoc) doc = libxml2.parseDoc("<doc/>")