Re: Fwd: Re: [jdom-interest] Namespace issues, et al.

I think your questions have mostly been answered, but I'll collect them
here for clarity.

> Lets use one of the examples from that page:
> <?xml version="1.1"?>
> <!-- elements are in the HTML namespace, in this case by default -->
> <html xmlns='http://www.w3.org/1999/xhtml'>
>   <head><title>Frobnostication</title></head>
>   <body><p>Moved to <a href='http://frob.com'>here</a>.</p></body>
> </html>
> 
> A couple key developers on the JDOM project are stating that the
> "href" tag is in a "null namespace" instead of the 
> "http://www.w3.org/1999/xhtml"
> namespace.  Which is correct? I thought it had to be in the xhtml
> namespace for validation...

According to http://www.w3.org/TR/xml-names11/#defaulting "Default
namespace declarations do not apply directly to attribute names; the
interpretation of unprefixed attributes is determined by the element on
which they appear."  So the 'href' attribute is not in a namespace (that
is, it has a null namespace name).  The attribute is interpreted in the
context of the <a> element, which _is_ in the XHTML namespace.  You can
think of unqualified attributes as being scoped to the element they
appear on.

> Also, at what point does the XML1.1 and Namespace 1.1 become the
current 
> standard?

When XML 1.1 and Namespaces 1.1 are released as Recommendations.  These
specs are in Candidate Recommendation phase right now.  I would
guesstimate that they will become Recommendations in about six months.

> JDOM is currently at XML 1.0 and Namespace 1.0 because they state that

> XML1.1 is not
> actually released yet (and may not be)....  However, I am trying to 
> use XML 1.1 for the
> full internationalization support.

Nothing wrong with that, and the XML Core WG would love to hear your
implementation feedback.  But, until the specs are Recommendation, there
are no guarantees that these specs will be not undergo minor change,
major change, or even be rejected entirely.  You should make your
customers aware of those risks when you provide them with your code.

Jonathan Marsh
(XML Core WG member representing Microsoft)

Received on Monday, 24 February 2003 13:43:14 UTC