Search code examples
xmlinsertxquerysaxonxquery-update

INSERT queries in Saxon api


Does Saxon xqj api support issuing insert queries? If No, Is there any academic article discussing this? and what alternative should be used? If Yes, is there any code example for doing so?

Any answer would be highly appreciated.


Solution

  • XQJ isn't designed for updating queries, so support for them would always be implementation-dependent. In this thread from three years ago, Saxon's author Michael Kay wrote that he wouldn't want to do that, so it isn't likely that it's supported now.

    If you're OK with using the Saxon-specific S9API (which supports updates), you need the non-free Saxon-EE version, as the others don't provide XQuery Update at all.