This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: How is this part of the XSLT specification to be interpreted?
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: RE: How is this part of the XSLT specification to be interpreted?
- From: Linda van den Brink <lvdbrink at baan dot nl>
- Date: Tue, 20 Jun 2000 15:08:13 +0200
- Reply-To: xsl-list at mulberrytech dot com
It means that you cannot do this
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="p[list]" someattribute="">
<xsl:apply-templates/>
</xsl:template>
Because the someattribute attribute is not part of XSLT but it is in the
null namespace (the namespace with no prefix).
But you CAN do this
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:linda="http://www.twinnity.com">
<xsl:template match="p[list]" linda:someattribute="">
<xsl:apply-templates/>
</xsl:template>
Because the someattribute attribute, while it's not an XSLT attribute, is
also not in the null namespace, but in the linda namespace. XT doesn't
reject this, nor does saxon I expect.
Linda
> -----Original Message-----
> From: Thorbjørn Ravn Andersen [mailto:TRA@stibo.dk]
> Sent: Tuesday, June 20, 2000 2:24 PM
> To: XSL-List (E-mail)
> Subject: How is this part of the XSLT specification to be interpreted?
>
>
>
> I am looking at how to make XSL documents self-documenting,
> and I fell over section 2.1 in the specification
>
> "An element from the XSLT namespace may have any attribute
> not from the XSLT namespace, provided that the expanded-name
> of the attribute has a non-null namespace URI. The presence
> of such attributes must not change the behavior of XSLT
> elements and functions defined in this document. Thus, an
> XSLT processor is always free to ignore such attributes, and
> must ignore such attributes without giving an error if it
> does not recognize the namespace URI. Such attributes can
> provide, for example, unique identifiers, optimization hints,
> or documentation."
>
> My current experience with XT and Saxon is that they complain
> fiercely if an incorrect attribute is used. How is the text
> above to be interpreted?
>
> --
> Thorbjørn Ravn Andersen "... plus ... Tubular Bells!"
> Stibo lokalnr 1212
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list