Hi Roger,
I recently had to do something similar. I used the ExtensionFunction interface in saxon to define extensions based on java libraries, and was able to call them from XML schema 1.1 assert elements. I was wondering about using "pure xpath" but I could not figure out a way to do the processing I needed to do on input coordinate lists. So saxon extension functions helped me there.
Cheers,
Peter Rushforth
________________________________
From: Costello, Roger L. []
Sent: May 7, 2013 2:02 PM
To:
Subject: [xml-dev] Recommended way to extend Schematron?
Hi Folks,
Suppose my Schematron assertions need to do some math calculations – cosine, sine, tangent, etc.
I am using XPath 2.0 in my Schematron assertions. But XPath 2.0 doesn’t support functions for cosine, sine, tangent, etc.
What is the recommended way to extend Schematron?
/Roger