xhtml schemas not valid?

Hello,

I tried to import the working draft schemas of "Modularization of XHTML(tm)
in XML Schema" into a schema of my own, because I wanted to use xhtml
elements in my XML files.

I am using XML Spy 4.01 to edit and validate schemas. On validating my
schema, I got the following error messages from XML Spy and I verified in
the final schema recommendation on the W3C site, that there are really
elements in the xhtml schemas, that do not conform to the schema
recommendation:

1) name="xml:lang" cannot have a namespace prefix. Please remove prefix or
use "ref=" instead.

i.e. req/framework/xhtml-attribs-1.xsd

  <xsd:attributeGroup name="I18n.attrib">
    <xsd:attributeGroup ref="BIDI"/>
    <xsd:attribute name="xml:lang" type="LanguageCode"/>
  </xsd:attributeGroup>

according to the schema recommendation QNames are not allowed in
name-attributes

2) usage of ref= and name= at the same time is forbidden

i.e. req/framework/xhtml-events-1.xsd

  <!-- 
		additional attributes on anchor element
  -->
  <xsd:attributeGroup name="a.events.attlist">
    <xsd:attribute name="onfocus" type="Script"/>
    <xsd:attribute name="onblur" type="Script"/>
  </xsd:attributeGroup>
  <xsd:redefine schemaLocation="../core/xhtml-hypertext-1.xsd">
    <xsd:attributeGroup name="a.attlist">
      <xsd:extension base="a.attlist">
        <xsd:attributeGroup ref="a.events.attlist"/>
      </xsd:extension>
    </xsd:attributeGroup>
  </xsd:redefine>

I think that the problem really is, that xsd:extension is only allowed after
xsd:complexContent, but not after xsd:attributeGroup. I tried it without the
reference and it still does not validate. Also I can not see any alternative
construct to circumvent the problem.

These two problems exist in a few other schema modules too. After removing
these elements all the xhtml schemas were validated successfully. For doing
this I had to download all the modules, even the optional modules, because
there are references to elements in optional modules in the required
modules! Therefore I do not see how modularization could work in practice.

Best Regards,
--
Gerhard Sommer
Magistrat Wien (MA 14-ADV), Rathausstraße 1, 1082 Wien, Austria
E-Mail: som@adv.magwien.gv.at
Tel: +43 (1) 4000 91326
Fax: +43 (1) 4000 99 91326

Received on Monday, 22 October 2001 03:09:32 UTC