xsl-list
[Top] [All Lists]

RE: How to Validate an XSL

2004-03-04 03:33:02
I'm using MS XML.
And XSL is given by user. I have to validate the XSL before applying given XSL 
over an XML.
I load the XSL in a DOM Object.
For that I need validator/API kind of thing. wcihc can tell me before hand 
whether XSL is correct or not.

Regards,
Animesh


-----Original Message-----
From: owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
[mailto:owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com]On Behalf Of 
George
Cristian Bina
Sent: Thursday, March 04, 2004 3:59 PM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] How to Validate an XSL


Is there an way through which I can validate whether an given XSL is valid
or not programitically.

You should look into the documentation for the XSLT processor you are using.
For instance if you use a JAXP compliant XSLT processor then you can just
create a Transformer from your stylesheet. If this succeeds then it is
valid, otherwise you should be able to catch the errors in an ErrorListener
set on the TransformerFactory.

Best Regards,
 George
-------------------------------------------------------------
George Cristian Bina mailto:george(_at_)oxygenxml(_dot_)com
<oXygen/> XML Editor - http://www.oxygenxml.com/



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



<Prev in Thread] Current Thread [Next in Thread>