W3C home > Mailing lists > Public > public-qt-comments@w3.org > March 2003

RE: Namespace considerations

From: Caroline Rioux <crioux@decisionsoft.com>
Date: Thu, 6 Mar 2003 08:45:15 +0000 (GMT)
To: "Kay, Michael" <Michael.Kay@softwareag.com>
cc: Jonathan Robie <jonathan.robie@datadirect-technologies.com>, Michael Rys <mrys@microsoft.com>, <public-qt-comments@w3.org>
Message-ID: <Pine.LNX.4.44.0303060831490.1437-100000@ouse.dsl.local>

Thank you Michael.  This question was indeed for an XPath implementation.

Now, if in a document I do not import/reference any schemas, and I bind 
xf to "http://www.w3.org/2001/XMLSchema" and
xs to "http://www.w3.org/2001/XMLSchema-datatypes"

I know that it is legal to do

'xf:decimal("15.5")'

(because of the XPath 2.0 spec, section 2.6.2.1.1)  but can I do

'xs:decimal("15.5")' ?

ie, are the XMLSchema-datatypes datatypes 'automatically' available, just 
as the 44 types from XMLSchema are?

Thanks,
Caroline



On Wed, 5 Mar 2003, Kay, Michael wrote:

> > The xs: prefix is predefined, bound to 
> > "http://www.w3.org/2001/XMLSchema", 
> > so there is no need to 
> > bind anything to xs.  I'm trying to remember if we 
> > outlawed redefining this prefix - I think not, but I also 
> > asked the WG the 
> > question, and I will reply here if I find out that I was wrong.
> > 
> > So under the assumption that you actually can redefine this 
> > prefix, if you 
> > do not import the schema, these types will not be predefined, 
> > and you will 
> > get a type error, since the system does not know what types you are 
> > referring to.
> > 
> > Jonathan 
> >
> 
> That answer is correct for XQuery. I don't recall whether the original
> question was about XPath or XQuery. In XPath, all namespace prefixes except
> "xml" have to be defined explicitly.
> 
> Michael Kay 
> 

-- 
Caroline Rioux, Software Engineer           +44-1865-203192
DecisionSoft Limited                        http://www.decisionsoft.com
XML Development and Services
Received on Thursday, 6 March 2003 03:42:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:14:24 GMT