W3C home > Mailing lists > Public > xmlschema-dev@w3.org > February 2003

substitutionGroup and anyType

From: Hugh Wallis <hugh_wallis@hyperion.com>
Date: Wed, 12 Feb 2003 11:38:13 -0500
Message-ID: <026301c2d2b5$22f59ab0$2702a8c0@hyperion.com>
To: <xmlschema-dev@w3.org>
With this schema (called AnyType.xsd):

<?xml version="1.0" encoding="UTF-8"?>

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">

     <xs:element name="item" type="xs:anyType" abstract="true"/>

     <xs:element name="library" type="xs:string" substitutionGroup="item"/>


this file

<?xml version="1.0" encoding="UTF-8"?>

<library xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="AnyType.xsd">



Validates fine in XML-Spy, Topologi Schematron Validator (uses MSXML 4.0), using JAXP/Xerces2 but not using .NET validator which gives the error message 

    'library' cannot be a member of the substitution group with head element 'item'. An error occurred at file:///C:/temp/AnyType.xsd(4,2)

Which is right?


Hugh Wallis
Received on Wednesday, 12 February 2003 11:38:49 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 14:55:59 UTC