Subject: Re: problem!! From: "Juliane Harbarth" <jhb@xxxxxxxxxxxxxx> Date: Thu, 25 Feb 1999 10:35:16 -0000 |
A <xsl:stylesheet> clause is supposed to contain some <xsl:template> clauses to describe how certain XML- elements are to be formatted. The <xsl:for-each> clause is something that may occur within a <xsl-template>. See example below for proper nesting Please refer to Microsoft's XSL Reference for details, i.e. http://www.microsoft.com/xml <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl" xmlns="http://www.w3.org/TR/REC-html40" result-ns=""> <xsl:template match="/"> <HTML> <HEAD> <TITLE>Test</TITLE> </HEAD> <BODY> <xsl:apply-templates/> </BODY> </HTML> </xsl:template> <xsl:template match="*"> <xsl:apply-templates/> </xsl:template> <xsl:template match="persons"> <xsl:for-each select="person"> <h1><xsl:value-of select="firstname"/></h1> <h1><xsl:value-of select="lastname"/></h1> </xsl:for-each> </xsl:template> <xsl:template match="textnode()"> <xsl:value-of select="."/> </xsl:template> </xsl:stylesheet> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: problem!!, Bovone Stefano | Thread | R: problem!!, Fabio Gurgone |
RE: Complex XSL Application (I thin, Alberto Gomez Corona | Date | Re: XLink and XSL..., Guy_Murphy |
Month |