W3C home > Mailing lists > Public > www-html-editor@w3.org > October to December 2002

XHTML Mod'n in schema: elementFormDefault

From: David Carlisle <davidc@nag.co.uk>
Date: Wed, 11 Dec 2002 13:56:41 GMT
Message-Id: <200212111356.NAA32142@penguin.nag.co.uk>
To: www-html-editor@w3.org




http://www.w3.org/TR/2002/WD-xhtml-m12n-schema-20021209/schema-framework.html#sec_2.2.6.

  One convention chosen for this framework is that the names of elements
  and attributes in the modules are unqualified i.e. no namespace prefix
  is required for XHTML elements. 


setting elementFormDefault="unqualified" forces child elements to be
unprefixed _and in no namespace_

See for example 

http://www.w3.org/TR/xmlschema-0/#UnqualLocals

where the parent <apo:purchaseOrder is in the target namespace of the
schema but the child <shipTo is in no namespace.

It would seem that the schema fragments  like this

  <xs:complexType name="ul.type">
    <xs:sequence>
      <xs:element ref="li" minOccurs="1" maxOccurs="unbounded"/>
    </xs:sequence>
    <xs:attributeGroup ref="ul.attlist"/>
  </xs:complexType>

  <xs:element name="ul" type="ul.type"/>

Have ul in the target (xhtml) namespace but child elements must be in no
namespace due to the setting of elementFormDefault
so


<ul xmlns="http://www.w3.org/1999/xhtml">
 <li xmlns="">


or

<h:ul xmlns:h="http://www.w3.org/1999/xhtml">
 <li>


But not the two most natural forms


<ul xmlns="http://www.w3.org/1999/xhtml">
 <li>

<h:ul xmlns:h="http://www.w3.org/1999/xhtml">
 <h:li>

If elementFormDefault="qualified" then both of the second forms (and
neither of the first two) would be allowed, which would seem preferable,
in fact essential since all the elements declared are in the xhtml
namespace.


David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.
Received on Wednesday, 11 December 2002 08:57:27 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:17:43 GMT