>> English << | Français | Deutsch | Magyar | 中文 | Polski | ZVON > Tutorials > XSLT Tutorial |
Intro / Search / ZVON |
>> Page 62 << | Prev | Next | Contents | Element Index |
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> |