xsl-list
[Top] [All Lists]

RE: substring-after Not Working in apply-templates

2004-10-06 08:33:03

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



<Prev in Thread] Current Thread [Next in Thread>