|
You could provide your own custom entity resolver so that that the DTD
is not actually accessed at run-time. See: http://xml.apache.org/xalan-j/apidocs/org/xml/sax/EntityResolver.html Chris Raber, Systems Engineer,
AvantGo Inc. http://www.avantgo.com/ -----Original
Message----- You can
turn off the validation in different ways. However, the DTD file has to
exist if it is specified in the DOCTYPE of the source XML file. Even
though xalan does not validate, it will raise exception and quit
if it can not find the DTD file. To turn
off the validation: If you
use SAX parser, you may use
SAXParserFactory.setValidating( false ); or
org.apache.xerces.parsers.SAXParser.setFeature( "http://xml.org/sax/features/validation",
false ); If you
use DOMSource, you may use
DocumentBuilderFactory.setValidating( false ); or
org.apache.xerces.parsers.DOMParser.setFeature( "http://xml.org/sax/features/validation",
false ); Whatever
you use, the DTD file has to exist even if it is empty. cheers, Yueming
Xu Sr.
Consutling Architect Vitria
Technology, Inc. -----
Original Message -----
To: 'Nicholas Waltham'
; [EMAIL PROTECTED] Sent: Thursday, October 04,
2001 6:31 AM Subject: RE:
Prevent Validation agains DTD of input file ?? Sorry, not sure how to do
this from the command line. You can easily do it in
code though: http://xml.apache.org/xerces-j/features.html Also see: http://www.megginson.com/SAX/Java/features.html Regards, -Chris. Chris Raber, Systems Engineer, AvantGo Inc. -----Original Message----- Hello Chris, Thanks very much for your message. Could you tell me how I
do that from the command line? I cannot find it in the manual.. Sorry to bother you again.
Nicholas Waltham -----
Original Message -----
To: 'Nicholas Waltham'
; '[EMAIL PROTECTED]' Sent: Thursday, October 04,
2001 2:23 PM Subject: RE:
Prevent Validation agains DTD of input file ?? Set the
feature http://xml.org/sax/features/validation
to false. Chris Raber,
Systems Engineer, AvantGo Inc. -----Original
Message----- Hello all, java
org.apache.xalan.xslt.Process -in in.xml -xsl style.xsl -out out.xml Obviously its
vital the input XML file is well formed, but I would like to Thanks in
advance, |
Title: RE: Prevent Validation agains DTD of input file ??
- RE: Prevent Validation agains DTD of input file ?? Christopher Raber
- Re: Prevent Validation agains DTD of input file ?? Nicholas Waltham
- RE: Prevent Validation agains DTD of input file ?? Christopher Raber
- Re: Prevent Validation agains DTD of input file ?? Christopher Raber
- Re: Prevent Validation agains DTD of input file ?? Lisa Rupe
