[Home] [By Thread] [By Date] [Recent Entries]

  • From: Rick Jelliffe <rjelliffe@a...>
  • To: "Roger L. Costello" <costello@m...>
  • Date: Thu, 16 May 2013 14:34:17 +1000

People have indeed used the extension functions that vendors provide (such as functions in java: namespace)

I have seen people write xslt functions and embed them.

The cleanest way is to use a simple web service. E.g
   document(" http://localhost/maths?get-sin=0.6")
returning a single element with the result. More appealing if the calculations are complex or cacheable of course. That is cross platform.

For assertion purposes, it may be that rather than testing
sin(X) > 0.5 
it might better to test with arcsin 0.5
X > -30 and X < 30
or whatever. Do the lookup at coding time.

cheers
Rick

On May 8, 2013 4:02 AM, "Costello, Roger L." <costello@m...> wrote:

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



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


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member