<?xml version="1.0" encoding="Shift_JIS"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> <xsl:template match="/"> <html> <head> <title>選んで表示するXML</title> </head> <body> <p align="center">私のプロフィール</p> <xsl:apply-templates select="プロフィール" /> </body> </html> </xsl:template> <xsl:template match="プロフィール"> <P>名前:<xsl:value-of select="姓" /><xsl:value-of select="名" /></P> <P>すきな川:<xsl:value-of select="すきな川" /></P> </xsl:template> </xsl:stylesheet> |
<xsl:apply-templates select="プロフィール" /> |
<xsl:value-of select="姓" /> |