validating using XSL + java

Discussion in 'XML' started by Ulf Nordlund, Dec 30, 2004.

  1. Ulf Nordlund

    Ulf Nordlund Guest

    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
     
    Ulf Nordlund, Dec 30, 2004
    #1
    1. Advertising

  2. 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/
     
    Martin Honnen, Dec 30, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kevin Flood
    Replies:
    0
    Views:
    1,052
    Kevin Flood
    Sep 8, 2004
  2. Kevin Flood
    Replies:
    1
    Views:
    2,812
    Kevin Flood
    Sep 13, 2004
  3. Disco

    validating XSL

    Disco, Oct 17, 2003, in forum: HTML
    Replies:
    3
    Views:
    2,878
    Micah Cowan
    Oct 17, 2003
  4. Replies:
    1
    Views:
    3,688
    A. Bolmarcich
    May 27, 2005
  5. Replies:
    2
    Views:
    9,354
    Martin Honnen
    Sep 5, 2006
Loading...

Share This Page