This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
This test should not raise XD0008, because variable $value need not be evaluated. The constant string "concat('test-',$value)" is passed to string-replace, This step then interprets the string as an XPath expression according to the section 2.6.2.2 Step XPath Context, which states that the set of in-scope variables is "None, unless otherwise specified by the step", thus The source port of p:string-replace does not admit sequences, and the input to this test is a sequence of three documents. Therefore, this test should expect XD0006. <p:declare-step version="1.0" xmlns:p="http://www.w3.org/ns/xproc"> <p:input port="source" sequence="true" /> <p:output port="result" sequence="true" /> <p:variable name="value" select="/doc/a" /> <p:string-replace match="//doc" replace="concat('test-',$value)" /> </p:declare-step>
I think XD0008 follows from https://www.w3.org/Bugs/Public/show_bug.cgi?id=21015#c1, but I agree that the use of p:string-replace and a sequence of documents is unnecessary and confusing.