[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: Template Question


Subject: RE: Template Question
From: "Selva, Francis" <Francis.Selva@xxxxxxxxxxxxxxx>
Date: Thu, 27 Apr 2000 15:26:08 -0700


 
> The reason this isn't working for you--
> 
> ><xsl:template name="Chap3">
> ><Chap3Text><xsl:value-of select="."/></Chap3text><BR>
> ></xsl:template>
> 
> is that the template is copying into your result tree the 
> string value of
> the node matched ... which is to say, all its text content, 
> but providing
> special handling for none of the elements below it in the hierarchy.
> 
> Turn it and the others into
> 
> <xsl:template name="Chap3">
> <Chap3Text><xsl:apply-templates/></Chap3text><BR>
> </xsl:template>
> 
> and you should be in business.
> 
> All your HL elements will be changed into B elements by your rule,
> 
> ><xsl:template match="HL">
> ><B><xsl:value-of select="."/></B>
> ></xsl:template>
> 
> although once again this will not provide for processing of 
> any descendant
> elements of HL. Change this one to <xsl:apply-templates/>, 
> too, if you want
> to support that.
> 
 
> 
> Try it out and see if the lights go on ... most new users of 
> XSL have to
> have an "aha!" or two. Hoping that helps,
> 
> Wendell Piez
 
 
Im one of those who said *aha*.lol.That was really helpful wendell.

Thanx
Francis


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread
Keywords
xsl