> I need to have a n XPath expression for an <xsl:value-of>
> element whihc
> selects the following (in English):
> any 'CompanyName' elements, which have a grandparent with a 'CDLID'
> attribute equal to the 'CDLID' attribute of the element
> 'Company' within the
> current node.
//CompanyName[../../@CLDID = current()/Company/@CLDID]
But it would be more efficient to use keys.
> Does that make sense?
> Here's a snippet of the XML in question:
> <Company CDLID="12337">
> **Johnson and Johnson
> <CompanyRef CDLID="12337"/>
> So, when the context Node is <DrugDevelopment> (marked with
> *), I need to
> ouput the value of the <CompanyName> (**) element who's
> grandparen <Company>
> element has a matching CDLID attribute.