<br /><br />Taking your example literally: have<br />you tried - <span<br/>style='font-size:10.0pt;font-family:"Courier New">topLevel/ents/ent[@name=’def’]/value<font<br/>size=2 color=navy face=Arial><br /><br /><br /><br /><br /><br /><br /><br /> <br /><br /><br /><br /><br /><br /> <br /><br />From: Hintz, David L<br /> <br /><br />Sent: Tuesday, December 19, 2006<br />12:15 PM<br /><br />To: adepters@arbortext.com<br /><br />Subject: Using XPath in Styler<br />question<br /><br /><br /><br /> <br /><br /><br /><br /><br /><br /> <br /><br /><font<br/>size=2 color=black face="Courier New">Adepters:<br /><br /><br /><br /><font<br/>size=2 color=black face="Courier New"><br /><br /><br /><br /><font<br/>size=2 color=black face="Courier New">I’m creating a Styler stylesheet and would<br />like to use XPath in generated text to reference the content of an element<br />whose parent’s "name" attribute matches the "name" attribute<br />of the current element. For example...<br /><br /><br /><br /><font<br/>size=2 color=black face="Courier New"><br /><br /><br /><br />Assume that my document has this structure:<br /><br /><br /><br /><br /><br /><br /><br /> <toplevel><br /><br /><br /><br /> <ents><br /><br /><br /><br /><br /><ent<br/>name="abc"><value>test1</value></ent><br /><br /><br /><br /><br /><ent<br/>name="def"><value>test2</value></ent><br /><br /><br /><br /> </ents><br /><br /><br /><br /> .<br /><br /><br /><br /> .<br /><br /><br /><br /> .<br /><br /><br /><br /> <para>This is <entref<br/>name="def"/>.</para><br /><br /><br /><br /><br /><br /><br /><br />What XPath expression can I use in context of<br />this <entref> element to reference the content of the <value><br />element that matches the <ent> name attribute as shown above. In<br />other words, returns the value "test2". I've gotten this far:<br /><br /><br /><br /><br /><br /><br /><br /> /topLevel/ents/ent[@name]/value<br /><br /><br /><br /><br /><br /><br /><br />But, that always returns the first value,<br />"test1". Somehow I need to test @name that equals the<br />"name" of the current tag. I’ve gotten some feedback from<br />the XSL list that this isn’t possible in XPath without first creating a<br />variable. But, I don’t see a way to do that that’s supported<br />in XPath 1.0 and works as an XPath expression.<br /><br /><br /><br /><br /><br /><br /><br />Any suggestions?<br /><br /><br /><br /><br /><br /><br /><br />Dave<br /><br /><br /><br /><font<br/>size=2 color=purple face=Arial><br /><br /><br /><br /> <br /><br />>> To unsubscribe from the list, send an email to<br />listmanager@maillist.arbortext.com with the following in the body: unsubscribe<br />adepters - For additional information on the adepters list (how to subscribe or<br />unsubscribe etc), send an email to: listmanager@maillist.arbortext.com with the<br />following in the body: info Adepters - You may also go to forums.arbortext.com,<br />enter the Adepters folder and change your subscription options and<br />preferences.>> <br /><br /><br /><br />