Proper set up and usage of XQuery update (Oxygen Author 17.1)
Posted: Mon Mar 06, 2017 12:50 pm
I need to do some minor changes in my XML file and I know the best way to do it is simply the update function. However, I can’t make it working. I use it a lot in my eXist-db app for other cases but here I can’t even start with that.
Is it possible to do it over an actually opened file? Or is it necessary to load the file with the doc() function?
I have checked nearly twenty times there is no such a choice called Enable XQuery 1.1 for Saxon-EE in the Options, which I have read about in the forums. In the XQuery pane I have selected Saxon-EE XQuery.
When I try to use the very basic:
… or any other simple action, it stubbornly throws:
(I don’t know where it comes to the plural nodes but that is marginal.)
I will be very grateful for any hint how to make that working.
Honza Hejzl
Is it possible to do it over an actually opened file? Or is it necessary to load the file with the doc() function?
I have checked nearly twenty times there is no such a choice called Enable XQuery 1.1 for Saxon-EE in the Options, which I have read about in the forums. In the XQuery pane I have selected Saxon-EE XQuery.
When I try to use the very basic:
Code: Select all
declare namespace tei = 'http://www.tei-c.org/ns/1.0';
let $header := tei:TEI//tei:teiHeader
return
update delete node $header
Code: Select all
XPST0003: Unexpected token "rename nodes" beyond end of query
I will be very grateful for any hint how to make that working.
Honza Hejzl