At 9:46 AM +0200 4/28/04, Mikael Ståldal wrote:
What *is* a qualified name then? And where is that specified?
It's defined in section 4 of the Namespaces specification using BNF:
In XML documents conforming to this
specification, some names (constructs
corresponding to the nonterminal Name) MUST be
given as qualified names, defined as follows:
Qualified Name
[6] QName ::= PrefixedName
| UnprefixedName
[6a] PrefixedName ::= Prefix ':' LocalPart
[6b] UnprefixedName ::= LocalPart
[7] Prefix ::= NCName
[8] LocalPart ::= NCName
Bottom line: a qualified name is any XML name
that does not contain an initial or trailing
colon, or more than one colon, or use a
non-namestart character after its only colon. An
element name in a document that does not use
namespaces is still a perfectly legal qualified
name, provided only that it does not use colons
in a way incompatible with the namespaces
specification.
Indeed the SAX specification might be clearer if
we just called that argument "name" rather than
"qName". As it stands, a document that is
namespace incompatible due to multiple colons in
element names can't really be processed by SAX
because such an element has neither a local part
nor a qualified name. However, it does have a
name, and is well-formed though not namespace
well-formed.
--
Elliotte Rusty Harold
elharo@xxxxxxxxxxxxxxx
Effective XML (Addison-Wesley, 2003)
http://www.cafeconleche.org/books/effectivexml
http://www.amazon.com/exec/obidos/ISBN%3D0321150406/ref%3Dnosim/cafeaulaitA
-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g.
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id149&alloc_id?66&op=click
_______________________________________________
List: sax-devel, sax-devel@xxxxxxxxxxxxxxxxxxxxx
See: http://www.saxproject.org/
https://lists.sourceforge.net/lists/listinfo/sax-devel
|