You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2008/05/15 19:04:16 UTC
DO NOT REPLY [Bug 45011] New: Add stronger recommendation to use
XALAN with XSLT task for Sun JDK 1.5+
https://issues.apache.org/bugzilla/show_bug.cgi?id=45011
Summary: Add stronger recommendation to use XALAN with XSLT task
for Sun JDK 1.5+
Product: Ant
Version: 1.7.0
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Core tasks
AssignedTo: notifications@ant.apache.org
ReportedBy: alex-pub.apache-ant@reflexion.net
In the documentation for XSLT task and Library Dependencies, please word more
strongly the recommendation to use Xalan library when using Sun JDK 1.5+.
Can you also mention that out-of-the-box JDK 1.5+ will add excessive namespaces
during identity transformation? It leads to poor resulting documents
readability and in many cases failure to process these documents. I first
encountered this problem trying to transform default web.xml file that comes
with Tomcat. After this transformation the Tomcat would not start at all.
I had spent many hours before finding the real culprit:
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl shipped as
default XSLT transformer in 1.5+.
One other good thing to mention is that you need both xalan.jar and
serializer.jar from the xalan distribution. I mention it here because it was a
source of confusion in discussion of workaround for bug 43981.
My current environment:
OS : Fedora-Core linux: kernel-2.6.23.1-42.fc8
Java: Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
Ant: 1.7.0
Xalan: 2.7.1
Attached are build.xml, test-style.xslt and test.xml that should be copied into
the same directory in order to reproduce this problem:
Below is the output of identity transformation example:
Here is an original test.xml document:
<?xml version = "1.0" encoding = "UTF-8" ?>
<test xmlns="urn:test">
<element1>
<with-text>text</with-text>
</element1>
<element2>
<with-text>text</with-text>
</element2>
</test>
After XSLT identity transformation:
<?xml version="1.0" encoding="UTF-8"?><ns0:test xmlns:ns0="urn:test"
xmlns="urn:test">
<ns1:element1 xmlns:ns1="urn:test">
<ns2:with-text xmlns:ns2="urn:test">text</ns2:with-text>
</ns1:element1>
<ns3:element2 xmlns:ns3="urn:test">
<ns4:with-text xmlns:ns4="urn:test">text</ns4:with-text>
</ns3:element2>
</ns0:test>
Now XSLT transformation after you add xalan.jar and serializer.jar from the
Xalan-J distribution to ${ANT_HOME}/lib
<?xml version="1.0" encoding="UTF-8"?><test xmlns="urn:test">
<element1>
<with-text>text</with-text>
</element1>
<element2>
<with-text>text</with-text>
</element2>
</test>
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 45011] Add stronger recommendation to use XALAN
with XSLT task for Sun JDK 1.5+
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45011
--- Comment #5 from Jesse Glick <jg...@netbeans.org> 2009-08-18 10:13:06 PDT ---
The reporter should file an issue on bugs.sun.com to get the problem fixed at
the source. BTW the simpler identity transformation
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
works fine.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 45011] Add stronger recommendation to use XALAN
with XSLT task for Sun JDK 1.5+
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45011
Stefan Bodewig <bo...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
Target Milestone|--- |1.8.0
--- Comment #4 from Stefan Bodewig <bo...@apache.org> 2009-08-18 04:45:36 PDT ---
svn revision 805374
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 45011] Add stronger recommendation to use XALAN
with XSLT task for Sun JDK 1.5+
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45011
Stefan Bodewig <bo...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
Component|Core tasks |Documentation
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 45011] Add stronger recommendation to use XALAN
with XSLT task for Sun JDK 1.5+
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45011
Alexander Pogrebnyak <al...@reflexion.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #21971|build file |build.xml
description| |
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 45011] Add stronger recommendation to use XALAN
with XSLT task for Sun JDK 1.5+
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45011
Alexander Pogrebnyak <al...@reflexion.net> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |alex-pub.apache-
| |ant@reflexion.net
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 45011] Add stronger recommendation to use XALAN
with XSLT task for Sun JDK 1.5+
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45011
--- Comment #3 from Alexander Pogrebnyak <al...@reflexion.net> 2008-05-15 10:10:40 PST ---
Created an attachment (id=21973)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=21973)
test-style.xslt
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 45011] Add stronger recommendation to use XALAN
with XSLT task for Sun JDK 1.5+
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45011
--- Comment #1 from Alexander Pogrebnyak <al...@reflexion.net> 2008-05-15 10:08:32 PST ---
Created an attachment (id=21971)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=21971)
build file
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 45011] Add stronger recommendation to use XALAN
with XSLT task for Sun JDK 1.5+
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45011
--- Comment #2 from Alexander Pogrebnyak <al...@reflexion.net> 2008-05-15 10:10:08 PST ---
Created an attachment (id=21972)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=21972)
test.xml
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.