dleslie 01/08/09 13:10:36
Modified: c/xdocs/sources entities.ent xalan.xml xalanLocal.xml
c/xdocs/sources/xalan history.xml index.xml readme.xml
resources.xml samples.xml usagepatterns.xml
Added: c/xdocs/sources/xalan extensionslib.xml
Log:
Preliminary updates for Xalan-C 1.2
Revision Changes Path
1.19 +7 -7 xml-xalan/c/xdocs/sources/entities.ent
Index: entities.ent
===================================================================
RCS file: /home/cvs/xml-xalan/c/xdocs/sources/entities.ent,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- entities.ent 2001/08/08 21:27:33 1.18
+++ entities.ent 2001/08/09 20:10:36 1.19
@@ -1,13 +1,13 @@
<?xml encoding="US-ASCII"?>
<!ENTITY xslt4c "Xalan-C++">
-<!ENTITY xslt4c-dist "Xalan-C_1_3">
-<!ENTITY xslt4c-current "Xalan-C++ version 1.3">
+<!ENTITY xslt4c-dist "Xalan-C_1_2">
+<!ENTITY xslt4c-current "Xalan-C++ version 1.2">
<!ENTITY xslt4c-windlls "DOMSupport.dll, PlatformSupport.dll, XalanDOM.dll,
XalanSourceTree,dll, XercesParserLiaison.dll, XMLSupport.dll, XPath.dll, XSLT.dll,
XalanTransformer.dll">
-<!ENTITY xslt4c-linuxlib "libxalan-c1_3.so">
-<!ENTITY xslt4c-aixlib "libxalan-c1_3.a">
-<!ENTITY xslt4c-hplib "libxalan-c1_3.sl">
-<!ENTITY xslt4c-solarislib "libxalan-c1_3.so">
+<!ENTITY xslt4c-linuxlib "libxalan-c1_2.so">
+<!ENTITY xslt4c-aixlib "libxalan-c1_2.a">
+<!ENTITY xslt4c-hplib "libxalan-c1_2.sl">
+<!ENTITY xslt4c-solarislib "libxalan-c1_2.so">
<!ENTITY xml4c "Xerces-C++">
<!ENTITY xml4c-used "Xerces-C++ version 1.5.1">
<!ENTITY xml4c-windll "xerces-c_1_5_1.dll">
@@ -17,7 +17,7 @@
<!ENTITY xml4c-hplib "libxerces-c1_5_1.sl">
<!ENTITY xml4c-solarislib "libxerces-c1_5_1.so">
<!ENTITY xslt4j "Xalan-Java">
-<!ENTITY icu-used "International Components for Unicode(ICU) 1.6 source files">
+<!ENTITY icu-used "International Components for Unicode(ICU) 1.8.1 source files">
<!ENTITY icu-windlls "icui18n.dll, icuuc.dll">
<!ENTITY icubridge-win "ICUBridge.dll">
<!ENTITY done SYSTEM "xalan/DONE">
1.8 +4 -5 xml-xalan/c/xdocs/sources/xalan.xml
Index: xalan.xml
===================================================================
RCS file: /home/cvs/xml-xalan/c/xdocs/sources/xalan.xml,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- xalan.xml 2001/02/15 16:45:05 1.7
+++ xalan.xml 2001/08/09 20:10:36 1.8
@@ -58,7 +58,7 @@
* <http://www.apache.org/>.
-->
-<book title="Xalan-C++ XSLT User's Guide" copyright="2000 The Apache Software
Foundation">
+<book title="Xalan-C++ XSLT User's Guide" copyright="2001 The Apache Software
Foundation">
<resources source="sbk:/sources/xalan/resources.xml"/>
@@ -67,7 +67,7 @@
<separator/>
<document id="index"
- label="Xalan-C++ 1.1"
+ label="Xalan-C++ 1.2"
source="xalan/index.xml"/>
<separator/>
@@ -114,7 +114,7 @@
<document id="extensions"
label="Extensions"
source="xalan/extensions.xml"/>
-
+ <document id="extensionslib" label="Extensions Library"
source="xalan/extensionslib.xml"/>
<separator/>
<document id="readme"
@@ -123,8 +123,7 @@
<separator/>
-<external href="http://xml.apache.org/bugs/"
- label="Bug reporting"/>
+<external href="readme.html#bugs" label="Bugs"/>
<external href="http://xml.apache.org/xalan-j/test/run.html#how-to-run-c"
label="Testing"/>
1.5 +3 -3 xml-xalan/c/xdocs/sources/xalanLocal.xml
Index: xalanLocal.xml
===================================================================
RCS file: /home/cvs/xml-xalan/c/xdocs/sources/xalanLocal.xml,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- xalanLocal.xml 2001/02/15 16:45:06 1.4
+++ xalanLocal.xml 2001/08/09 20:10:36 1.5
@@ -58,7 +58,7 @@
* <http://www.apache.org/>.
-->
-<book title="Xalan-C++ XSLT User's Guide" copyright="2000 The Apache Software
Foundation">
+<book title="Xalan-C++ XSLT User's Guide" copyright="2001 The Apache Software
Foundation">
<resources source="sbk:/sources/xalan/resources.xml"/>
@@ -103,7 +103,7 @@
<document id="extensions"
label="Extensions"
source="xalan/extensions.xml"/>
-
+ <document id="extensionslib" label="Extensions Library"
source="xalan/extensionslib.xml"/>
<separator/>
<document id="readme"
@@ -112,7 +112,7 @@
<separator/>
- <external href="http://xml.apache.org/bugs/" label="Bug reporting"/>
+ <external href="readme.html#bugs" label="Bugs"/>
<external href="http://xml.apache.org/xalan-j/test/run.html#how-to-run-c"
label="Testing"/>
1.3 +3 -3 xml-xalan/c/xdocs/sources/xalan/history.xml
Index: history.xml
===================================================================
RCS file: /home/cvs/xml-xalan/c/xdocs/sources/xalan/history.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- history.xml 2001/06/12 13:08:18 1.2
+++ history.xml 2001/08/09 20:10:36 1.3
@@ -1,4 +1,4 @@
-<s3 title="Changes since &xslt4c; version 1.0">
+<s3 title="Changes for &xslt4c; version 1.1">
<p>In addition to adding to the list of platforms on which &xslt4c; builds, our
focus for this release has been on bug fixes, performance enhancements,
and providing a simplified C++ and C API for performing standard transformations.
Major updates since version 1.0 include:</p>
<ul>
@@ -30,7 +30,7 @@
recognize.</li>
</ul>
</s3>
-<s3 title="Changes since &xslt4c; version 0.40.0">
+<s3 title="Changes for &xslt4c; version 1.0">
<p>Major updates since version 0.40.0 include:</p>
<ul>
<li>Full support for namespace handling<br/><br/></li>
@@ -40,7 +40,7 @@
<li>Support for the output encoding attribute</li>
</ul>
</s3>
-<s3 title="Changes since &xslt4c; version 0.30.0">
+<s3 title="Changes for &xslt4c; version 0.40.0">
<p>Major updates since version 0.30.0 include:</p>
<ul>
<li>Permitting OS file names (as well as URLs) as command-line arguments with
TestXSLT<br/><br/></li>
1.24 +2 -3 xml-xalan/c/xdocs/sources/xalan/index.xml
Index: index.xml
===================================================================
RCS file: /home/cvs/xml-xalan/c/xdocs/sources/xalan/index.xml,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- index.xml 2001/02/15 16:45:09 1.23
+++ index.xml 2001/08/09 20:10:36 1.24
@@ -65,9 +65,8 @@
document types.</p>
<p>&xslt4c-current; is a robust implementation of the W3C Recommendations
for XSL Transformations (XSLT) and the XML Path Language (XPath). It includes a
compatible release of the
- &xml4c; XML parser: &xml4c-used;. In addition to adding builds for HP-UX 11 and
Solaris, the focus for this release
- is on bug fixes, performance enhancements, providing a simpler C++ and C API
for performing standard transformations, and new samples.
- For the details, see the <link idref="readme">Release Notes</link>.</p>
+ &xml4c; XML parser: &xml4c-used;. The focus for this release is on bug fixes,
performance enhancements, new
+ samples, and a preliminary set of extension functions. For the details, see the
<link idref="readme">Release Notes</link>.</p>
</s2>
<s2 title="How do I get it?">
1.26 +21 -7 xml-xalan/c/xdocs/sources/xalan/readme.xml
Index: readme.xml
===================================================================
RCS file: /home/cvs/xml-xalan/c/xdocs/sources/xalan/readme.xml,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- readme.xml 2001/06/12 13:08:20 1.25
+++ readme.xml 2001/08/09 20:10:36 1.26
@@ -2,7 +2,6 @@
<!DOCTYPE s1 SYSTEM "../../style/dtd/document.dtd"[
<!ENTITY done-c SYSTEM "DONE">
<!ENTITY status-c SYSTEM "STATUS">
-<!ENTITY bugs-c SYSTEM "BUGS">
<!ENTITY history-c SYSTEM "history.xml">]>
<!--
@@ -74,16 +73,31 @@
<ul>
<li><link anchor="done">Changes since &xslt4c; version 1.1</link></li>
<li><link anchor="bugs">Bug reporting</link></li>
- <li><link anchor="xml4j">Version of &xml4c; to use</link></li>
+ <li><link anchor="xml4c">Version of &xml4c; to use</link></li>
<li><link anchor="to-do">To-do tasks for future &xslt4c; releases</link></li>
</ul>
<anchor name="done"/>
- &done-c;
+ <s3 title="Changes since &xslt4c; version 1.1">
+ <p>TO BE ADDED</p>
+ <ul>
+ <li>Extension functions</li>
+ <li></li>
+ <li></li>
+ <li></li>
+ </ul>
+ </s3>
<anchor name="bugs"/>
- &bugs-c;
- <anchor name="xml4j"/>
- &status-c;
-
+ <s3 title="Bug reporting">
+ <p>All known &xslt4c; bugs are listed in <resource-ref idref="bugzilla"/>. For
a list of open bugs with links to each bug
+ report, see <resource-ref idref="buglist"/>. If you find a new bug, please
enter a XalanC bug report in this
+ database.</p>
+ <note>Before you can enter your first bug report, you must submit your email
address to Bugzilla and receive a password.</note>
+ <p>We strongly encourage you write patches for problems you find and submit
them to
+ [EMAIL PROTECTED] We review the patches we receive to make sure they
do not break something else, and (assuming they
+ do not) include them in our next release. In the interest of fixing bugs,
adding enhancements, and addressing outstanding design
+ issues, we sincerely want (and need!) your active participation in the ongoing
development of Xalan.</p>
+ </s3><anchor name="xml4c"/>
+ &status-c;
</s2><anchor name="build"/>
<s2 title="Build Notes">
<ul>
1.13 +8 -0 xml-xalan/c/xdocs/sources/xalan/resources.xml
Index: resources.xml
===================================================================
RCS file: /home/cvs/xml-xalan/c/xdocs/sources/xalan/resources.xml,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- resources.xml 2001/02/16 21:41:49 1.12
+++ resources.xml 2001/08/09 20:10:36 1.13
@@ -48,5 +48,13 @@
<resource id="dpawsonxslfaq" title="XSL Frequently Asked Questions"
location="http://www.dpawson.co.uk/xsl/xslfaq.html"/>
<human-resource id="xalandev" name="Xalan Development Mailing List"
mailto="[EMAIL PROTECTED]"/>
+
+ <resource id="bugzilla"
+ title="Bugzilla (the Apache bug database)"
+ location="http://nagoya.apache.org/bugzilla"/>
+ <resource id="buglist"
+ title="XalanC open bugs"
+
location="http://nagoya.apache.org/bugzilla/buglist.cgi?bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&email1=&emailtype1=substring&emailassigned_to1=1&email2=&emailtype2=substring&emailreporter2=1&bugidtype=include&bug_id=&changedin=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&product=XalanC&short_desc=&short_desc_type=substring&long_desc=&long_desc_type=substring&bug_file_loc=&bug_file_loc_type=substring&keywords=&keywords_type=anywords&field0-0-0=noop&type0-0-0=noop&value0-0-0=&cmdtype=doit&order=Reuse+same+sort+as+last+time"/>
+
</resources>
1.28 +32 -18 xml-xalan/c/xdocs/sources/xalan/samples.xml
Index: samples.xml
===================================================================
RCS file: /home/cvs/xml-xalan/c/xdocs/sources/xalan/samples.xml,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- samples.xml 2001/06/08 19:22:02 1.27
+++ samples.xml 2001/08/09 20:10:36 1.28
@@ -64,11 +64,13 @@
<li><link anchor="simpletransform">SimpleTransform</link></li>
<li><link anchor="streamtransform">StreamTransform</link></li>
<li><link anchor="usestylesheetparam">UseStylesheetParam</link></li>
+ <li><link anchor="xalantransformercallback">XalanTransformerCallback</link></li>
<li><link anchor="tracelisten">TraceListen</link></li>
<li><link anchor="compilestylesheet">CompileStylesheet</link></li>
<li><link anchor="documentbuilder">DocumentBuilder</link></li>
<li><link anchor="threadsafe">ThreadSafe</link></li>
<li><link anchor="xpathwrapper">XPathWrapper</link></li>
+ <li><link anchor="simplexpathapi">SimpleXPathAPI</link></li>
<li><link anchor="externalfunctions">ExternalFunctions</link></li>
<li><link anchor="apachemodulexslt">ApacheModuleXSLT</link></li>
</ul>
@@ -129,7 +131,17 @@
as a single argument. For example:</p>
<p><code>UseStylesheetParam param1 "'hello out there'"</code></p>
<p>See also: <link idref="usagepatterns" anchor="params">Setting stylesheet
parameters</link>.</p>
- </s2><anchor name="tracelisten"/>
+ </s2><anchor name="xalantransformercallback"/>
+ <s2 title="XalanTransformerCallback">
+ <p>What it does: it returns transformation output in blocks to a callback
function, which writes the output to a file.
+ This sample illustrats the use of a callback function to incrementally process a
transformation result, that is to begin
+ working with the transformation result before the transformation has beeen
completed. See <link idref="usagepatterns"
+ anchor="incremental">Processing output incrementally</link>.</p>
+ <p>You can run it from the XalanTransformerCallback subdirectory with</p>
+ <p><code>XalanTransformerCallback foo.xml foo.xsl [foo.out]</code></p>
+ <note>If you omit the third argument, the transformation result is written to the
screen.</note>
+ </s2>
+ <anchor name="tracelisten"/>
<s2 title="TraceListen">
<p>What it does: Trace events during a transformation; the transformation uses
birds.xsl to transform birds.xml and writes the
output to birds.out.</p>
@@ -188,6 +200,8 @@
<p>See also: <link idref="usagepatterns" anchor="compiled">Compiling
stylesheets</link>.</p>
</s2><anchor name="xpathwrapper"/>
<s2 title="XPathWrapper">
+ <note>For a more streamlined sample that uses the XPathEvaluator interface, see
+ <link anchor="simplexpathapi">SimpleXPathAPI</link>.</note>
<p>This sample uses an executable (TestDriver in Windows, XPathWrapper in Linux
and AIX), and two classes: XPathWrapper and
XPathWrapperImp.</p>
<p>What it does: The executable passes XPathWrapper an XML file name, a context
node location path, and an XPath
@@ -195,12 +209,18 @@
XPath expression from specified context node in the XML document and returns
the nodes it finds (if any).</p>
<note>You can use this sample as an aid when you want to find out what a given
XPath expression returns from a
given context node in an XML file.</note>
- <p>Run this sample from the XPathWrapper subdirectory with</p>
- <p>Windows:<br/>
- <code>TestDriver <ref>XMLFile ContextNode
XPathExpression</ref></code></p>
- <p>UNIX:<br/>
- <code>XPathWrapper <ref>XMLFile ContextNode
XPathExpression</ref></code></p>
- <p>where <ref>XMLFile</ref> is an XML source file, <ref>ContextNode</ref> is
the location path to the context
+ <p>Run this sample from the XPathWrapper subdirectory with the same command
line arguments described for <link
+ anchor="simplexpathapi">SimpleXPathAPI</link>. Under Windows, the executable is
TestDriver; under UNIX, the
+ executable is XPathWrapper.</p>
+ </s2><anchor name="simplexpathapi"/>
+ <s2 title="SimpleXPathAPI">
+ <p>What it does: uses the XPathEvaluator interface to evaluate an XPath
expression from the specified context node of
+ an XML file, and displays the nodeset returned by the expression.</p>
+ <note>You can use this sample as an aid when you want to find out what a given
XPath expression returns from a
+ given context node in an XML file.</note>
+ <p>Run this sample from the SimpleXPathAPI subdirectory with</p>
+ <p><code>SimpleXPathAPI <ref>XMLFile</ref> <ref>ContextNode</ref>
<ref>XPathExpression</ref></code></p>
+ <p>where <ref>XMLFile</ref> is an XML source file, <ref>ContextNode</ref> is the
location path to the context
node, and <ref>XPathExpression</ref> is an XPath expression to apply to that
context node. The XPathWrapper
subdirectory contains an XML file named xml.foo (part of it appears below).</p>
<source><?xml version="1.0"?>
@@ -211,18 +231,12 @@
<name first="Paul" last="Dick"/>
</doc></source>
<p>You can try command lines like</p>
- <p>Windows:<br/>
- <code>TestDriver foo.xml /doc name/@last</code></p>
- <p>UNIX:<br/>
- <code>XPathWrapper foo.xml /doc name/@last</code></p>
+ <p><code>SimpleXPathAPI foo.xml /doc name/@last</code></p>
<p>and</p>
- <p>Windows:<br/>
- <code>TestDriver foo.xml /
'//name[position()="4"]/@first'</code></p>
- <p>UNIX:<br/>
- <code>XPathWrapper foo.xml /
'//name[position()="4"]/@first'</code></p>
- <note>If an XPathWrapper argument includes characters (such as *) that the
shell intercepts, enclose the argument
- in double quotes.</note>
- <p>See also: <link idref="usagepatterns" anchor="xpath">Working with XPath
expressions</link>.</p>
+ <p><code>SimpleXPathAPI foo.xml / '//name[position()="4"]/@first'</code></p>
+ <note>If a SimpleXPathAPI argument includes characters (such as *) that the
shell intercepts, enclose the argument
+ in double quotes.</note>
+ <p>See also: <link idref="usagepatterns" anchor="xpath">Working with XPath
expressions</link>.</p>
</s2><anchor name="externalfunctions"/>
<s2 title="ExternalFunctions">
<p>What it does: implement, install, and illustrate the usage of three
extension functions. The functions return a
1.28 +8 -4 xml-xalan/c/xdocs/sources/xalan/usagepatterns.xml
Index: usagepatterns.xml
===================================================================
RCS file: /home/cvs/xml-xalan/c/xdocs/sources/xalan/usagepatterns.xml,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- usagepatterns.xml 2001/06/08 20:22:25 1.27
+++ usagepatterns.xml 2001/08/09 20:10:36 1.28
@@ -75,7 +75,7 @@
<s2 title="Introduction">
<p>To perform a transformation, use one of the <jump
href="apdidocs/class_xalantransformer.html">XalanTransformer</jump> transform()
methods. The transformation requires an XML source document and an XSL stylesheet.
Both of these objects may be represented by instances of <jump
href="apidocs/class_xsltinputsource.html">XSLTInputSource</jump>. You can construct an
XSLTInputSource with a string (the system ID for a file or URI), an input stream, or a
DOM.</p>
-<p>If you are using an XSL stylesheet to perform a series of transformations, you
can improve performance by calling transfomr() with a compiled stylesheet, an instance
of <jump
href="apidocs/class_xalancompiledstylesheet.html">XalanCompiledStylesheet</jump>. If
you are transforming an XML source more than once, you should call transform() with a
parsed XML source, an instance of <jump
href="apidocs/class_xalanparsedsource">XalanParsedSource</jump>. See <link
anchor="compiled">Performing a series of transformations</link>.</p>
+<p>If you are using an XSL stylesheet to perform a series of transformations, you
can improve performance by calling transform() with a compiled stylesheet, an instance
of <jump
href="apidocs/class_xalancompiledstylesheet.html">XalanCompiledStylesheet</jump>. If
you are transforming an XML source more than once, you should call transform() with a
parsed XML source, an instance of <jump
href="apidocs/class_xalanparsedsource">XalanParsedSource</jump>. See <link
anchor="compiled">Performing a series of transformations</link>.</p>
<p>If you XML source document contains a stylesheet Processing Instruction (PI),
you do not need to include a stylesheet object when you call transform().</p>
<p>The transformation output is represented by an <jump
href="apdidocs/class_xsltresulttarget.html">XSLTResultTarget</jump>, which you can set
up to refer to an output stream, the system ID for a file or URI, or a DOM.</p>
<p>For detailed API documentation, see <jump href="apidocs/index.html">&xslt4c;
API</jump>. For an overview of the
@@ -166,7 +166,7 @@
const void* theOutputHandle,
XalanOutputHandlerType theOutputHandler
XalanFlushHanderType theFlushHandler = 0);</source>
-
+<p>For an example, see <link idref="samples"
anchor="xalantransformercallback">XalanTransformerCallback</link>.</p>
</s2><anchor name="compiled"/>
<s2 title="Performing a series of transformations">
<p>Before Xalan performs a standard transformation, it must parse the XML document
and compile the XSL stylesheet into binary representations. If you plan to use the
same XML document or stylesheet in a series of transformations, you can improve
performance by parsing the XML document or compiling the styleheet once and using the
binary representation when you call transform().</p>
@@ -223,8 +223,12 @@
DOM_Document domOut = theParserLiaison.mapXercesDocument(docOut)</source>
</s2><anchor name="xpath"/>
<s2 title="Working with XPath expressions">
-<p>XSL stylesheets use XPath expressions to select nodes, specify conditions, and
generate text for the result tree. XPath provides an API that you can call directly.
For example, you may want to select nodes programmatically and do your own processing
without a stylesheet.</p>
-<p>For an example that executes XPath expressions against XML source files, see
<link idref="samples" anchor="xpathwrapper">XPathWrapper</link>.</p>
+<p>XSL stylesheets use XPath expressions to select nodes, specify conditions, and
generate text for the result tree.
+XPath provides an API that you can call directly. For example, you may want to
select nodes programmatically and do
+your own processing without a stylesheet. &xslt4c; provides an XPathEvaluator
interface to simplify the process of
+executing XPath expressions.</p>
+<p>For an example that executes XPath expressions against XML source files, see
<link idref="samples" anchor="simplexpathapi">SimpleXPathAPI</link>
+(takes advantage of the XPathEvaluator interface) and <link idref="samples"
anchor="xpathwrapper">XPathWrapper</link>.</p>
</s2><anchor name="tracelistener"/>
<s2 title="Using TraceListener">
<p>TraceListener is a debugging abstract base class implemented by
TraceListenerDefault. You can use TraceListener to trace any combination of the
following:</p>
1.1 xml-xalan/c/xdocs/sources/xalan/extensionslib.xml
Index: extensionslib.xml
===================================================================
<?xml version="1.0" standalone="no"?>
<!DOCTYPE s1 SYSTEM "../../style/dtd/document.dtd">
<!--
* The Apache Software License, Version 1.1
*
*
* Copyright (c) 1999 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Xalan" and "Apache Software Foundation" must
* not be used to endorse or promote products derived from this
* software without prior written permission. For written
* permission, please contact [EMAIL PROTECTED]
*
* 5. Products derived from this software may not be called "Apache",
* nor may "Apache" appear in their name, without prior written
* permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
* USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation and was
* originally based on software copyright (c) 1999, Lotus
* Development Corporation., http://www.lotus.com. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
-->
<s1 title="Extensions library">
<ul>
<li><link anchor="intro">Introduction</link></li>
<li><link anchor="xalanns">Xalan namespace</link></li>
<li><link anchor="nodeset">nodeset</link></li>
<li><link anchor="intersection">intersection</link></li>
<li><link anchor="difference">difference</link></li>
<li><link anchor="distinct">distinct</link></li>
<li><link anchor="evaluate">evaluate</link></li>
<li><link anchor="hassamenodes">hasSameNodes</link></li>
</ul><anchor name="intro"/>
<s2 title= "Introduction">
<p>Extension elements and 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 &xslt4c;. If you have ideas
and/or contributions you would like to make, please email us at the
<human-resource-ref idref="xalandev"/>.</p>
</s2><anchor name="xalanns"/>
<s2 title="Xalan namespace">
<p>We are placing the Xalan extension functions in the XalanExtensions module and we
have defined a namespace for this module:</p>
<p> <code>http://xml.apache.org/xalan</code></p>
<p>If you are calling &xslt4c;-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 &xslt4c;-supplied extensions are stored, you won't have to modify your
stylesheet.</p>
<p>For an example that uses this namespace, see <link anchor="ex-nodeset">Example
with the nodeset extension function</link>.</p>
</s2>
<anchor name="nodeset"/>
<s2 title= "nodeset">
<p>Implemented in <jump
href="apidocs/class_functionnodeset.html">FunctionNodeSet</jump>, <code>nodeset
(result-tree-fragment)</code> casts a result tree fragment into a node-set.</p>
<note>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 <jump
href="http://www.w3.org/TR/xslt#section-Result-Tree-Fragments">Result Tree
Fragments</jump>.</note>
<anchor name="ex-nodeset"/>
<s3 title="Example with the nodeset extension function">
<p>The following stylesheet uses the nodeset extension function to cast a result
tree fragment into a node-set that can then be navigated in standard XPath manner. It
uses the http://xml.apache.org/xalan namespace to provide access to the nodeset()
method in xml.apache.xalan.lib.Extensions.</p>
<source><?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
xmlns:xalan="http://xml.apache.org/xalan"
exclude-result-prefixes="xalan">
<xsl:template match="/">
<out>
<xsl:variable name="rtf">
<docelem>
<elem1>
<elem1a>ELEMENT1A</elem1a>
<elem1b>,ELEMENT1B</elem1b>
</elem1>
<elem2>
<elem2a>ELEMENT2A</elem2a>
</elem2>
</docelem>
</xsl:variable>
<xsl:for-each select="xalan:nodeset($rtf)/docelem//*">
<xsl:value-of select="name(.)"/><xsl:text>,</xsl:text>
</xsl:for-each>
</out>
</xsl:template>
</xsl:stylesheet></source>
<p>The output of running this stylesheet (with any XML input source) is a
comma-delimited list of the element names in the node-set<br/>
<code><out>elem1,elem1a,elem1b,elem2,elem2a</out></code></p>
<note>For illustration purposes, the preceding stylesheet pays no attention to the
structure and content of the XML input document. Instead, it processes the template
(in the stylesheet) bound to the variable named rtf.</note>
</s3>
</s2><anchor name="intersection"/>
<s2 title="intersection">
<p>Implemented in <jump
href="apidocs/class_functionintersection.html">FunctionIntersection</jump>,
<code>intersection (node-set1, node-set2)</code> returns a node-set with all nodes
that are in ns1 and in ns2.</p>
</s2><anchor name="difference"/>
<s2 title= "difference">
<p>Implemented in <jump
href="apidocs/class_functiondifference.html">FunctionDifference</jump>,
<code>difference(node-set1, node-set2)</code> returns a node-set with the nodes in
node-set1 and not in node-set2.</p>
</s2><anchor name="distinct"/>
<s2 title= "distinct">
<p>Implemented in <jump
href="apidocs/class_functiondistinct.html">FunctionDistinct</jump>, 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.</p>
</s2><anchor name="evaluate"/>
<s2 title= "evaluate">
<p>Implemented in <jump
href="apidocs/class_functionevaluate.html">FunctionEvaluate</jump>, <code>evaluate
(xpath-expression)</code> returns the result of evaluating the xpath-expression in the
current
XPath expression context (automatically passed in by the extension mechanism).</p>
<p>Use the evaluation extension function when the value of the expression is not
known until run time.</p>
</s2>
<anchor name="hassamenodes"/>
<s2 title= "hasSameNodes">
<p>Implemented in <jump
href="apidocs/class_functionhassamenodes.html">FunctionHasSameNodes</jump>,
<code>hasSameNodes(node-set1, node-set2)</code> returns true if both node-set1 and
node-set2 contain exactly the same set of nodes.</p>
</s2>
</s1>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]