File: Data.xml
<?xml version="1.0"?>
<us>
<state>Alabama</state>
<state>Alaska</state>
<state>Arizona</state>
<state>Arkansas</state>
<state>California</state>
<state>BC</state>
<state>Connecticut</state>
<state>Delaware</state>
<state>Florida</state>
<state>Georgia</state>
<state>Hawaii</state>
<state>Wisconsin</state>
<state>Wyoming</state>
</us>
File: Transform.xslt
<?xml version="1.0" encoding="US-ASCII"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" />
<xsl:template match="us">
<xsl:apply-templates select="state" />
</xsl:template>
<xsl:template match="state">
<xsl:number format=" a.	" />
<xsl:value-of select="." />
<xsl:text> </xsl:text>
</xsl:template>
</xsl:stylesheet>
Output:
a. Alabama
b. Alaska
c. Arizona
d. Arkansas
e. California
f. BC
g. Connecticut
h. Delaware
i. Florida
j. Georgia
k. Hawaii
l. Wisconsin
m. Wyoming
|