>> English << | Français | Deutsch | Magyar | 中文 | Polski ZVON > Tutorials > XSLT Tutorial
>> Page 62 << | Prev | Next | Contents | Element Index

The text output method outputs the result tree by outputting the string-value of every text node in the result tree in document order without any escaping. Look at the source in your browser to see the output.

XSLT stylesheet 1

XML Source
<source>

<AAA id="12"/>

</source>

Output
<!ELEMENT AAA ANY><!ATTLIST AAAid ID #REQUIRED>Look at my source in your browser

HTML view
Look at my source in your browser
XSLT stylesheet
<xsl:stylesheet version = '1.0'
     xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>

<xsl:output method="text"/>
<xsl:template match="AAA">
     <xsl:text><!ELEMENT </xsl:text>
     <xsl:value-of select="name()"/>
     <xsl:text> ANY></xsl:text>
     <xsl:text><!ATTLIST </xsl:text>
     <xsl:value-of select="name()"/>
     <xsl:text/>
     <xsl:value-of select="name(@*)"/>
     <xsl:text> ID #REQUIRED></xsl:text>
     <xsl:text>Look at my source in your browser</xsl:text>
</xsl:template>


</xsl:stylesheet>