saxon:evaluate in XQuery script
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 2
- Joined: Fri Mar 01, 2024 10:31 am
saxon:evaluate in XQuery script
Post by Naoki Hirai »
I'm migrating custom refactoring scripts written with XQuery. Those scripts were developed for Oxygen V20.1 and work fine. When I copied those scripts to the 'refactoring' folder of Oxygen V26.1 and executed one of them. Then, I got following error message:
Cannot find a 1-argument function named Q{http://saxon.sf.net/}evaluate()
I looked into the refactoring scripts bundled with V26.1. As a result, the XPath evaluation statement was modified as follows:
V20.1
V26.1
Does this mean XPath evaluation method was changed due to a particular reason?
Could you please provide me with information regarding this matter?
Thank you inadvance,
Naoki
Cannot find a 1-argument function named Q{http://saxon.sf.net/}evaluate()
I looked into the refactoring scripts bundled with V26.1. As a result, the XPath evaluation statement was modified as follows:
V20.1
Code: Select all
let $elements := saxon:evaluate($element_xpath)
Code: Select all
let $elements := local:eval($element_xpath, (./*)[1])
Could you please provide me with information regarding this matter?
Thank you inadvance,
Naoki
Re: saxon:evaluate in XQuery script
Hi Naoki,
The XQuery scripts are evaluated using the Saxon libraries. At some point we upgraded the Saxon library in Oxygen to version 12.3 and Saxon's developers have decided to remove completely the support for saxon:evaluate. This means we had to adapt our scripts with their own inline implementation of "local:eval" that you already noticed. So I advice you to do the same for your scripts or switch to using XSLT 3.0 which has an <xsl:evaluate> instruction.
In the future from what I've seen Saxon plans to bring back saxon:eval in order to remove this inconvenience so it might be possible a future version of Oxygen will be able to use saxon:eval directly again in the refactoring scripts.
Regards,
Radu
The XQuery scripts are evaluated using the Saxon libraries. At some point we upgraded the Saxon library in Oxygen to version 12.3 and Saxon's developers have decided to remove completely the support for saxon:evaluate. This means we had to adapt our scripts with their own inline implementation of "local:eval" that you already noticed. So I advice you to do the same for your scripts or switch to using XSLT 3.0 which has an <xsl:evaluate> instruction.
In the future from what I've seen Saxon plans to bring back saxon:eval in order to remove this inconvenience so it might be possible a future version of Oxygen will be able to use saxon:eval directly again in the refactoring scripts.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
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