Subject: RE: generating text from an attribute From: Charles Cantrell <chc@xxxxxxxxxxx> Date: Tue, 18 Jul 2000 10:43:50 -0500 |
<xsl:template match="CHILD"> <p>My name is <xsl:value-of select="@name">. I am <xsl:value-of select="@age".</p> </xsl:template> Here is the complete stylesheet. <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" > <xsl:template match="/"> <html> <head> <title>People Stuff</title> </head> <body> <xsl:apply-templates select="ROOT"/> </body> </html> </xsl:template> <xsl:template match="ROOT"> <h1>Hello</h1> <xsl:apply-templates select="PARENT"/> </xsl:template> <xsl:template match="PARENT"> <h1>Hello</h1> <xsl:apply-templates select="CHILD"/> </xsl:template> <xsl:template match="CHILD"> <p>My name is <xsl:value-of select="@name"/>. I am <xsl:value-of select="@age"/>.</p> </xsl:template> </xsl:stylesheet> -----Original Message----- From: Foster, Justin (IT_Architecture) [mailto:JFoster@xxxxxxxxxxx] Sent: Monday, July 17, 2000 4:24 PM To: 'xsl-list@xxxxxxxxxxxxxxxx' Subject: generating text from an attribute Here's a newbie question. How do I generate the value of a attribute as text: i.e. <ROOT> <PARENT> <CHILD name="Bob" age="20"/> </PARENT> </ROOT> I want to output to html: <HTML> <HEAD> </HEAD> <BODY> My name is Bob. I am 20 years old.</BODY> </HTML> Justin Foster IT Architecture 253-596-3260 office 253-223-3108 mobile XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: generating text from an attribu, Foster, Justin (IT_A | Thread | Loading an image in XSL, Foster, Justin (IT_A |
MSXML3, Carlos Sanchez | Date | RE: parsing to HTML, Kay Michael |
Month |