OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: RE: [docbook] namespace markup

I don't quite know if I should be flattered. All I did was reading aloud from "Namespaces in XML 1.0 (Second Edition)" [1].

XML namespace name rules *are* confusing:

  "The empty string, though it is a legal URI reference, cannot be used as a namespace name."

And a few lines further:

  "The attribute's [used in the namespace declaration] normalized value MUST be either a URI reference - the namespace name identifying the namespace - or an empty string."

A bit more reading aloud, this time from one of the editors [2]:

  There is no such thing as the "blank namespace" or the "empty namespace" or the "unqualified namespace."

The point is that the empty string does not identify any XML namespace. Rather, it can be used as the attribute value in an XML namespace declaration to undeclare an XML namespace prefix (since Namespaces 1.1) or the default namespace. See also [3].

The <uri> element was introduced to mark up -- among other things -- XML namespace names [4]. I suppose one can argue that it is better than, say, <span class="xmlNamespace">...</span>. It is a quagmire though, if you want to do anything with it besides rendering. Naming and versioning a vocabulary is inherently difficult.

By the way, what is the appropriate way to mark up a QName?

Kind regards
Peter Ring

[1] http://www.w3.org/TR/REC-xml-names
[2] http://www.tbray.org/ongoing/When/200x/2003/08/08/NamespaceOrNot
[3] http://www.rpbourret.com/xml/NamespacesFAQ.htm#decl_7
[4] http://lists.oasis-open.org/archives/docbook/200306/msg00051.html

> -----Original Message-----
> From: Dave Pawson [mailto:davep@dpawson.co.uk]
> Sent: 8. marts 2007 18:01
> To: Peter Ring
> Cc: docbook@lists.oasis-open.org
> Subject: Re: [docbook] namespace markup
> Peter Ring wrote:
> > An XML namespace is not an URI; rather it is is 
> *identified* by an URI reference.
> Oh dear.
> (I hate people who are 'right'
> .... especially when I didn't think of it.
>   To be more precise, a subset of URI references with semantics that 
> differ from URI references in general.
> > 
> > The empty string is an URI reference, but the empty string 
> cannot be used as an XML namespace name.
> We'll let that pass (default ns?)
>   Relative URI references are deprecated as XML namespace names.
> +1
>   XML namespace names are compared by string equality, i.e. 
> not the way 
> URI references are resolved. [1]
> No, but as 'strings' they are uri's?
> > 
> > In short: an XML namespace name looks a lot like an URI, 
> and an XML namespace declaration look a lot like assigning a 
> value to an 
> attribute.
> But you cannot really infer much about the semantics of XML 
> namespaces 
> from that. An XML namespace name is not a type of URI.
> Tell you what Peter.
> I'll ask the stupid questions.
> You come back with the 'right' answers, to guide us,
> and the db comittee can think about it for a while.
> Agreed?
> regards
> -- 
> Dave Pawson
> http://www.dpawson.co.uk

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]