[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message]

Relative URIs in namespaces

Pavel Minaev int19h at gmail.com
Fri Aug 28 20:38:54 PDT 2009


  Relative URIs in namespaces
I'm trying to find out what is the defined semantics for the use of
relative URIs for namespaces. For example:

    declare namespace foo = "foo";
    <foo:bar/>

So far as I can see, there's nothing restricting the use of such
namespaces in the spec: "foo" in above code sample is an UriLiteral,
and portable XQuery code must ensure that it is in the lexical
namespace of xs:anyURI; and the latter explicitly allows for relative
references, which this one is.

As long as we're dealing with XDM, I also don't see any special casing
of relative namespace URIs - the produced element node would have a
QName, and that QName is represented by (anyURI, NCName) tuple, again
with no restrictions on URI values. So it would seem that working with
such node within XQuery is fully well-defined, and the URI is
effectively treated simply as an identifier, a sequence of characters
with no particular meaning (except that it must match the grammar in
RFC2396) - correct me if I'm wrong. As a side note, the same seems to
apply to URIs used for module target namespaces and schemas.

However, it is not clear to me what should happen when the output is
mapped to XML Infoset. The spec for the latter states rather
unambiguously:

"Furthermore, this specification does not define an information set
for documents which use relative URI references in namespace
declarations."

And yet, XDM spec does not talk about relative namespaces URIs when
describing Infoset mapping at all. For example, 6.2.5, which describes
mapping of elements, simply says that Infoset namespace name is the
namespace name of dm:node-name() of the element - as given, this would
translate the relative URI directly. I also cannot find anything about
this in Serialization.

What does this give, ultimately? Is the output of XQuery code given
above completely undefined, or merely implementation-defined in some
aspects? Must the implementation nonetheless guarantee some output, or
can it signal an error?

Also, if indeed allowed, is the practice of using relative namespace
URIs in any way deprecated in XQuery spec (or other documents that it
normatively references), the same way they are deprecated in XML
Namespaces?


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-2011 All Rights Reserved.