- From: David Carlisle <davidc@nag.co.uk>
- Date: Wed, 11 Dec 2002 13:56:41 GMT
- 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 UTC