Subject: RE: [xsl] XML 2 XML using XSL,DTD XALAN - JAVA From: "Andrew Welch" <ajwelch@xxxxxxxxxxxxxxx> Date: Thu, 25 Nov 2004 08:07:29 -0000 |
> Hi, > thanks for the tip. > The only way to validade the result DOM tree is to parse it > again? The XSL that I'm using has the output property below: > <xsl:output method="xml" indent="no" encoding="ISO-8859-1" > doctype-system="../DTD/MyDTD.dtd"/> > > Even with this, the result DOM tree doesn't have a DocType > with it. Does anyone knows why? I tryed to setup the DocType > by code: > Transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM,"MyDTD.dtd"); > > Even with this, the resulting DOM tree doesn't have a DocType wiht it. You will need give some more information: What processor are you using? How are you creating the 'result DOM' - ie a DOMResult? How are you viewing the result to decide that it doesn't contain the doctype? Ultimately the answer is 'yes' that the only XSLT 1.0 way to validate the result is to parse it again. With 2.0 and a schema aware processor (Saxon 8.x) you should be able to provide a result schema and Saxon will flag up (halt or warn... not sure?) at transform time any non-valid output. cheers andrew
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] XML 2 XML using XSL,DTD , Michael Kay | Thread | RE: [xsl] XML 2 XML using XSL,DTD , contest.vix |
RE: [xsl] XML 2 XML using XSL,DTD , Michael Kay | Date | Re: [xsl] Accessing node from diffe, Arulraj |
Month |