ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [DO NOT REPLY: Bug 3132] New: -
Date Wed, 15 Aug 2001 14:21:27 GMT
<style> task unable to resolve external entities when using crimson

PLEASE DO NOT REPLY TO THIS MESSAGE. TO FURTHER COMMENT
ON THE STATUS OF THIS BUG PLEASE FOLLOW THE LINK BELOW
AND USE THE ON-LINE APPLICATION. REPLYING TO THIS MESSAGE
DOES NOT UPDATE THE DATABASE, AND SO YOUR COMMENT WILL
BE LOST SOMEWHERE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3132

*** shadow/3132	Wed Aug 15 07:21:27 2001
--- shadow/3132.tmp.11228	Wed Aug 15 07:21:27 2001
***************
*** 0 ****
--- 1,139 ----
+ +============================================================================+
+ | <style> task unable to resolve external entities when using crimson        |
+ +----------------------------------------------------------------------------+
+ |        Bug #: 3132                        Product: Ant                     |
+ |       Status: NEW                         Version: 1.4Beta1                |
+ |   Resolution:                            Platform: PC                      |
+ |     Severity: Normal                   OS/Version: Windows NT/2K           |
+ |     Priority: Other                     Component: Optional Tasks          |
+ +----------------------------------------------------------------------------+
+ |  Assigned To: ant-dev@jakarta.apache.org                                   |
+ |  Reported By: carnold@houston.rr.com                                       |
+ |      CC list: Cc:                                                          |
+ +----------------------------------------------------------------------------+
+ |          URL: http://home.houston.rr.com/curta/antcrimbug.ZIP              |
+ +============================================================================+
+ |                              DESCRIPTION                                   |
+ When using Xalan to process the <style> command and the source file for the 
+ transform contains an external entity, the build will successfully complete 
+ when Xerces.jar is in the classpath.  However if only Crimson.jar is in the 
+ classpath, the build will fail with an file not found exception.  Since 
+ previous versions of Ant have not distributed xerces.jar, this bug does occur 
+ in most deployments.
+ 
+ Driving Xalan from the command line works successfully with either parser.
+ 
+ The fix to this problem will probably have to occur in the Crimson code base, 
+ but I can only get it to happen within Ant so I'm reporting it here.
+ 
+ http://home.houston.rr.com/curta/antcrimbug.ZIP contains examples files to 
+ demonstrate the problem which also appear later in the messsage.  The problem 
+ is not specific to any relatively recent build of ant, crimson, xerces, or 
+ xalan and still occurs with the current CVS versions of each.
+ 
+ Running the example without Xerces.jar on the classpath:
+ 
+ Buildfile: build.xml
+ 
+ dom1-interfaces:
+      [echo] Xerces is available: false
+      [echo] Crimson is available: true
+     [style] Processing D:\antcrimbug2\wd-dom.xml to D:\antcrimbug2\dom1-
+ interfac
+ es.xml
+     [style] Loading stylesheet D:\antcrimbug2\extract.xsl
+     [style] Failed to process D:\antcrimbug2\wd-dom.xml
+ 
+ BUILD FAILED
+ 
+ javax.xml.transform.TransformerException: java.io.FileNotFoundException: \link-
+ e
+ ntities.xml (The system cannot find the file specified)
+ 
+ ---------------
+ 
+ Running the example with Xerces (and Crimson) on the classpath
+ 
+ Buildfile: build.xml
+ 
+ dom1-interfaces:
+      [echo] Xerces is available: true
+      [echo] Crimson is available: true
+     [style] Processing D:\antcrimbug\wd-dom.xml to D:\antcrimbug\dom1-
+ interfaces
+ .xml
+     [style] Loading stylesheet D:\antcrimbug\extract.xsl
+    [delete] Deleting: D:\antcrimbug\dom1-interfaces.xml
+ 
+ BUILD SUCCESSFUL
+ 
+ -----------------
+ 
+ extract.xsl
+ 
+ <?xml version="1.0" encoding="UTF-8"?>
+ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ 	<xsl:output method="xml" indent="yes"/>
+ 	<xsl:template match="/"/>
+ </xsl:stylesheet>
+ 
+ 
+ ----------------
+ 
+ wd-dom.xml
+ 
+ <?xml version="1.0" encoding="UTF-8"?>
+ <!DOCTYPE spec  [
+ 
+ <!ENTITY % links SYSTEM "link-entities.xml">
+ %links;
+ 
+ ]>
+ 
+ <spec/>
+ 
+ 
+ --------------
+ 
+ link-entities.xml
+ 
+ <!ENTITY javaidl      "http://java.sun.com/products/jdk/preview/docs/ext/idl/">
+ <!ENTITY omg          "http://www.omg.org/">
+ <!ENTITY msidl        "http://premium.microsoft.com/msdn/library/sdkdoc/mi-
+ laref_49v0.htm">
+ <!ENTITY html-3.2     "http://www.w3.org/TR/REC-html32">
+ <!ENTITY html-4.0     "http://www.w3.org/TR/REC-html40">
+ <!ENTITY ecma-262     "http://www.ecma.ch/stand/ecma-262.htm">
+ <!ENTITY 
+ javascript   "http://developer.netscape.com/one/javascript/resources.html">
+ <!ENTITY xml-spec     "http://www.w3.org/TR/REC-xml">
+ <!ENTITY corba        "http://www.omg.org/corba/corbiiop.htm">
+ 
+ 
+ -----------
+ 
+ 
+ build.xml
+ 
+ <?xml version="1.0"?>
+ <project default="dom1-interfaces" basedir=".">
+ 
+ 
+ <target name="dom1-interfaces">
+     <property name="hasXerces" value="false"/>
+     <available classname="org.apache.xerces.parsers.SAXParser" 
+ property="hasXerces"/>
+     <echo message="Xerces is available: ${hasXerces}"/>
+     <property name="hasCrimson" value="false"/>
+     <available classname="org.apache.crimson.parser.XmlReader" 
+ property="hasCrimson"/>
+     <echo message="Crimson is available: ${hasCrimson}"/>
+ 	<style basedir="."
+ 	       in="wd-dom.xml"
+ 	       out="dom1-interfaces.xml"
+ 	       style="extract.xsl"/>
+     <delete file="dom1-interfaces.xml"/>
+ </target>
+ 
+ 
+ </project>

Mime
View raw message