- From: Erik Siegel <erik@xatapult.nl>
- Date: Thu, 8 Jul 2021 16:51:56 +0200
- To: "'Martin Honnen'" <martin.honnen@gmx.de>, <xproc-dev@w3.org>
Hi Martin, Interesting edge case, but I think your findings and the ingenious solution are correct. Something for XProc Vnext...? Erik Siegel -----Original Message----- From: Martin Honnen <martin.honnen@gmx.de> Sent: Thursday, 8 July 2021 15:54 To: xproc-dev@w3.org Subject: Can message expression of p:identity access items flowing through if it is a sequence of items and not a single item? Hi, 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:54:33 UTC