Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > validating using XSL + java

Reply
Thread Tools

validating using XSL + java

 
 
Ulf Nordlund
Guest
Posts: n/a
 
      12-30-2004
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
 
Reply With Quote
 
 
 
 
Martin Honnen
Guest
Posts: n/a
 
      12-30-2004


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/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
xsl:sort using an xsl:variable as the sort key jobooker@gmail.com XML 2 09-05-2006 03:51 PM
XSL Question tp xsl:for-each and xsl:variable schaf@2wire.ch XML 1 05-27-2005 09:25 PM
XSL-1000: (Fatal Error) Error while parsing XSL file (org.apache.xerces.parsers.AbstractSAXParser$AttributesProxy) Kevin Flood Java 1 09-13-2004 02:28 PM
XSL-1000: (Fatal Error) Error while parsing XSL file (org.apache.xerces.parsers.AbstractSAXParser$AttributesProxy) Kevin Flood Java 0 09-08-2004 02:11 PM
validating XSL Disco HTML 3 10-17-2003 08:49 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57