W3C home > Mailing lists > Public > xsl-editors@w3.org > April to June 2001

RE: Clarification request for xsl:element

From: Michael Kay <mhkay@iclway.co.uk>
Date: Sun, 29 Apr 2001 23:07:48 +0100
To: <David_Marston@lotus.com>, <xsl-editors@w3.org>
Message-ID: <001201c0d109$1f4f3790$d83e3c3e@PCUKMKA>
> Given that, what behavior should result from the XSLT
> template instruction
> <xsl:element name="pref:localpart" namespace="">

In my (personal) view the specification is unambiguous: the prefix is
ignored.

This is on the logic: the syntax allows a prefix, the rules don't say it's
an error, and the semantics of the instruction describe an unambiguous
algorithm that happens in this case to make no use of the value of the
prefix.

Whether this specification is a good one, is another question. One could
argue it should have been made an error.

Similarly, for the same reasons, <xsl:template name="foo" mode="bar"/>
should probably be an error, but currently it isn't: the mode is simply
ignored. Actually there's a stronger reason for making that one an error,
because it is always detectable at compile time.

But where do you stop? Is it an error to declare a variable that isn't used?
Or to write an <xsl:if> instruction with empty content?

Mike Kay
Received on Sunday, 29 April 2001 20:02:17 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 December 2009 10:59:52 GMT