[xquery-talk] Can XQuery Update corrupt documents?
g at 28.io
Fri Jun 10 01:49:14 PDT 2016
I agree with Mike. Also, I noticed that you are declaring your program as
XQuery 3.0. As far as I know, the XQuery Update 3.0 specification is still
a Working Draft ( https://www.w3.org/TR/xquery-update-30/ ). I would advise
proceeding with care if you combine new XQuery 3.0 constructs with updates.
On Fri, Jun 10, 2016 at 10:39 AM, Michael Kay <mike at saxonica.com> wrote:
> I've logged this as a Saxon issue here:
> and you can track progress on it there by registering and doing a "watch"
> (the icon for that in Redmine is a five-pointed star, as anyone would
> I'm afraid my first attempts threw up several different symptoms which may
> or may not turn out to be relevant to the problem that you experienced. As
> I mentioned, XQuery Update doesn't get exercised very much except for
> running the limited W3C test suite and a very small batch of unit tests
> when we make a release.
> Michael Kay
> On 9 Jun 2016, at 23:53, Joe Wicentowski <joewiz at gmail.com> wrote:
> Hi all,
> I'm struggling with an XQuery Update problem which is corrupting the file
> I'm trying to update. I've posted my code samples to
> https://gist.github.com/joewiz/2369367de3babba30e0aad8c9beec893 - but
> here's the core of the issue:
> I'm working with a TEI document containing <ref> elements that I'm trying
> to manipulate with XQuery Update. Specifically, I'm grabbing a page number
> reference from the text node immediately following the <ref> element, and I
> want to move the page number inside the <ref> element. (I'm actually trying
> to do a few more things, but I've reduced the sample code to do just this,
> because it illustrates the problem I'm facing.)
> The problem is that the XQuery Update statement corrupts my file. The
> resulting file has 0 bytes. When I comment out the XQuery Update statement
> and uncomment the $test variable in the return expression, I get expected
> results, so I think the logic is sound. I have a feeling that the problem
> may have to do with line 25, where I add attributes to an element; when I
> comment out this, the corruption doesn't occur. But I need the attributes
> in that line. So I'm stumped. I've never encountered data corruption with
> XQuery Update, so I really hope there's a solution.
> I'm using Saxon-EE XQuery 184.108.40.206 inside of oXygen 17.1, with Saxon's
> options for XQuery 3.0 and XQuery Update enabled.
> Many thanks for any suggestions,
> talk at x-query.com
> talk at x-query.com
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the talk