W3C home > Mailing lists > Public > www-xml-schema-comments@w3.org > April to June 2000

Re: mistake in example

From: Henry S. Thompson <ht@cogsci.ed.ac.uk>
Date: 06 Jun 2000 16:25:42 +0100
To: Volker Renneberg <volker.renneberg@acm.org>
Cc: www-xml-schema-comments@w3.org
Message-ID: <f5bsnuqx24p.fsf@cogsci.ed.ac.uk>
Volker Renneberg <volker.renneberg@acm.org> writes:

> I'm refering to the examples under "3.2 Qualified Locals" in [XML
> Schema: Primer]. First there is an schema definition containing the
> following:
>    elementFormDefault="qualified"
>    attributeFormDefault="unqualified"
> 
> Then there are two examples following of which the first one is correct.
> In my eyes the second one is wrong: There you are declaring a default
> namespace (xmlns="...") So both elements AND attributes are in that
> namespace although the locally defined attribute "country" should be
> unqualified (considerung attributeFormDefault="unqualified"). So this
> example is actually no example for the given schema definition.

The primer example is correct, but it's not surprising you're
confused.  Un_prefixed_ attributes are _always_ unqualified, even if
there is a default namespace declaration.  So in that second example,
"country" is unqualfied, despite the 'xmlns="..."'.  This asymmetry
between elements and attributes wrt the default NS declaration is easy 
to lose track of.

ht
-- 
  Henry S. Thompson, HCRC Language Technology Group, University of Edinburgh
          W3C Fellow 1999--2001, part-time member of W3C Team
     2 Buccleuch Place, Edinburgh EH8 9LW, SCOTLAND -- (44) 131 650-4440
	    Fax: (44) 131 650-4587, e-mail: ht@cogsci.ed.ac.uk
		     URL: http://www.ltg.ed.ac.uk/~ht/
Received on Tuesday, 6 June 2000 11:25:45 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:08:47 UTC