# HG changeset patch # User paulb # Date 1169245371 0 # Node ID 60371d21572e5a1a6bbc715e91230055cdd6a299 # Parent 2a8d1311249803f89b95bd9d824835bc01085182 [project @ 2007-01-19 22:22:51 by paulb] Documented expr-prefix and the xslform_fix.py script. Updated release information. diff -r 2a8d13112498 -r 60371d21572e docs/index.html --- a/docs/index.html Fri Jan 19 22:22:33 2007 +0000 +++ b/docs/index.html Fri Jan 19 22:22:51 2007 +0000 @@ -10,23 +10,23 @@ libxml2, libxslt and (optionally) WebStack.
First of all, let us assume that the XSLTools distribution has been
-unpacked and now sits in the XSLTools-0.4.3
directory.
XSLTools-0.4.4
directory.
Before we begin, we must make sure that the XSLTools package is
available
-to Python. The easiest way to do this is to change into the XSLTools-0.4.3
directory and to run the setup.py
+to Python. The easiest way to do this is to change into the XSLTools-0.4.4
directory and to run the setup.py
script provided with the version of Python you are going to be using
(possibly as a privileged user like root
):
cd XSLTools-0.4.3+
python setup.py install
cd XSLTools-0.4.4
python setup.py install
If you don't want to install XSLTools in this way, or if you can't
do so
because you don't have root
privileges, you can just make
sure
-that the XSLTools-0.4.3
directory sits on your
+that the XSLTools-0.4.4
directory sits on your
PYTHONPATH
.
The API documentation for use in conjunction with this
guide can be found inside the apidocs
-directory within the XSLTools-0.4.3
directory. Of course,
+directory within the XSLTools-0.4.4
directory. Of course,
it is always possible to view the API documentation
within Python by importing modules (such as XSLTools.XSLOutput
)
and using Python's built-in help
function.
Example:
<p template:multiple-choice-list-element="question,question-types,question-type">
<input template:attribute-list-button="question-type,checked" name="..." value="..." type="checkbox"/>
</p>
Given an XML document like this...
<question>
<question-types question-type="text" value-is-set="true"/>
<question-types question-type="choice"/>
</question>
...the following would be produced as output:
<p>
<input name="path-to-question-type" value="text" type="checkbox" checked="checked"/>
</p>
<p>
<input name="path-to-question-type" value="choice" type="checkbox"/>
</p>
Syntax:
attribute-name,attribute-to-create-when-set
Related attributes:
template:multiple-choice-list-element
template:attribute-button
Implementing attributes:
template:attribute
template:expr
template:expr-attr
The special annotations template:expr
and template:expr-attr
are used respectively to test an XPath expression in the current
context and to provide the name of an attribute which is to be created
-in the final output, should the expression evaluate to a true value.