logo       

Re: qualified name argument to startElement: msg#00133

Subject: Re: qualified name argument to startElement
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



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
science.linguis...    culture.sf.lite...    video.mplayer.c...    yellowdog.gener...    ietf.rfc822/199...    emacs.help/2002...    redhat.release....    kernel.speakup/...    java.openejb.de...    debian.devel.gt...    xfree86.newbie/...    bug-tracking.ma...    pam/2003-05/msg...    games.devel.ope...    user-groups.lin...    music.pancham/2...    network.mq.deve...    web.html.genera...    arklinux.bugs/2...    linux.ecasound/...    qnx.openqnx.dev...    org.user-groups...    file-systems.sf...    trustix.contrib...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe