W3C home > Mailing lists > Public > public-xml-processing-model-comments@w3.org > October 2008

Re: On the interpretation of match=

From: Josh Matthews <joshmatthews@gmail.com>
Date: Sun, 5 Oct 2008 19:29:52 -0400
Message-ID: <ffee23380810051629n2666d30ctbcd8ee5e70aefd52@mail.gmail.com>
To: "Norman Walsh" <ndw@nwalsh.com>
Cc: public-xml-processing-model-comments@w3.org
On Sun, Oct 5, 2008 at 12:43 PM, Norman Walsh <ndw@nwalsh.com> wrote:

>  <p:rename new-name="foo">
>    <p:with-option name="match" select="/doc/a"/>
>  </p:rename>
> There's some debate on the xproc-dev thread about it, but after
> looking through the XSLT 2.0 spec, I'm pretty confident that it's an
> error.
> I think the shortest argument why is that the BNF for an XSLT 2.0
> Pattern[2] (which we call an XSLTMatchPattern and still need to cite a
> little more carefully) cannot be empty.

You're right, and I reverse my position on this. It matches XSLT semantics
to raise a type error (XD0019) on an empty match pattern (just as XSLT
raises an XTSE0340 on <xsl:template match="" />, though XSLT can obviously
always do it statically).

My reasoning that <p:delete match="" /> is (in the above example,
dynamically) equivalent to <p:delete /> is incorrect - it's not!

Thanks for the clarification.

Josh Matthews
Received on Sunday, 5 October 2008 23:30:27 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:41:08 UTC