By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,934 Members | 1,527 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,934 IT Pros & Developers. It's quick & easy.

validating using XSL + java

P: n/a
I am using an XML schema to check (validate) the structure of an XML
document. But since I cannot check everything I need using a schema, I
am thinking of using XSL for more detailed checks (value comparisons
etc.) in a second step.

Validation using an XML schema is pretty straight forward: I simply
define the schema document when parsing the XML to a DOM model in my
Java code. Any validation problems comes out as exceptions (which I know
how to handle).

But how do I generate exceptions when applying XSL to my document? I.e.
how will I be notified that some conditions (that I defined in the XSL
document) are false? I guess what I need to know is how to use XSL as a
validation tool in a Java application.

Any advice, links etc would be much apprechiated.
/ulf
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a


Ulf Nordlund wrote:

But how do I generate exceptions when applying XSL to my document? I.e.
how will I be notified that some conditions (that I defined in the XSL
document) are false? I guess what I need to know is how to use XSL as a
validation tool in a Java application.


Schematron is a schema language that allows you to make certain
assertions and then check them using an XSLT 1.0 processor:
<http://xml.ascc.net/resource/schematron/schematron.html>
Not sure that is what you are looking for but check that out yourself.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.