[Lxml-checkins] r42724 - lxml/trunk/doc

scoder at codespeak.net scoder at codespeak.net
Sun May 6 09:02:34 CEST 2007


Author: scoder
Date: Sun May  6 09:02:34 2007
New Revision: 42724

Modified:
   lxml/trunk/doc/xpathxslt.txt
Log:
restructuring of XSLT docs

Modified: lxml/trunk/doc/xpathxslt.txt
==============================================================================
--- lxml/trunk/doc/xpathxslt.txt	(original)
+++ lxml/trunk/doc/xpathxslt.txt	Sun May  6 09:02:34 2007
@@ -9,10 +9,15 @@
 ..
    1  XPath
      1.1  The ``xpath()`` method
-     1.2  The ``XPath`` class
-     1.3  The ``XPathEvaluator`` classes
-     1.4  ``ETXPath``
+     1.2  XPath return values
+     1.3  The ``XPath`` class
+     1.4  The ``XPathEvaluator`` classes
+     1.5  ``ETXPath``
    2  XSLT
+     2.1  XSLT result objects
+     2.2  Stylesheet parameters
+     2.3  The ``xslt()`` tree method
+     2.4  Profiling
 
 
 The usual setup procedure::
@@ -276,9 +281,28 @@
 
   >>> f = StringIO('<a><b>Text</b></a>')
   >>> doc = etree.parse(f)
-  >>> result = transform(doc)
+  >>> result_tree = transform(doc)
+
+By default, XSLT supports all extension functions from libxslt and libexslt as
+well as Python regular expressions through the `EXSLT regexp functions`_.
+Also see the documentation on `custom extension functions`_ and `document
+resolvers`_.  There is a separate section on `controlling access`_ to external
+documents and resources.
+
+.. _`EXSLT regexp functions`: http://www.exslt.org/regexp/
+.. _`document resolvers`: resolvers.html
+.. _`controlling access`: resolvers.html#i-o-access-control-in-xslt
+
+
+XSLT result objects
+-------------------
 
-The result object can be accessed like a normal ElementTree document::
+The result of an XSL transformation can be accessed like a normal ElementTree
+document::
+
+  >>> f = StringIO('<a><b>Text</b></a>')
+  >>> doc = etree.parse(f)
+  >>> result = transform(doc)
 
   >>> result.getroot().text
   'Text'
@@ -317,14 +341,6 @@
     [...]
   LookupError: unknown encoding: UCS4
 
-By default, XSLT supports all extension functions from libxslt and libexslt as
-well as Python regular expressions through EXSLT.  Also see the documentation
-on `custom extension functions`_ and `document resolvers`_.  There is a
-separate section on `controlling access`_ to external documents and resources.
-
-.. _`document resolvers`: resolvers.html
-.. _`controlling access`: resolvers.html#i-o-access-control-in-xslt
-
 
 Stylesheet parameters
 ---------------------


More information about the lxml-checkins mailing list