XSL stylesheet 1<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform' > |
| <xsl:template match="/"> |
| <xsl:apply-templates select="//BBB"/> |
| <xsl:apply-templates select="//CCC"/> |
| <xsl:apply-templates select="//DDD"/> |
| <xsl:apply-templates select="//AAA"/> |
| </xsl:template> |
| <xsl:template match="AAA"> |
| <DIV style="color:navy"> |
| <xsl:value-of select="name()"/> |
| <xsl:text> id=</xsl:text> |
| <xsl:value-of select="@id"/> |
| </DIV> |
| </xsl:template> |
| <xsl:template match="BBB"> |
| <DIV style="color:purple"> |
| <xsl:value-of select="name()"/> |
| <xsl:text> id=</xsl:text> |
| <xsl:value-of select="@id"/> |
| </DIV> |
| </xsl:template> |
| <xsl:template match="CCC"> |
| <DIV style="color:red"> |
| <xsl:value-of select="name()"/> |
| <xsl:text> id=</xsl:text> |
| <xsl:value-of select="@id"/> |
| </DIV> |
| </xsl:template> |
| <xsl:template match="DDD"> |
| <DIV style="color:blue"> |
| <xsl:value-of select="name()"/> |
| <xsl:text> id=</xsl:text> |
| <xsl:value-of select="@id"/> |
| </DIV> |
| </xsl:template> |
| </xsl:stylesheet> |