[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: XPath and namespace nodes: a tough one

Subject: Re: XPath and namespace nodes: a tough one
From: Florent Georges <lists@xxxxxxxxxxxx>
Date: Fri, 19 Dec 2008 16:07:18 +0100 (CET)
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/

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.