XQUERY UPDATE with SAXON9 -sa

R

RolfK

Dear ALL,

I'm absolute new to XQUERY and very much interested in the XQuery
Update Facility.
As SAXON9.1 SA is able to process XQuery Update / Insert / Delete ..
I would like to ask for a very tine example.

Usually I call SAXON from commandline.

1) How is commandline to execute an XQERY script ?
I just tried: >>>saxon -sa file.xml file.xquery
But saxon thinks the file.xquery is an xslt

2) Do I have to EMBED xquery in an xslt script ?
I guess I even do not need the xml file on command line as I can use
the doc(..) function

3) Are there some very tiny examples ?
As you see I'm fighting mostly to get started and not with the XQUERY
syntax itself yet

Thanks a lot

Rolf
 
M

Martin Honnen

RolfK said:
I'm absolute new to XQUERY and very much interested in the XQuery
Update Facility.
As SAXON9.1 SA is able to process XQuery Update / Insert / Delete ..
I would like to ask for a very tine example.

Usually I call SAXON from commandline.

1) How is commandline to execute an XQERY script ?
I just tried: >>>saxon -sa file.xml file.xquery
But saxon thinks the file.xquery is an xslt

The documentation here
http://www.saxonica.com/documentation/using-xquery/commandline.html
suggests you use
java net.sf.saxon.Query -s:file.xml -q:file.xquery
where file.xquery is the XQuery file and file.xml the XML source document.

That is for the basic Saxon version I think, so for schema aware
processing you need
java net.sf.saxon.Query -sa -s:file.xml -q:file.xquery

And http://www.saxonica.com/documentation/using-xquery/update.html
suggests that for XQuery update you also need to set the flag -update:eek:n
so you would need
java net.sf.saxon.Query -sa -update:eek:n -s:file.xml -q:file.xquery

I suggest that you ask further Saxon specific questions on the Saxon
help list
http://sourceforge.net/mailarchive/forum.php?forum_name=saxon-help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top