Re: mistake in example

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