You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Roman Ivashin <ir...@gehtsoft.com> on 2007/07/06 10:10:21 UTC
Disable loading of DTD in task
Hello all!
I have a XML document with <DOCTYPE> section:
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
When I try process this document with <xslt> task, it fails with ConnectException because
http://java.sun.com/j2ee/dtds/web-app_2_2.dtd is not accessible.
How can I prevent XSLT processor from validating of XML document? Or may be from loading
external DTDs.
I know how to set such features for Xerces, but in <xslt> task I can only specifiy Xalan's features.
Any help is appreciated!
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
RE: Disable loading of DTD in task
Posted by RADEMAKERS Tanguy <Ta...@swift.com>.
Hello Roman,
Use an xmlcatalog:
"An XMLCatalog is a catalog of public resources such as DTDs or entities
that are referenced in an XML document. Catalogs are typically used to
make web references to resources point to a locally cached copy of the
resource."
It is linked to from the <xslt> page in the manual (my version = 1.6.5)
Regs,
/t
>-----Original Message-----
>From: Roman Ivashin [mailto:iri@gehtsoft.com]
>Sent: Friday, July 06, 2007 10:10 AM
>To: user@ant.apache.org
>Subject: Disable loading of DTD in <xslt> task
>
>Hello all!
>
> I have a XML document with <DOCTYPE> section:
> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web
>Application 2.2//EN"
>
>"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
>
> When I try process this document with <xslt> task, it fails
>with ConnectException because
> http://java.sun.com/j2ee/dtds/web-app_2_2.dtd is not accessible.
> How can I prevent XSLT processor from validating of XML
>document? Or may be from loading
> external DTDs.
>
> I know how to set such features for Xerces, but in <xslt>
>task I can only specifiy Xalan's features.
>
> Any help is appreciated!
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org