From: "Tom Oehser" <[EMAIL PROTECTED]>
> ---------- Forwarded message ----------
> Date: Tue, 26 Feb 2002 15:15:18 -0500
> From: David Marston/Cambridge/IBM <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: Re: Multiple default namespaces cannot be selected with "".
>
>
> >what about:  //*[name()='one']/two/@three
> >shouldn't I be required instead
> >to do //*[name()='one']/*[name()='two']/@three ?
>
> The reason that two is an acceptable abbreviation for child::two is
> that XPath 2.5 requires that it be so. This works in your test because
> your "two" element was not namespaced. You should read about XPath
> treatment of namespaces in a good XSLT/XPath book (like Doug Tidwell's
> book) rather than relying solely on the specs.
> .................David Marston

FWIW in the example you gave here

> > <one xmlns='asdf'><two three='four'></two></one>

The <two> element is in the 'asdf' namespace so //*[name()='one']/two/@three
should not find anything.

James


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


_______________________________________________
dom4j-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to