dleslie 02/01/31 07:55:22
Modified: java/xdocs/sources/xalan commandline.xml dtm.xml
extensionslib.xml features.xml
Log:
Updates per Joe Kesselman's 'source_location' revisions.
Revision Changes Path
1.20 +2 -2 xml-xalan/java/xdocs/sources/xalan/commandline.xml
Index: commandline.xml
===================================================================
RCS file: /home/cvs/xml-xalan/java/xdocs/sources/xalan/commandline.xml,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -r1.19 -r1.20
--- commandline.xml 30 Jan 2002 22:23:12 -0000 1.19
+++ commandline.xml 31 Jan 2002 15:55:22 -0000 1.20
@@ -106,7 +106,7 @@
false)
-RL recursionLimit (Set numeric limit on depht of stylesheet
recursion)
--L (Turn on source-location attribute)
+-L (Turn on source_location attribute)
</source>
<p>Use <code>-IN</code> to specify the XML source document.</p>
<p>Use <code>-XSL</code> to specify the XSL stylesheet file.</p>
@@ -120,7 +120,7 @@
<p>For information about incremental and optimized stylesheet processing, see
<link idref="dtm" anchor="settings">DTM settings</link>.</p>
<p>Use <code>-L</code> to obtain access to a SourceLocator that a stylesheet
extension can use to get information about the location
of nodes in the source document. For more information, see <link
idref="extensionslib" anchor="nodeinfo">NodeInfo extension functions</link>
- and <link idref="features"
anchor="source-location">source-location</link>.</p>
+ and <link idref="features"
anchor="source_location">source_location</link>.</p>
<p>Use <code>-URIRESOLVER</code> with a fully qualified class name to utilize
a custom implementation of the
<jump href="apidocs/javax/xml/transform/URIResolver.html">URIResolver</jump>
TrAX interface to resolve URIs for
xsl:include, xsl:import, and the document() function.</p>
1.3 +62 -6 xml-xalan/java/xdocs/sources/xalan/dtm.xml
Index: dtm.xml
===================================================================
RCS file: /home/cvs/xml-xalan/java/xdocs/sources/xalan/dtm.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- dtm.xml 15 Jun 2001 16:50:50 -0000 1.2
+++ dtm.xml 31 Jan 2002 15:55:22 -0000 1.3
@@ -1,7 +1,61 @@
<?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="&xslt4j; DTM">
<ul>
<li><link anchor="intro">Introduction</link></li>
@@ -49,11 +103,13 @@
<td>"http://xml.apache.org/xalan/features/optimize"</td>
<td>true</td>
<td><link anchor="optimized">optimized transforms</link></td>
- </tr>
+ </tr>
</table>
<p>Both of these DTM settings are described below.</p>
+ <note>The DTM also provides a setting that you can use to track location
information for each node in the source document. See
+ <link idref="features"
anchor="source_location">"http://apache.org/xalan/features/source_location"</link></note>
<anchor name="incremental"/>
- <s3 title="http://xml.apache.org/xalan/features/incremental">
+ <s3 title="'http://xml.apache.org/xalan/features/incremental'">
<p>Set this feature to true to enable incremental transformations. If set to
false (the default), the transform and the parse
are performed on the same thread.</p>
<note> When set to true: If the parser is Xerces, we perform an
@@ -71,9 +127,9 @@
java.lang.Boolean.TRUE);
...</source>
</s3><anchor name="optimized"/>
- <s3 title="http://xml.apache.org/xalan/features/optimize">
+ <s3 title="'http://xml.apache.org/xalan/features/optimize'">
<p>When set to true (the default), this feature enables optimizations that may
involve structural rewrites of the stylesheet.
Any tool that requires direct access to the stylesheet structure should set this
feature to false.</p>
-</s3>
+ </s3>
</s2>
</s1>
1.22 +8 -6 xml-xalan/java/xdocs/sources/xalan/extensionslib.xml
Index: extensionslib.xml
===================================================================
RCS file: /home/cvs/xml-xalan/java/xdocs/sources/xalan/extensionslib.xml,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -r1.21 -r1.22
--- extensionslib.xml 30 Jan 2002 22:23:12 -0000 1.21
+++ extensionslib.xml 31 Jan 2002 15:55:22 -0000 1.22
@@ -200,7 +200,7 @@
</s2><anchor name="intersection"/>
<s2 title="intersection">
<p>Implemented in <jump
href="apidocs/org/apache/xalan/lib/Extensions.html">org.apache.xalan.lib.Extensions</jump>,<br/>
-<code>intersection (node-set1, node-set2)</code> function returns a node-set with
all nodes that are in ns1 and in ns2 .</p>
+<code>intersection (node-set1, node-set2)</code> function 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/org/apache/xalan/lib/Extensions.html">org.apache.xalan.lib.Extensions</jump>,<br/>
@@ -220,12 +220,12 @@
use to get information about the location of nodes in the source document:</p>
<ul>
<li><link anchor="systemid">systemId</link></li>
-<li><link anchor="publicid">publicId</link></li>
+<li><link anchor="publicid">publicId</link> (to be done)</li>
<li><link anchor="linenumber">lineNumber</link></li>
<li><link anchor="columnnumber">columnNumber</link></li>
</ul>
<note>If you want to use the NodeInfo extension elements, you MUST set the
TransformerFactory
-<link idref="features" anchor="source-location">source-location</link> attribute to
Boolean.TRUE.
+<link idref="features" anchor="source_location">source_location</link> attribute to
true.
You can use the <link idref="commandline">command-line utility</link> -L flag or
the <jump
href="apidocs/javax/xml/transform/TransformerFactory.html#setAttribute(java.lang.String,
java.lang.Object)">TransformerFactory.setAttribute()</jump>
method to set this attribute.</note>
<anchor name="systemid"/>
@@ -235,19 +235,21 @@
<code>systemId(node-set)</code> returns the system ID of the first node in the
node-set.</p>
</s3><anchor name="publicid"/>
<s3 title="publicId">
-<p>Implemented in <jump
href="apidocs/org/apache/xalan/lib/NodeInfo.html">org.apache.xalan.lib.NodeInfo</jump>,<br/>
-<code>publicId()</code> returns the public ID for the current node, and<br/>
-<code>publicId(node-set)</code> returns the public ID of the first node in the
node-set.</p>
+<p><em>To be done.</em> Implemented in <jump
href="apidocs/org/apache/xalan/lib/NodeInfo.html">org.apache.xalan.lib.NodeInfo</jump>,<br/>
+<code>publicId()</code> will return the public ID for the current node, and<br/>
+<code>publicId(node-set)</code> will return the public ID of the first node in the
node-set.</p>
</s3><anchor name="linenumber"/>
<s3 title="lineNumber">
<p>Implemented in <jump
href="apidocs/org/apache/xalan/lib/NodeInfo.html">org.apache.xalan.lib.NodeInfo</jump>,<br/>
<code>lineNumber()</code> returns the line number in the source document for the
current node, and<br/>
<code>lineNumber(node-set)</code> returns the line number in the source document
for the first node in the node-set.</p>
+<note>This function returns -1 if the line number is not known (for example, the
source is a DOM Document).</note>
</s3><anchor name="columnnumber"/>
<s3 title="columnNumber">
<p>Implemented in <jump
href="apidocs/org/apache/xalan/lib/NodeInfo.html">org.apache.xalan.lib.NodeInfo</jump>,<br/>
<code>columnNumber()</code> returns the column number in the source document for
the current node, and<br/>
<code>columnNumber(node-set)</code> returns the column number in the source
document for the first node in the node-set.</p>
+<note>This function returns -1 if the column number is not known (for example, the
source is a DOM Document).</note>
</s3></s2><anchor name="sql"/>
<s2 title= "SQL library">
<note>For UML Diagrams of the SQL Library, see <jump
href="http://xml.apache.org/xalan-j/Xalan-SQL-Extension/DiagramIndex.html">SQL Library
UML Diagrams</jump>.</note>
1.3 +86 -20 xml-xalan/java/xdocs/sources/xalan/features.xml
Index: features.xml
===================================================================
RCS file: /home/cvs/xml-xalan/java/xdocs/sources/xalan/features.xml,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- features.xml 30 Jan 2002 22:23:12 -0000 1.2
+++ features.xml 31 Jan 2002 15:55:22 -0000 1.3
@@ -1,5 +1,61 @@
<?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="Transform Features">
<p>Transform features are identified by URI Strings and fall into the following
categories:</p>
<ul>
@@ -103,10 +159,10 @@
<p>For a example that uses this feature, see <link idref="samples"
anchor="sax2sax">SAX2SAX</link>.</p>
</s3><anchor name="saxtransformerfactory"/>
<s3 title='"http://javax.xml.transform.sax.SAXTransformerFactory/feature"'>
-<p>The implementation provides a <jump
href="apidocs/javax/xml/transform/sax/SAXTransformerFactory.html">SAXTransformerFactory</jump>.
You may safely cast
-the TransformerFactory returned by TransformerFactory.newInstance() to a
SAXTransformerFactory.</p>
-<p>To determine whether your implementation supports this feature (&xslt4j; does),
you can use the static SAXTransformerFactory.FEATURE variable
-(equivalent to the URI String above) as follows:</p>
+<p>The implementation provides a <jump
href="apidocs/javax/xml/transform/sax/SAXTransformerFactory.html">SAXTransformerFactory</jump>.
+You may safely cast the TransformerFactory returned by
TransformerFactory.newInstance() to a SAXTransformerFactory.</p>
+<p>To determine whether your implementation supports this feature (&xslt4j; does),
you can use the static SAXTransformerFactory.FEATURE
+variable (equivalent to the URI String above) as follows:</p>
<source>import javax.xml.transform.TransformerFactory;
import javax.xml.sax.SAXTransformerFactory;
..
@@ -118,9 +174,11 @@
<p>For a example that uses this feature, see <link idref="samples"
anchor="sax2sax">SAX2SAX</link>.</p>
</s3><anchor name="xmlfilter"/>
<s3
title='"http://javax.xml.transform.sax.SAXTransformerFactory/feature/xmlfilter"'>
-<p>The implementation supports the use of <jump
href="apidocs/org/xml/sax/XMLFilter.html">XMLFilter</jump> to use the output of one
transformation as input for another transformation. The SAXTransformerFactory
newXMLFilter(Source) and newXMLFilter(Templates) methods
+<p>The implementation supports the use of <jump
href="apidocs/org/xml/sax/XMLFilter.html">XMLFilter</jump> to use the output of one
+transformation as input for another transformation. The SAXTransformerFactory
newXMLFilter(Source) and newXMLFilter(Templates) methods
are supported.</p>
-<p>To determine whether your implementation supports this feature (&xslt4j; does),
you can use the static SAXTransformerFactory.FEATURE_XMLFilter variable (equivalent to
the URI String above) as follows:</p>
+<p>To determine whether your implementation supports this feature (&xslt4j; does),
you can use the static
+SAXTransformerFactory.FEATURE_XMLFilter variable (equivalent to the URI String
above) as follows:</p>
<source>import javax.xml.transform.TransformerFactory;
import javax.xml.sax.SAXTransformerFactory;
..
@@ -138,13 +196,17 @@
<ul>
<li><link anchor="optimize">"http://apache.org/xalan/features/optimize"</link></li>
<li><link
anchor="incremental">"http://apache.org/xalan/features/incremental"</link></li>
-<li><link
anchor="source-location">"http://apache.org/xalan/features/source-location"</link></li>
+<li><link
anchor="source_location">"http://apache.org/xalan/features/source_location"</link></li>
</ul>
<p>To get an attribute setting, use the TransformerFactory.getAttribute(String)
method, which returns an Object. For these three &xslt4j;
-attributes, you can cast the return value to a boolean. To set an attribute, use
the TransformerFactory.setAttribute(String, Object) method. For the String argument,
provide the static String variable or literal URI String as detailed below. For the
Object argument, use Boolean.TRUE or Boolean.FALSE.</p><anchor name="optimize"/>
+attributes, you can cast the return value to a boolean. To set an attribute, use
the TransformerFactory.setAttribute(String, Object) method.
+For the String argument, provide the static String variable or literal URI String
as detailed below. For the Object argument, use
+Boolean.TRUE or Boolean.FALSE.</p><anchor name="optimize"/>
<s3 title='"http://apache.org/xalan/features/optimize"'>
-<p>Optimize stylesheet processing. By default, this attribute is on. You may need
to turn it off for tooling applications. For more information, see <link idref="dtm"
anchor="optimize">optimize</link>.</p>
-<p>To turn optimization off, you can use the
TransformerFactoryImpl.FEATURE_OPTIMIZE static variable (equivalent to the URI String
above) as follows:</p>
+<p>Optimize stylesheet processing. By default, this attribute is set to true. You
may need to set it to false for tooling applications.
+For more information, see <link idref="dtm" anchor="optimize">optimize</link>.</p>
+<p>To turn optimization off, you can use the
TransformerFactoryImpl.FEATURE_OPTIMIZE static variable (equivalent to the URI String
above)
+as follows:</p>
<source>import javax.xml.transform.TransformerFactory;
import org.apache.xalan.processor.TransformerFactoryImpl;
..
@@ -155,7 +217,9 @@
}</source>
</s3><anchor name="incremental"/>
<s3 title='"http://apache.org/xalan/features/incremental"'>
-<p>Produce output incrementally, rather than waiting to finish parsing the input
before generating any output. By default this attribute is off. You can turn this
attribute on to transform large documents where the stylesheet structure is optimized
to execute individual templates without having to parse scattered sections of the
document. For more information, see <link idref="dtm"
anchor="incremental">incremental</link>.</p>
+<p>Produce output incrementally, rather than waiting to finish parsing the input
before generating any output. By default this attribute is set
+to false. You can turn this attribute on to transform large documents where the
stylesheet structure is optimized to execute individual templates
+without having to parse the entire document. For more information, see <link
idref="dtm" anchor="incremental">incremental</link>.</p>
<p>To turn incremental transformations on, you can use the
TransformerFactoryImpl.FEATURE_INCREMENTAL static variable (equivalent to the URI
String above) as follows:</p>
<source>import javax.xml.transform.TransformerFactory;
import org.apache.xalan.processor.TransformerFactoryImpl;
@@ -165,15 +229,17 @@
tFact.setAttribute(TransformerFactoryImpl.FEATURE_INCREMENTAL,
Boolean.FALSE);
}</source>
-</s3><anchor name="source-location"/>
-<s3 title='"http://apache.org/xalan/features/source-location"'>
-<p>Provide a <jump
href="apidocs/javax/xml/transform/SourceLocator.html">SourceLocator</jump> that can be
used from within a stylesheet,
-programatically, or in the command-line utility to obtain the location in a source
document (system ID, public ID, line number, and column number)
-of individual nodes.</p>
-<p>By default, this attribute is off. The <link idref="commandline">command-line
utility</link> -L flag sets this attribute to Boolean.TRUE.
-You must set this attribute to Boolean.TRUE if you want to use the <link
idref="extensionslib" anchor="nodeinfo">NodeInfo</link> extension
-functions.</p>
-<p>To set the source-location attribute, you can use the
TransformerFactoryImpl.FEATURE_SOURCE_LOCATION static variable (equivalent to the URI
String above) as follows:</p>
+</s3><anchor name="source_location"/>
+<s3 title='"http://apache.org/xalan/features/source_location"'>
+<p>Provide a <jump
href="apidocs/javax/xml/transform/SourceLocator.html">SourceLocator</jump> that can be
used during a transformation
+to obtain the location of individual nodes in a source document (system ID, line
number, and column number).</p>
+<p>By default, this attribute is set to false. Setting this attribute to true
involves a substantial increase in storage cost per source
+document node. If you want to use the <link idref="extensionslib"
anchor="nodeinfo">NodeInfo</link> extension functions (or some other mechanism)
+to provide this information during a transform, you must set the attribute to true
before generating the Transformer and processing the
+stylesheet.</p>
+<p>The <link idref="commandline">command-line utility</link> -L flag sets this
attribute to true. To set the source_location attribute
+programmatically, you can use the TransformerFactoryImpl.FEATURE_SOURCE_LOCATION
static variable (equivalent to the URI String above)
+as follows:</p>
<source>import javax.xml.transform.TransformerFactory;
import org.apache.xalan.transformer.TransformerImpl;
import org.apache.xalan.transformer.XalanProperties;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]