|
| |
Extension functions provide a powerful mechanism
for extending and simplifying what you can do with an XLST processor like
Xalan. With input and contributions from the XML open-source developer community, we are working on placing the most useful
extensions in an extensions library distributed with Xalan-C++. If you have ideas and/or contributions you would like to make,
please email us at the Xalan Development Mailing List.
|
| |
Xalan-C++ supports the EXSLT initiative to provide a set of
standard extension functions to XSLT users. Xalan-C++ includes beta implementations for
functions in four of the EXSLT namespaces (some are calls to extension already in the Xalan namespace).
The source files for the implementations are in the XalanEXSLT subdirectory of the source tree. See
For the function specifications, see:
Anyone who would like to participate in the Xalan-C++ initiative to support EXSLT by testing these implementations or implementing
other EXSLT functions is more than welcome. Please email us at the Xalan Development Mailing List.
|
| |
We are placing the Xalan extension functions in the XalanExtensions module and we have defined a namespace for this module:
http://xml.apache.org/xalan
If you are calling Xalan-C++-supplied extensions, we recommend that you define this namespace in your stylesheet element, and
call the extension using the namespace prefix that you have associated with that namespace. That way, if we later reorganize
how the Xalan-C++-supplied extensions are stored, you won't have to modify your stylesheet.
For an example that uses this namespace, see Example with the nodeset extension function.
|
| |
Implemented in FunctionNodeSet, nodeset (result-tree-fragment)
casts a result tree fragment into a node-set.
| When you bind a variable to a template, rather than to the value generated by a select expression, the data type of the variable
is result tree fragment. For more information, see Result
Tree Fragments. |
|
| |
Implemented in FunctionIntersection, intersection (node-set1,
node-set2) returns a node-set with all nodes that are in ns1 and in ns2.
|
| |
Implemented in FunctionDifference, difference(node-set1,
node-set2) returns a node-set with the nodes in node-set1 and not in node-set2.
|
| |
Implemented in FunctionDistinct, distinct (node-set) returns a node-set
containing nodes with distinct string values. If more than one node in the node-set contains the same text node value, distinct
only returns the first of these nodes that it finds.
|
| |
Implemented in FunctionEvaluate, evaluate (xpath-expression)
returns the result of evaluating the xpath-expression in the current XPath expression context (automatically passed in by the
extension mechanism).
Use the evaluation extension function when the value of the expression is not known until run time.
|
| |
Implemented in FunctionHasSameNodes, hasSameNodes(node-set1,
node-set2) returns true if both node-set1 and node-set2 contain exactly the same set of nodes.
|
|
|