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

RE: RE: Re: Query re XMLSpy XPath engine

Subject: RE: RE: Re: Query re XMLSpy XPath engine
From: Dimitre Novatchev <dnovatchev@xxxxxxxxx>
Date: Tue, 23 Jul 2002 05:05:17 -0700 (PDT)
xsl query not null
--- Américo Albuquerque <aalbuquerque at viseu dot ipiaget dot pt>
wrote:
> Hi!
> In this document we have two ns defenitions: one binding the ns
> 'http://www.w3.org/1999/xhtml' to the prefix 'html' and another
> setting
> the default ns to 'http://www.w3.org/1999/xhtml'. Since XMLSpy
> evaluates
> the expression in the context of the original document doesn't this
> means that it's setting the html prefix or setting the default ns??
> Wich
> ns definition is return with //hr?
> xmlns="http://www.w3.org/1999/xhtml";
> or xmlns:html="http://www.w3.org/1999/xhtml";??


The spec says that a non-prefixed name means a name in the ***null***
namespace, not the default namespace. 

"A QName in the node test is expanded into an expanded-name using the
namespace declarations from the expression context. This is the same
way expansion is done for element type names in start and end-tags
except that the default namespace declared with xmlns is not used: if
the QName does not have a prefix, then the namespace URI is null"

(http://www.w3.org/TR/xpath#node-tests)

Therefore, if the default namespace is not null (,which is the case)
the result of evaluating the XPath expression "//hr " will not contain
"hr" elements from the default namespace.

On the other side, "//html:hr " will return all of them.



=====
Cheers,

Dimitre Novatchev.
http://fxsl.sourceforge.net/ -- the home of FXSL

__________________________________________________
Do You Yahoo!?
Yahoo! Health - Feel better, live better
http://health.yahoo.com

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.