|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: XML 2 XML using XSL,DTD XALAN - JAVA
> 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? Because xsl:output only affects the serializer, and when you send your output to a DOM, you are not serializing it. JAXP 1.3 provides a SAX-based validation API. This provides a validator in the form of a ContentHandler, and since JAXP allows you to send the results of a transformation to a ContentHandler, you should be able to pipe transformation results straight into a validator. For a more closely integrated solution (but only with XML Schema) XSLT 2.0 allows you to request validation of a result document directly. I personally find this the most useful aspect of XSLT/Schema integration in XSLT 2.0 - until you get used to it, it comes as quite a surprise to see error messages pointing straight to the line in your stylesheet that generates the incorrect output. Michael Kay http://www.saxonica.com/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








