|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Re: Move (ascend) an element
Hi Naomi,
At 04:27 PM 11/9/2004, you wrote: I used a modification of the provided example to try and move indexterms from inside /figure/title to just above the title, but I seem to be losing my figure attributes like id and role (because of a shallow copy?)--doing it this way also for some reason takes another indexterm from earlier in the xml file and puts it right before the one I want moved (this, I have no clue about): "//indexterm" translates to "/descendant-or-self::node()/child::indexterm", meaning all indexterms in the document, which is why you get them. You want ".//indexterm", which collects all the indexterms inside the context node. Not a big deal, but the conventional way to write your match expressions would probably be match="figure[./title/indexterm]" (short for child::figure[self::node()/child::title/child::indexterm]) and match="figure/title/indexterm" (instead of match="indexterm[parent::title[parent::figure]]") They work the same as yours but are a bit easier to read for the XPath-fluent. Cheers, Wendell
|
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








