[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XPath and namespace nodes: a tough one
Andrew Welch wrote: > let $foo := <n0:pdu xmlns:n0="http://a.example"> > <n1:elem1 xmlns:n1="http://b.example"> > content > </n1:elem1> > </n0:pdu> > return $foo/* > you get: > <n1:elem1 xmlns:n1="http://b.example"> > content > </n1:elem1> Which is not really nice if you have something like: <n1:elem1 xmlns:n1="http://b.example" value="n0:something"> content </n1:elem1> BTW, Elliotte said: > The subdocument with elem1 as its apex node can be extracted from > this second case with an XPath expression such as: > (//. | //@* | //namespace::*)[ancestor-or-self::n1:elem1] But this expression returns a node set with several nodes, all descendant of n1:elem1, and not the element n1:elem1 (with its descendant.) Unfortunately, this is not possible to discard a namespace in XPath only. Regards, -- Florent Georges http://www.fgeorges.org/
|
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
|