[Bug report] XSV Restriction Error

The schema (included below) is parsed quite happily by Xerces, but the
latest XSV has problems.  By the XSV documentation it looks like this should
work, but I get:

file:///usr/local/XSV/xsvlog/tmpHoq4wGuploaded:19:3: Invalid: Content model
of restrict not actually a restriction of base type base: a
{urn:whatever}:r1 element at node 1 of this model can't be matched by any
edge leaving node 1 of the base

Just thought you might like to know.

Cheers,
Martin

---

<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            targetNamespace="urn:whatever" xmlns="urn:whatever"
            elementFormDefault="qualified"
            attributeFormDefault="unqualified">

  <xsd:complexType name="base" abstract="true">
    <xsd:complexContent>
      <xsd:restriction base="xsd:anyType">
        <xsd:sequence>
          <xsd:any namespace="##any" processContents="strict"
                   minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
        <xsd:attribute name="attr" type="xsd:token"/>
      </xsd:restriction>
    </xsd:complexContent>
  </xsd:complexType>

  <xsd:complexType name="restrict">
    <xsd:complexContent>
      <xsd:restriction base="base">
        <xsd:sequence>
          <xsd:element name="element" type="xsd:token"/>
        </xsd:sequence>
        <xsd:attribute name="attr" type="xsd:token"/>
      </xsd:restriction>
    </xsd:complexContent>
  </xsd:complexType>
</xsd:schema>

Received on Tuesday, 19 April 2005 03:06:15 UTC