[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] extract xpath locator
Hello, I would like to write template that returns the exact xpath expression that locates a tag in mixed-content documents. eg, i have: <doc> This <i>is</i> a <b>T</b>est </doc> and I would like to get the Xpath that says that "i" includes char 6 and 7, and "b" char 11 of "/doc" Besides, it should handle complex nesting like <doc> This <i>i<b>s</b></i> a <b><i>T</i></b>est </doc> So that I can write an xpath such as substring(/doc/text(),6,2) to point on a bare sentence <doc> This is a Test </doc> and know that "is" is labeled as "i" I messed a bit with "substring", "string-length", etc. but could not figure out how to get the offset of the opening tag... Any idea? Thanks in advance Nicolas Mazziotta
|
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
|