|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XPath without using variable ?
At 2004-07-03 12:36 +0100, Arthur Maloney wrote:
How do specify an attribute in XPath? @type is an attribute of an in-context element. You are asking if the name attribute of identifier is equal to the type attribute of identifier. When I Hard code e.g. identifier[@name='asp:DropDownList'] it works. Also using a variable, as below it works. There isn't anything in XPath, but there is something in XSLT since it looks like you are using XSLT. I'm use this as a lookup (my problem: trying to avoid using variable 'test') The current() function in XSLT returns the current node at the start of the XPath expression. So select="//hungarian/identifier[@name=current()/@type] will give you the equivalent of the above, since in the above you are assigning to $test the type attribute of the current node at the start of the following expression. But your "//" syntax above could be very wasteful depending on how you use it... if you have performance problems you should look into using keys. I hope this helps. ..................... Ken
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








