- From: Romain Deltour <rdeltour@gmail.com>
- Date: Mon, 19 Nov 2012 17:59:00 +0100
- To: XProc Dev <xproc-dev@w3.org>
Oh, right. Option and variable names are *expanded* names, so I believe if I have a default namespace the option name will be in this namespace, which is not explicitly declared in the XPath. This works: <?xml version="1.0" encoding="UTF-8"?> <p:declare-step xmlns="http://www.w3.org/1999/xhtml" xmlns:p="http://www.w3.org/ns/xproc" version="1.0"> <p:option name="opt" required="true"/> <p:output port="result"/> <p:variable xmlns="" name="var" select="concat($opt,' ','world')"/> <p:add-attribute match="*" attribute-name="text"> <p:input port="source"> <p:inline> <message/> </p:inline> </p:input> <p:with-option name="attribute-value" select="$var"/> </p:add-attribute> </p:declare-step> This is still weird since the option is in the HTML namespace but the variable isn't… Romain. On 19 nov. 2012, at 17:50, Romain Deltour <rdeltour@gmail.com> wrote: >> when you put $opt and $var in the xhtml namespace? > > What do you mean ? > > Romain. > > On 19 nov. 2012, at 17:13, Geert Josten <geert.josten@dayon.nl> wrote: > >> Hmm, interesting. What happens when you put $opt and $var in the xhtml >> namespace? :) >> >>> -----Oorspronkelijk bericht----- >>> Van: Romain Deltour [mailto:rdeltour@gmail.com] >>> Verzonden: maandag 19 november 2012 16:08 >>> Aan: XProc Dev >>> Onderwerp: XPath evaluation - bug in Calabash? >>> >>> The following XProc pipeline raises an err:XD0023 with Calabash: >>> >>> <?xml version="1.0" encoding="UTF-8"?> >>> <p:declare-step xmlns="http://www.w3.org/1999/xhtml" >>> xmlns:p="http://www.w3.org/ns/xproc" version="1.0"> >>> >>> <p:option name="opt" required="true"/> >>> <p:output port="result"/> >>> >>> <p:variable name="var" select="concat($opt,' ','world')"/> >>> >>> <p:add-attribute match="*" attribute-name="text"> >>> <p:input port="source"> >>> <p:inline> >>> <message/> >>> </p:inline> >>> </p:input> >>> <p:with-option name="attribute-value" select="$var"/> >>> </p:add-attribute> >>> >>> </p:declare-step> >>> >>> >>> Weirdly enough, it works when I remove the default namespace. I suspect >> it's a >>> bug, but maybe I'm missing the obvious. Any idea ? >>> >>> Thanks, >>> Romain. >
Received on Monday, 19 November 2012 16:59:35 UTC