[XMLSCHEMA-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

[Bug report] XSV Restriction Error

From: Martin Thomson <martin.thomson@nortel.com>
Date: Tue, 19 Apr 2005 11:59:45 +1000
Message-ID: <C0FA66CBDDF5D411B82E00508BE3A72210239E67@zctwc059.asiapac.nortel.com>
To: xmlschema-dev@w3.org
xsd nortel
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 GMT

Subscribe to the Stylus Scoop newsletter for helpful XML tips and tutorials.
Email
First Name
Last Name
Company

Download Stylus Studio 6 XML Enterprise Edition

Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.