[Schematron] Java extensions to XSLT
Albertson, Jacob [USA]
albertson_jacob at bah.com
Fri Oct 10 09:20:06 EDT 2008
Hi Rick,
Thanks for your reply. I actually figured it out yesterday (I had a
classpath problem). It was actually quite easy to do and adds a lot of
functionality to Schematron for those few things that you can't do with
XPath. I couldn't find much documentation on the internet about it so if
you were in contact with the tutorial writer at
http://www.dpawson.co.uk/schematron/ I would be willing to write a quick
intro to extending Schematron.
Thanks,
Jacob
-----Original Message-----
From: Rick Jelliffe [mailto:rjelliffe at allette.com.au]
Sent: Friday, October 10, 2008 12:12 AM
To: Albertson, Jacob [USA]
Cc: schematron at eccnet.com
Subject: Re: [Schematron] Java extensions to XSLT
Albertson, Jacob [USA] wrote:
> Is it possible to call external Java functions in Schematron (You
> compile an external class and then call it in XSLT). I have
> successfully done this in an XSLT file and was wondering if it is
> possible in Schematron. For your reference I am using the Saxon 9
> processor.
It should be. I have not tested it, but it is certainly allowed and the
skeleton code should transfer it. (Of course, it then becomes a
non-standard schema, but non-standard never means wrong: the practical
requirements determine whether restricting yourself to the standard is
appropriate or not.)
The trick is to define the package URL using the <sch:ns> element in the
Schematron schema, not using xmlns:xxx.
The <sch:ns> values survive any processing middle steps, whereas XSLT
processor have varying rules and implementations about passing on
xmlns:* values.
Cheers
Rick Jelliffe
More information about the Schematron
mailing list