Subject: RE: RE: [xsl] Using a variable as part of the path in value-of select"..." ? From: "Khorasani, Houman" <houman_khorasani@xxxxxxxxxxxxxx> Date: Tue, 30 Aug 2005 16:05:26 +0100 |
Excellent, it is working!!! My attempt was very static but I am still learning. Many Thanks, Houman -----Original Message----- From: cknell@xxxxxxxxxx [mailto:cknell@xxxxxxxxxx] Sent: 30 August 2005 15:55 To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: RE: RE: [xsl] Using a variable as part of the path in value-of select"..." ? How about this approach? <xsl:value-of select="WAAUXServiceData/*[name()=$test]/BTAccountNumber"/> -- Charles Knell cknell@xxxxxxxxxx - email -----Original Message----- From: Khorasani, Houman <houman_khorasani@xxxxxxxxxxxxxx> Sent: Tue, 30 Aug 2005 15:41:37 +0100 To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Subject: RE: [xsl] Using a variable as part of the path in value-of select"..." ? Hi Charles, No this is not the case. You are assuming generating this path: WAAUXServiceData action=add/BtAccountNumber I would like to have this path: WAAUXServiceData/add/BtAccountNumber In other words the value of my attribute shall become the value of an element in the path. Is that possible? Many Thanks Houman -----Original Message----- From: cknell@xxxxxxxxxx [mailto:cknell@xxxxxxxxxx] Sent: 30 August 2005 15:35 To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: RE: [xsl] Using a variable as part of the path in value-of select"..." ? <xsl:value-of select="WAAUXServiceData[@action=$test]/BTAccountNumber"/> -- Charles Knell cknell@xxxxxxxxxx - email -----Original Message----- From: Khorasani, Houman <houman_khorasani@xxxxxxxxxxxxxx> Sent: Tue, 30 Aug 2005 15:27:19 +0100 To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Subject: [xsl] Using a variable as part of the path in value-of select"..." ? Hi, <xsl:variable name="test" select="WAAUXServiceData/@action"/> <xsl:element name="BTAccountNumber"> <xsl:value-of select="WAAUXServiceData/$test/BTAccountNumber"/> </xsl:element> The variable "test" is set to the value of the WAAXServiceData attribute. The "value-of select" should return the value with the value of $test in its path. I assume this won't be possible, since the parser can only go once through the document and doesn't see the generated path in the first roll. Correct? But if it is possible that would save me a lot of time. Any ideas? Many Thanks, Houman
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] Using a variable as part , Khorasani, Houman | Thread | RE: [xsl] Using a variable as part , cknell |
RE: RE: [xsl] Using a variable as p, cknell | Date | Re: [xsl] Roundtripability of ident, David Carlisle |
Month |