- From: Kraetke, Martin, le-tex <martin.kraetke@le-tex.de>
- Date: Mon, 1 Feb 2016 17:18:08 +0100
- To: xproc-dev@w3.org
Hi, I get a Saxon undeclared variable error, when I try to use a reference to a variable within a match attribute. So I would like to know if in-scope bindings to variables doesn't apply to steps which include a match attribute? Because variable references work in steps with select attribute, it would be interesting to know the difference between @match and @select. If I missed something in the spec, please let me know. I made a simple example using p:viewport and p:in-scope-names to show the issue. The pipeline fails with: "err:XPST0008:Undeclared variable in XPath expression: $foo". If you replace "$foo" with "'bar'" within matches(), the result of p:in-scope-names will show that the variable is in the scope of p:viewport. Kind regards, Martin <?xml version="1.0" encoding="UTF-8"?> <p:declare-step xmlns:p="http://www.w3.org/ns/xproc" xmlns:c="http://www.w3.org/ns/xproc-step" version="1.0" name="viewport"> <p:input port="source"> <p:inline> <foo>bar</foo> </p:inline> </p:input> <p:output port="result"/> <p:variable name="foo" select="'bar'"/> <p:viewport match="//foo[matches(., $foo)]"> <p:in-scope-names name="in-scope-names"/> <p:identity> <p:input port="source"> <p:pipe port="result" step="in-scope-names"/> </p:input> </p:identity> </p:viewport> </p:declare-step> -- Martin Kraetke Lead Content Engineer le-tex publishing services GmbH Weissenfelser Str. 84, 04229 Leipzig, Germany Phone +49 341 355356 143, Fax +49 341 355356 543 martin.kraetke@le-tex.de, http://www.le-tex.de Registergericht / Commercial Register: Amtsgericht Leipzig Registernummer / Registration Number: HRB 24930 Geschäftsführer: Gerrit Imsieke, Svea Jelonek, Thomas Schmidt, Dr. Reinhard Vöckler
Received on Monday, 1 February 2016 16:18:51 UTC