W3C home > Mailing lists > Public > www-html-editor@w3.org > January to March 2003

Re: XHTML+MathML schema test

From: Stan Devitt <jsdevitt@stratumtek.ca>
Date: Wed, 19 Feb 2003 10:38:48 -0500 (EST)
Message-Id: <200302191538.h1JFcmF19460@radical.stratumtek.ca>
To: www-html-editor@w3.org
Cc: jsdevitt@stratumtek.com

We have encountered a validation error when attempting
to validate various XTHML+MathML examples.

This reveals a problem in the modular xhtml schema we
were using, as well as a bug in XSV. (Hopefully this
problem is already fixed in the official schema but
in any event shows a bug in XSV. )

In attempting to investigate schema modularization in
conjunction for XHTML+MathML, we have come across
a problem with the schema in 

	xhtml/opt/xhtml-base-1.xsd

This schema is redefining the head.content group
to include a base element.  

The XSV validator reports that the schema passes.
XMLSpy 5  release 3 correctly complains about there is 
an attempt to create a circular definition of a group.

The problem occurs in the redefinition of the group head.content.

  <xs:redefine schemaLocation="../req/core/xhtml-struct-1.xsd">
    <xs:group name="head.content">
      <xs:sequence>
        <xs:group ref="HeadOpts.mix" minOccurs="0" maxOccurs="unbounded"/>
       
        <xs:choice>
          <xs:sequence>
            <xs:element ref="title"/>
            <xs:group ref="HeadOpts.mix" minOccurs="0" maxOccurs="unbounded"/>
            <xs:sequence minOccurs="0">
              <xs:element ref="base"/>
              <xs:group ref="HeadOpts.mix" minOccurs="0" maxOccurs="unbounded"/>
            </xs:sequence>
          </xs:sequence>
          <xs:sequence>
            <xs:element ref="base"/>
problem --> <xs:group ref="head.content"/>  <!-- circular reference -->
          </xs:sequence>
        </xs:choice>
      </xs:sequence>
    </xs:group>
  </xs:redefine>

The goal of the definition is apparently to include the base
element optionally before or after the title.  On replacing the above 
redefinition by 

  <xs:redefine schemaLocation="../req/core/xhtml-struct-1.xsd">
    <xs:group name="head.content">
      <xs:sequence>
        <xs:choice>
          <xs:sequence>
            <xs:group ref="HeadOpts.mix" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element ref="title" minOccurs="1"/>
            <xs:group ref="HeadOpts.mix" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element ref="base" minOccurs="1"/>
            <xs:group ref="HeadOpts.mix" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
          <xs:sequence>
            <xs:group ref="HeadOpts.mix" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element ref="base" minOccurs="1"/>
            <xs:group ref="HeadOpts.mix" minOccurs="0" maxOccurs="unbounded"/>
      	    <xs:element ref="title" minOccurs="1"/>
      	    <xs:group ref="HeadOpts.mix" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
          <xs:sequence>
            <xs:group ref="HeadOpts.mix" minOccurs="0" maxOccurs="unbounded"/>
            <xs:element ref="title" minOccurs="1"/>
            <xs:group ref="HeadOpts.mix" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:choice>
      </xs:sequence>
    </xs:group>
  </xs:redefine>

validates with XSV and XMLSpy 5. 

It also allows our simple xhtml + mathml examples to validate. 

Thanks in advance for looking into this matter.

Stan Devitt.
jsdevitt@stratumtek.com
Invited Expert
MathML Working Group


PS.  We also encountered a second problem with XSV when we accidently
redefined head.content in such a way that it was not a superset or subset
of the original definition.  XSV incorrectly reported that it was 
not a "restriction", when in fact it should have been complaining about
subset/superset problems.   This may simply be a poorly worded error 
message.
Received on Wednesday, 19 February 2003 10:27:07 GMT

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