XSLT Built-in Template Rules for attributes
- by Martin Smith
I'm sure that this is an extremely basic question but here goes anyway! I have read that the built in template rule for text and attribute nodes in XSLT is
<xsl:template match="text()|@*">
<xsl:value-of select="."/>
</xsl:template>
However for the source document
<?xml version="1.0"?>
<booker>
<award>
<author blah="test">Aravind Adiga</author>
<title>The White Tiger</title>
<year>2008</year>
</award>
</booker>
And XSLT
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
</xsl:stylesheet>
I get the following output applying the transform in Visual Studio. Can someone please explain why I don't see "test" in the output?
Aravind Adiga
The White Tiger
2008