W3C home > Mailing lists > Public > xproc-dev@w3.org > July 2020

Re: Node identity in XProc 3

From: Martin Honnen <martin.honnen@gmx.de>
Date: Wed, 8 Jul 2020 18:51:38 +0200
To: Achim Berndzen <achim.berndzen@xml-project.com>
Cc: XProc Dev <xproc-dev@w3.org>
Message-ID: <3e3ae5e7-9de4-7152-9548-b25fe08a9ee6@gmx.de>
Am 08.07.2020 um 15:34 schrieb Achim Berndzen:
>> Am 08.07.2020 um 14:38 schrieb Norman Tovey-Walsh <ndw@nwalsh.com>:
>> Martin Honnen <martin.honnen@gmx.de> writes:
>>> I am not sure whether that is supposed to be preserved when the array is
>>> the result of a p:xquery step.
>>> Thoughts?
>> With the possible exception of p:identity (and maybe a couple of other
>> steps), node identity should not be expected.

> I completely agree with Norms analysis.
> If we would stipulate node identity say for the XQuery in question or an equivalent XSLT, this would result in a massive vendor lock: The node model used in the XProc implementation, as well as in p:xquery and p:xslt would need to be the same. Any conversion what so ever will al least threaten node identity, so no conversion could take place.

In Morgana's current implementation, based solely on the result of the
pipeline below, it seems node identity is preserved when Morgana's XProc
XDM is converted to Saxon's XDM for the p:xquery.

Why is that identity preservation not possible when propagating XDM
values from Saxon to Morgana?

Example is

<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="3.0"
     <p:input port="source">
     <p:output port="result" sequence="true"/>
         <p:with-input pipe="source source source source source"/>
     <p:identity message="{every $doc1 in ?* satisfies every $doc2 in ?*
satisfies $doc1 is $doc2} {count(?*)}"/>
         <p:with-input port="query">
             <c:query>. instance of array(document-node()), every $doc1
in ?* satisfies every $doc2 in ?* satisfies $doc1 is $doc2, count(?*),

and outputs


true 5
Using Saxon-EE 10.0. XSLT and XQuery processor developed by Saxonica Limited




So despite a conversion, both in Morgana's XDM and Saxon's XDM there is
an array with five identical document nodes.
Received on Wednesday, 8 July 2020 16:51:52 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 8 July 2020 16:51:53 UTC