RE: [xsl] strange behaviour in Xalan

Subject: RE: [xsl] strange behaviour in Xalan
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Sat, 20 Oct 2001 16:00:14 +0100
> <xsl:template match="boxes">
>     <xsl:copy-of select="*|@*"/>
> </xsl:template>
>
> , which in my eyes can cause problems, if the root-element
> has attributes.

I don't understand why you should think this can cause problems.

> 1. Why is the attribute test="1" not causing an error, but
> will be copied to the new root-element?

You asked for it to be copied by specifying <copy-of select="@*"/>

> 2. Where does '
> xmlns:xml="http://www.w3.org/XML/1998/namespace"; ' come
> from?

That namespace declaration is implicit on every node, but it should never be
output on serialization. (Though I'm not sure if the spec actually prohibits
it).

Mike Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread