Hi, Cindy,
The single quotation marks around {$linkId} make your XSLT processor look
for an eid that has that actual string, not the value of the variable with
that name.
Try this:
<xsl:value-of select="//*[(_at_)eid=$linkId]/title"/>
That's untested, but it should at least be closer to what you need.
Jay Bryant
Bryant Communication Services
----- Original Message -----
From: "Cindy Hunt" <Cindy(_dot_)Hunt(_at_)sas(_dot_)com>
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Sent: Tuesday, January 10, 2006 3:24 PM
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="//*[(_at_)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
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--