Thanks, David.
The two apply-templates copy the two attributes (through a general
copying template matching "@*|node"). I will replace them with
<xsl:copy-of> or, as you say, just change the order of the elements
inside xsl:copy. 
Just for technical interest: Since the output is fine, xalan seems to
not be able to predict that the result of the two apply-templates will
be just attributes?
Thanks again!
sonja



Am Sonntag, den 09.10.2005, 10:27 -0400 schrieb
[EMAIL PROTECTED]:
> Sonja Löhr <[EMAIL PROTECTED]> writes:
> <xsl:template match="map/area">
>     <xsl:copy>
>         <xsl:apply-templates select="@coords"/>
>         <xsl:apply-templates select="@shape"/>
>         <xsl:attribute name="href">
>             <xsl:value-of select="$country_url"/>etc.
>         </xsl:attribute>
>     </xsl:copy>
> </xsl:template>
> >With each area element I get the following warning:
> >That is: "attribute 'href' is not inside an element"
> 
> The two apply-templates for @coords and @shape must only construct 
> attributes or namespace
> declarations, because nodes of those two types must be constructed within 
> an element before
> any text nodes, comments, child elements, or processing instructions.
> 
> Since the order of the attributes is irrelevant, I suggest putting the 
> xsl:attribute instruction before
> the  two apply-templates. Even so, you should review the templates that 
> would be invoked by the
> two apply-templates to ensure that they finish constructing attributes 
> before the other kinds of
> nodes.
> .................David Marston
-- 
Sonja Löhr <[EMAIL PROTECTED]>

Reply via email to