Node identity in XProc 3

I asked about that before, I still would like to know whether the node
identity as defined by the "is" operator is something that should be
preserved in XProc results or is not specified or implementation dependent.


For instance, when I run

<?xml version="1.0" encoding="UTF-8"?>
<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" version="3.0"
     xmlns:c="http://www.w3.org/ns/xproc-step"
     exclude-inline-prefixes="#all">
     <p:input port="source">
         <root>
             <test>foo</test>
         </root>
     </p:input>
     <p:output port="result"/>
     <p:xquery>
         <p:with-input port="query">
             <c:query>[., .]</c:query>
         </p:with-input>
     </p:xquery>
     <p:identity message="{?1 is ?2} {deep-equal(?1, ?2)}"/>
</p:declare-step>

with Saxon 10 EE and MorganaXProc-IIIse 0.9.3.7-beta the output from the
message of the p:identity step is

false true

so the node identity is not preserved, the two document nodes in the
array are identical in terms of the "is" operator.

Based on my XQuery understanding I would the XQuery code used, i.e.

   [., .]

to populate an array of two identical document nodes.

I am not sure whether that is supposed to be preserved when the array is
the result of a p:xquery step.

Thoughts?

Received on Wednesday, 8 July 2020 11:38:40 UTC