dleslie 00/07/20 10:42:55
Added: xdocs/sources/xalan history.xml
Log:
1st drafts (not complete) for version 1.2.D01
Revision Changes Path
1.1 xml-xalan/xdocs/sources/xalan/history.xml
Index: history.xml
===================================================================
<s3 title="Changes for &xslt4j; version 1.1">
<ul>
<li><link anchor="synch">Updates to stay in synch with &xml4j;</link></li>
<li><link anchor="bugfixes">Bug fixes</link></li>
<li><link anchor="uriattrib">URI attributes in HTML output</link></li>
<li><link anchor="ant0">Ant</link></li>
</ul>
<anchor name="synch"/><s4 title="Updates to stay in synch with &xml4j;">
<p>&xml4j; version 1.0.4 introduced some API changes that caused problems for
&xslt4j; version 1.0.1. The two teams collaborated to bring Xalan-Java and
Xerces-Java back into synch with &xslt4j; version 1.1.D01 (a Developer's
release) and &xml4j; version 1.1.1.</p>
<p>&xml4j-used; replaced java.net.URL with a new URI class to resolve system
IDs for external entities. As a result, &xml4j; no longer accepts OS file path
names for URIs. If, for example you used "c:\foo\bar.xml" to designate a URI in
an earlier release of &xml4j;, you must now use "file:///c:/foo/bar.xml".</p>
<p>We have updated the command-line utility (org.apache.xalan.xslt.Process)
so that it will continue to accept file path names.</p>
<p>When you use the API to instantiate an XSLTInputSource object, you must
use the correct String designation for the URI. For example:<br/><br/>
<code>XSLTInputSource =</code><br/>
<code> new
XSLTInputSource("file:///c:/foo/bar.xml");</code></p>
<p>If you really want you use a file name, you must do something along the
lines of the following code fragment:</p>
<source>
import java.net.URL;
import org.apache.xalan.xslt.*;
...
// Must escape "\" character.
String fileName="c:\\foo\\bar.xml";
// Create a URL object and use it to generate
// a string in the correct URI format.
URL url = new URL(fileName);
String urlIn = url.toExternalForm();
// Now have the correct string for an XSLTInputSource object.
XSLTInputSource = new XSLTInputSource(urlIn);
...</source>
<note>This change has no effect on the creation of an XSLTOutput object. You
can still use a file name. You may also continue to use a file name with the
XSLTProcessor setStylesheet() method.</note>
</s4><anchor name="bugfixes"/><s4 title="Bug fixes">
<p>We have also addressed several bugs found in &xslt4j; version 1.0.1:</p>
<ul>
<li>A function or variable reference on the left-hand-side of a union was
sometimes incorrectly evaluated. This has been fixed. The fix, however,
introduces a new bug that we have not yet fixed: complex XPath expressions
including steps after a union raise an unknown access error and do not return
the correct node-set.<br/><br/></li>
<li>Numbered entity references were sometimes output in hexadecimal, not
decimal. Numbered entity references are now always output in
decimal.<br/><br/></li>
<li>&xslt4j; was not using the xsl:output standalone attribute to place
document standalone declarations in the output. If the standalone attribute is
set to "yes", &xslt4j; now includes a standalone document declaration in the
output. If the standalone attribute is set to "no", &xslt4j; does not place a
standalone document declaration in the output.<br/><br/></li>
<li>xsl:key declarations in imported stylesheets did not work. This has been
fixed.<br/><br/></li>
<li>When the key() function encountered an attribute set to a null string,
key() ignored all subsequent nodes. This has been fixed. <br/><br/></li>
<li>The local-name function now returns the correct string for text and
comment nodes.<br/><br/></li>
<li>We fixed a namespace resolution problem in the XPathAPI eval() method.
XPathAPI provides an API for executing XPath expressions and is included with
the ApplyXPath sample application.</li>
</ul>
</s4><anchor name="uriattrib"/><s4 title="URI attributes in HTML output">
<p>In response to requests, we have added a boolean SpecialEscapeURLs
property to FormatterToHTML and changed the way we output certain characters in
URI attributes (such as HREF) when the output method is HTML.</p>
<p><em>What we did in version 1.0.1:</em> Non-ASCII characters, space, and
double quote("), were output as <code>%hh</code>, where <code>hh</code> is the
hex value of the character. Ampersand (&) was output literally.</p>
<p><em>What we do by default in version 1.1 (the SpecialEscapeURLs is set to
false):</em> Non-ASCII characters are output as <code>&#nnn</code>, where
<code>nnn</code> is the decimal value of the character, and HTML special
characters are output as <code>&xyz;</code>, where <code>xyz</code> is the
named entity for this character (such as &quot; for "). Space is
output as a literal space.</p>
<p><em>What we do in version 1.1 if you set the FormatterToHTML
SpecialEscapeURLs property to true:</em> Non-ASCII characters and space are
output as <code>%hh</code>, where <code>hh</code>is the hex value of the
character, and double quote is output as <code>&quot;</code> (instead of
<code>%22</code>). Ampersand is output as a literal ampersand.</p>
<p>Given our reading of the XSLT and HTML specs, we are not sure this is
appropriate output to support, so we are soliciting feedback from the XSL
community.</p>
<p>Here is code fragment indicating one technique for setting
SpecialEscapeURLs to true.</p>
<source>// Manually set up a FormatterToHTML
OutputFormat format = new OutputFormat( "html", "UTF-8", false );
org.apache.xalan.xpath.xml.FormatterToHTML formatter =
new FormatterToHTML();
formatter.init(writer, format);
// New! Turn on the new special HTML URL attr escaping
formatter.setSpecialEscapeURLs(true);
// Perform the process, using the Formatter as a target
processor.process(new XSLTInputSource(xmlName),
new XSLTInputSource(xslName),
new XSLTResultTarget(formatter));</source>
</s4><anchor name="ant0"/><s4 title="Ant">
<p>We have upgraded support for using Apache Ant to build &xslt4j;. For the
details, see <link anchor="ant">Using Ant</link>.</p>
</s4>
</s3>