Matt MacDonald wrote:
Notice the URI: 'jar://resources/psdp.dtd'

When I try to use the ant:xslt task to apply a stylesheet to this XML document I get the following error:

Fatal Error! java.net.MalformedURLException: no !/ in spec Cause: java.net.MalformedURLException: no !/ in spec

I know the URI in the doctype is not a valid Java URL so how do I set the XML parser in Ant to be non-validating?

The XML parser used by the XSLT task is by default non-validating. However, even non-validating parsers may read the DTD, for resolving entities. There is no standardized option to control this behaviour. Note that the URL jar://resources/psdp.dtd is not a valid URL for the Java run time library, which is commonly used for resolving the URL. A valid Jar URL would be jar:file:///foo/bar.jar!/ressources/psdp.dtd Your best bet is to remove the DOCTYE decl before processing completely, unless you actually use entities defined in the DTD. In this case, you'll probably have to edit the URL to a valid URL, or use the catalog. Actually, some XML parsers use the catalog for resolving SYSTEM ids as well, however, they may require the URL to be valid (for the RTL) anyway.

J.Pietschmann



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to