This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Query re XMLSpy XPath engine
- From: Jeni Tennison <jeni at jenitennison dot com>
- To: Elliotte Rusty Harold <elharo at metalab dot unc dot edu>
- Cc: xsl-list at lists dot mulberrytech dot com
- Date: Mon, 22 Jul 2002 15:56:18 +0100
- Subject: Re: [xsl] Query re XMLSpy XPath engine
- Organization: Jeni Tennison Consulting Ltd
- References: <LOBBICBLDJIJHPNJFPOLKEIKCJAA.mike@ammd.com.au><p04330100b961c41c0b47@[192.168.254.4]>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Elliotte,
> At 1:23 PM +1000 7/22/02, Michael Leditschke wrote:
>>I have the following document
>>
>><root xmlns:html="http://www.w3.org/1999/xhtml"
>>xmlns="http://www.a.com">
>> <hr xmlns="http://www.w3.org/1999/xhtml"/>
>></root>
[snip]
> Yes. Your hr element is in the http://www.a.com namespace, not the
> http://www.w3.org/1999/xhtml namespace. So ion the second case XMLSpy
> is correct.
But the hr element has a default namespace declaration on it, for the
http://www.w3.org/1999/xhtml namespace. The scope of a namespace
declaration is the element that it's on and the contents of that
element, so the default namespace declaration in scope on the hr
element is the one for http://www.w3.org/1999/xhtml, and thus the hr
element is in the namespace http://www.w3.org/1999/xhtml.
Whether the XPath:
//html:hr
should retrieve it is, of course, another matter, since it entirely
depends on the namespace associated with the prefix 'html' in the
context in which the XPath is being used...
Cheers,
Jeni
---
Jeni Tennison
http://www.jenitennison.com/
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list