RE: Clarification request for xsl:element

> 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 UTC