|
Subject: RE: [xsl] Need assistance with a match string From: cknell@xxxxxxxxxx Date: Tue, 10 Jan 2006 16:36:27 -0500 |
Loose the attribute value template and the quotes in your XPath.
<xsl:value-of select="//*[@eid='{$linkId}']/title"/>
becomes
<xsl:value-of select="//*[@eid=$linkId]/title"/>
--
Charles Knell
cknell@xxxxxxxxxx - email
-----Original Message-----
From: Cindy Hunt <Cindy.Hunt@xxxxxxx>
Sent: Tue, 10 Jan 2006 16:24:51 -0500
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Subject: [xsl] Need assistance with a match string
Hi-
I am having trouble with grabbing the title associated with an element's ID attribute value (we are calling it an "eid") and am hoping someone can see my mistake. I have the ID value that I am pointing to in a variable (below I call it $linkId). I want to say "give me the title of the element in my document that matches this id value". I know my ID value is working because the actual link points to the correct location in the document but I just can't get the title to appear.
We have lots of different elements that this eid could be on so I need to look for any element that matches this id.
My statement looks like:
<xsl:value-of select="//*[@eid='{$linkId}']/title"/>
Currently it is not returning anything. My gut feeling is that something is wrong where I am trying to match the attribute to a variable value. I have tried many things like removing the quotes, brackets, or both and none of these options give me anything except one gives an error.
I have to put my link ID in a variable because I have to do some massaging on the original ID value since we do not use unique ID values across a single document (that wasn't my choice but I am having to make it work this way).
We are using a Saxon parser if that helps.
Thanks for any suggestions you can offer on this,
Cindy Hunt
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] Need assistance with a ma, Jay Bryant | Thread | [xsl] any progress or suggestions o, Michael Gilbert |
| RE: [xsl] group-by deep equality?, Michael Kay | Date | Re: [xsl] Need assistance with a ma, Jay Bryant |
| Month |