OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

ubl message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: The use of Schematron in UBL value validation


Hello all,

I was asked in last night's teleconference to demonstrate how 
Schematron can be used for value validation of UBL instances.

I've uploaded a ZIP of MSDOS invocations from a command line 
illustrating (1) the transformation of a set of assertions into an 
XSLT stylesheet, (2) the running of that stylesheet with a valid 
instance resulting in no output messages, and (3) the running of that 
stylesheet with an invalid instance:

   http://www.oasis-open.org/committees/download.php/14155/codelist-schematron-demo-20050823-1610z.zip

Each step uses a batch file that you can create to run any XSLT 
processor; this is how the batch file is invoked:

       xslt  input-file  stylesheet-file  output-file

Here is the resulting output using Schematron 1.5:

===8<---
:\test>test

t:\test>rem  Transform the list of assertions into an XSLT stylesheet

t:\test>call xslt test.sch schematron1-5.xsl currency.xsl

t:\test>rem  Check the good instance by using the synthesized stylesheet

t:\test>call xslt test.xml currency.xsl test.txt

t:\test>type test.txt
<?xml version="1.0" encoding="utf-8"?>
t:\test>rem  Check the faulty instance by using the synthesized stylesheet

t:\test>call xslt testbad.xml currency.xsl testbad.txt

t:\test>type testbad.txt
<?xml version="1.0" encoding="utf-8"?>Currency value " XYZ " not in 
list of acce
ptable values
t:\test>
===8<---

I'm going to try and find a copy of ISO Schematron for a future test, 
but for now all I have at hand is version 1.5.

Except for the batch file being replaced with a shell script, the 
files are platform independent.  To run these in a Linux environment, 
just change the invocation of the XSLT processor.

I hope this helps.

. . . . . . Ken

--
World-wide on-site corporate, govt. & user group XML/XSL training.
G. Ken Holman                 mailto:gkholman@CraneSoftwrights.com
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/o/
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
Male Cancer Awareness Aug'05  http://www.CraneSoftwrights.com/o/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]