XSLT
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xsl:output method="xml"/> <xsl:template match="/"> <xsl:variable name="gmt" select="cars/make[1]"/> <xsl:value-of select="$gmt"></xsl:value-of> <BR></BR> <xsl:value-of select="translate(translate($gmt,'Aa',''),'lf','')"></xsl:value-of> </xsl:template> </xsl:stylesheet> |
XML
|
1 2 3 4 5 6 7 8 9 10 11 12 |
<cars> <make geography="Europe">Alfa Romeo</make> <make geography="Europe">Bentley</make> <make geography="North America">Chevrolet</make> <make geography="North America">Dodge</make> <make geography="North America">GMC</make> <make geography="Asia">Honda</make> <make geography="Asia">Isuzu</make> <make geography="?">Quantum</make> </cars> |
html
|
1 2 3 4 5 |
Alfa Romeo Romeo |