[Schematron] Java extensions to XSLT

Rick Jelliffe rjelliffe at allette.com.au
Fri Oct 10 00:11:39 EDT 2008


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