Re: Can this all fit into one Xpath expression?
I have a structure with conditions something like this:
In XPath 2.0 you can use sequence notation and have:
//GenTable/table/tgroup/tbody/row/entry[Emphasis[ . = ( 'Address Offset', 'Physical Address', 'Instance', 'Description', 'Type' ) ] [@type='bold'] ]
That would select the entry element that has the emphasis you seek ... then in XSLT or XQuery you construct the end result by constructing the element and attribute nodes you need. It doesn't handle nested emphasis, only emphasis that is a direct child of the entry. If you need to identify an entry with emphasis anywhere inside of it you need to modify the above to read:
... entry[.//Emphasis[ ....
I'm not sure to what you are referring when you say "I want to set ...." ... are you using XPath in, perhaps, a DOM implementation?
I hope this helps.
. . . . . . . . . Ken
-- XSLT/XSL-FO/XQuery training in Los Angeles (New dates!) 2009-06-08 Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video Video lesson: http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18 Video overview: http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18 G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
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