Subject: Re: [xsl] getting an attribute value through <apply-templates/> From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx> Date: Mon, 10 Jun 2002 15:38:35 +0100 |
Hi Michael, > For some reason, I still cant get the ID? Here are the xml/xsl > excerpts: [snip] > <xsl:template match="InsClaimsContact"> > <xsl:call-template name="PartyGenInfo"/> > <xsl:call-template name="InjuryDetails"/> > <xsl:call-template name="VehicleInfo"> > <xsl:with-param name="id" select="@id"/> > </xsl:call-template> > </xsl:template> [snip] > <InsClaimsContact Id="1-16HHT"> XML is case sensitive. In your XML, InsClaimsContact's Id attribute has a capital 'I'; in your call to the VehicleInfo template, you're trying to select an id attribute (small i) instead. Try: <xsl:call-template name="VehicleInfo"> <xsl:with-param name="id" select="@Id" /> </xsl:call-template> [I'd use moded templates here instead; do: <xsl:apply-templates select="." mode="VehicleInfo" /> and then have: <xsl:template match="InsClaimsContact" mode="VehicleInfo"> <b>---Vehicle Details---</b> CLAIM ID IS: <xsl:value-of select="@Id"/> </xsl:template> but that's just a personal preference.] Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] getting an attribute valu, David Carlisle | Thread | RE: [xsl] getting an attribute valu, CROFT, MICHAEL |
Re: [xsl] calling java functions fr, Vasu Chakkera | Date | RE: [xsl] calling java functions fr, Vasu Chakkera |
Month |