Skip to Content
avatar image
Former Member

XML validation-Schematron

Hi All,

I validated a XML document using Schematron validation, but its not throwing any errors if there is any mismatch between source document and validation document.

Source Structure:

OrderStats 1

Order 1...unbounded



id and value are attributes of Order

Validation Code:

<?xml version='1.0'?>">

<title>OrderStats Schema</title>" prefix="ns0"/>

<pattern name="Root">

<rule context="ns0:OrderStats">

<assert test="Order">No Orders</assert>



<pattern name ="Order">

<rule context="Order">

<assert test="@id">No Order id</assert>

<assert test="@val">No Order Value</assert>




I used XSLT mapping, in that i called this Validation template..but if the source document contains wrong tag names or incorrect value it should throw some error..but i am not getting any error based on validation code..

Can anyone suggest some solution for this type of validation



Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Feb 18, 2008 at 09:27 AM

    Hi there,

    as far as I know there is no integrated Schematron validator neither in XI noch in the Netweaver Application Server.

    I'm using an XSLT implementation for schematron: The XSLT programm transforms a schematron schema to an XSLT program, which can validate any XML document according to the schematron schema.

    You can read it in my blog: /people/tobias.trapp/blog/2006/08/22/xml-processing-in-abap-part-8--using-xslt-for-validation .

    Of course there are Schematron Java APIs, for example but I think it is still incomplete.

    I'm using a simple XML editor to create schematron schemas. If you have further questions about tools like Stylus Studio I recommend to ask them on a special mailing list.



    Edited by: Tobias Trapp on Feb 20, 2008 9:40 PM

    Add comment
    10|10000 characters needed characters exceeded