I have been getting an error from transformation that is caused by an
invalid file name being processed by document().
<xsl:variable name='doc' value='document("c:/..... ")/>
This statement works as desired if resolver.jar is NOT on the classpath.
However, when resolver.jar is on the classpath, then I get an exception.
[xslt]
resolveURI(C:/java/j2eetck/src/com/sun/ts/tests/ejb/ee/deploy/entity/cmp11/single/ejb_depEcmp11_single_ejb.jar.sun-ejb-jar.xml)
[xslt]
C:/GIROUX/JOnAS/TCK_DD_Porting_Tool/templates/sun2jonas.xslt:40:70: Fatal
Error! java.lang.reflect.InvocationTargetException Cause:
java.lang.reflect.InvocationTargetException
[xslt]
file:/C:/GIROUX/JOnAS/TCK_DD_Porting_Tool/templates/jonas-ejb-jar.xslt:256:49:
Fatal Error! Fatal error during transformation Cause: Fatal error during
transformation
Changing the statement to the following corrects the problem. The URI is
resolved correctly.
<xsl:variable name='doc' value='document("/c:/..... ")/>
[xslt]
resolveURI(/C:/java/j2eetck/src/com/sun/ts/tests/ejb/ee/deploy/entity/cmp11/single/ejb_depEcmp11_single_ejb.jar.sun-ejb-jar.xml)
[xslt] Resolved URI:
/C:/java/j2eetck/src/com/sun/ts/tests/ejb/ee/deploy/entity/cmp11/single/ejb_depEcmp11_single_ejb.jar.sun-ejb-jar.xml
It seems this is a bug in resolver.jar. Since the transform works
correctly if resolver.jar is not on the classpath, then it seems that the
sax parser does recognize windows style absolute path names.
FWIW, the java.lang.reflect.InvocationTargetException did not give a clue
as to what the problem was. I had to run ANT with -verbose to get a stack
trace to discover a message some 80 lines into the trace:
Caused by: javax.xml.transform.TransformerException: Malformed URL
C:/java/j2eetck/src/com/sun/ts/tests/ejb/ee/deploy/entity/cmp11/single/ejb_depEcmp11_single_ejb.jar.sun-ejb-jar.xml(base
file://C:/GIROUX/JOnAS/TCK_DD_Porting_Tool/)
It would have been nice if resolver (or is it the parser) included the
"Malformed URL" information in the console output.
Michael Giroux
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]