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

Can message expression of p:identity access items flowing through if it is a sequence of items and not a single item?

From: Martin Honnen <martin.honnen@gmx.de>
Date: Thu, 8 Jul 2021 15:53:32 +0200
To: xproc-dev@w3.org
Message-ID: <4f5e6f9a-c52a-c932-0d84-426225b79052@gmx.de>


I haven't been doing any XProc 3 for a while and I am currently
struggling to find a way to check I get the wanted output out of a step;
I thought I could do that by adding a step p:identity with a message e.g.

   <p:identity message="{. instance of array(*)}"/>

This works if a single item flows through but as soon as I have a
sequence of items flowing through I get an error that the context item
is needed but not provided.

So I thought I could use a collection with <p:identity collection="true"
message="{every $item in collection() satisfies $item instance of
array(*)}"/> but collection as an attribute doesn't seem to be allowed
on p:identity.

Is the only way I have to debug what goes through the p:identity to
precede my p:identity with a variable

     <p:variable name="result" collection="true" select="collection()"/>
     <p:identity message="{every $item in $result satisfies $item
instance of array(*)}"/>

Received on Thursday, 8 July 2021 14:00:50 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 8 July 2021 14:01:17 UTC