xquery math: functions in oxygen editor
Issues related to W3C XQuery.
-
- Posts: 6
- Joined: Thu Dec 01, 2011 6:44 pm
xquery math: functions in oxygen editor
Post by cmcenearney »
Hi,
Does anyone know how to use math: functions in Editor?
I've got Saxon-EE checked, along with "Enable Xquery 1.1 support" but no luck.
Running XML Editor 12.2, build 2011053115
Many thanks,
Colin
Does anyone know how to use math: functions in Editor?
I've got Saxon-EE checked, along with "Enable Xquery 1.1 support" but no luck.
Running XML Editor 12.2, build 2011053115
Many thanks,
Colin
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: xquery math: functions in oxygen editor
Post by sorin_ristache »
Hello,
Saxon has a limited set of mathematical functions available for XQuery processing. Please look at the following example of using the sin function:
Regards,
Sorin
Saxon has a limited set of mathematical functions available for XQuery processing. Please look at the following example of using the sin function:
Code: Select all
xquery version "1.0";
declare namespace math="http://www.w3.org/2005/xpath-functions/math";
<test>
{math:sin(1)}
</test>
Regards,
Sorin
-
- Posts: 6
- Joined: Thu Dec 01, 2011 6:44 pm
Re: xquery math: functions in oxygen editor
Post by cmcenearney »
Thanks!
I was hoping to use math:pow, so that's too bad, but great to know about this resource.
And I guess creating a function for this is good for my brain anyway.
declare function local:exponentiate
($base as xs:double?, $power as xs:double?) as xs:double?
{
if ($power gt 1)
then $base * (local:exponentiate(($base),($power - 1)))
else $base
};
I was hoping to use math:pow, so that's too bad, but great to know about this resource.
And I guess creating a function for this is good for my brain anyway.
declare function local:exponentiate
($base as xs:double?, $power as xs:double?) as xs:double?
{
if ($power gt 1)
then $base * (local:exponentiate(($base),($power - 1)))
else $base
};
-
- Posts: 1
- Joined: Thu Jan 24, 2013 9:50 pm
Re: xquery math: functions in oxygen editor
For the records : finally with XPath 3.0 the math:pow(x,n) function is supported in Oxygen using the Saxon 9.4 processor, as well as other trig math functions.
You can test it in the XPath toolbar.
http://www.w3.org/TR/xslt-30/
Best Regards,
Andy.
You can test it in the XPath toolbar.
http://www.w3.org/TR/xslt-30/
Best Regards,
Andy.
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service