This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
xsl:key question
- To: "'xsl-list at lists dot mulberrytech dot com'" <xsl-list at lists dot mulberrytech dot com>
- Subject: [xsl] xsl:key question
- From: Kerin Cosford <Kerin dot Cosford at current-drugs dot com>
- Date: Tue, 10 Jul 2001 13:21:52 +0100
- Reply-To: xsl-list at lists dot mulberrytech dot com
hi everyone,
I'm something of an XSL newbie, and I can't seem to find the answer to this
problem - I'm sure it's very simple, but I just can't work it out.
With this XML:
<Drug>
<DrugCitation>
<DrugCompanyList>
<DrugCompany>
<Company CDLID="18767">
<CompanyCitation>
<CompanyName>
Johnson and Johnson
</CompanyName>
</CompanyCitation>
</Company>
</DrugCompany>
</DrugCompanyList>
</DrugCitation>
<DrugDevelopmentList>
<DrugDevelopment>
<CompanyRef CDLID="18767"/>
<DrugDevelopment>
</DrugDevelopmentList>
</Drug>
I need to have an xsl:key which will return the text within <CompanyName>
when a CLID="" value of the <Company> element is passed to it (The value of
the CDLID attribute is taken from the <CompanyRef> element).
How do I do this? All of the xsl:key examples I've come across only concern
retrieving values from the same element that is queried. I'm sure this is a
simple XPath expression, but, as I say, I just can't seem to work it out
today.
Thanks in advance,
Kerin
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list