Subject: RE: substring-after Not Working in apply-templates
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Wed, 6 Oct 2004 16:33:03 +0100
|
> <xsl:apply-templates select="substring-after(@rdf:about,'#')">
> </xsl:apply-templates>
You can only apply templates to nodes, and substring-after produces a
string, not a node.
>
> Can anyone guide me how can I write the result of this
> substring-after thing into an XML file.
Use xsl:value-of
>
> Btw, I tried using following code:
> <xsl:for-each select="@rdf:about">
> <xsl:value-of select="substring-after(@about,'#')"/>
> </xsl:for-each>
>
Attributes don't have attributes. Your code is trying to display (part of)
the @about attribute of the @rdf:about attribute, and there isn't one.
Michael Kay
http://www.saxonica.com/
|