71 lines
2.5 KiB
Plaintext
71 lines
2.5 KiB
Plaintext
|
<?xml version="1.0" encoding="utf-8" ?>
|
||
|
<!--
|
||
|
/* Copyright 2004 The Apache Software Foundation
|
||
|
*
|
||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||
|
* you may not use this file except in compliance with the License.
|
||
|
* You may obtain a copy of the License at
|
||
|
*
|
||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||
|
*
|
||
|
* Unless required by applicable law or agreed to in writing, software
|
||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||
|
* See the License for the specific language governing permissions and
|
||
|
* limitations under the License.
|
||
|
*/
|
||
|
-->
|
||
|
|
||
|
|
||
|
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||
|
|
||
|
<xsd:element name="TestRootElem">
|
||
|
<xsd:complexType>
|
||
|
<xsd:sequence>
|
||
|
<xsd:element ref="SubGrpHeadElem" maxOccurs="unbounded" />
|
||
|
</xsd:sequence>
|
||
|
</xsd:complexType>
|
||
|
</xsd:element>
|
||
|
|
||
|
<!-- change head elem type for testing
|
||
|
<xsd:element name="SubGrpHeadElem" type="SubGrpHeadElemType" />
|
||
|
-->
|
||
|
<xsd:element name="SubGrpHeadElem" type="SubGrpHeadElemType2" />
|
||
|
|
||
|
<xsd:element name="SubGrpHeadElem2" type="SubGrpHeadElemType2" />
|
||
|
<xsd:element name="SubGrpMemberElem1" substitutionGroup="SubGrpHeadElem" />
|
||
|
<xsd:element name="SubGrpMemberElem2" type="ExtensionSubGrpHeadElemType" substitutionGroup="SubGrpHeadElem"/>
|
||
|
|
||
|
|
||
|
<xsd:complexType name="SubGrpHeadElemType">
|
||
|
<xsd:sequence>
|
||
|
<xsd:element name="SubGrpInnerElem1" type="xsd:string" />
|
||
|
<xsd:element name="SubGrpInnerElem2" type="xsd:integer" />
|
||
|
</xsd:sequence>
|
||
|
<xsd:attribute name="SubGrpHeadAttr1" type="xsd:string" use="required" />
|
||
|
</xsd:complexType>
|
||
|
|
||
|
<!-- modify Extension Type to extend new head type -->
|
||
|
<xsd:complexType name="ExtensionSubGrpHeadElemType">
|
||
|
<xsd:complexContent>
|
||
|
<!-- modified for testing
|
||
|
<xsd:extension base="SubGrpHeadElemType">
|
||
|
-->
|
||
|
<xsd:extension base="SubGrpHeadElemType2">
|
||
|
<xsd:sequence>
|
||
|
<xsd:element name="SubGrpInnerElem3" type="xsd:string" />
|
||
|
</xsd:sequence>
|
||
|
</xsd:extension>
|
||
|
</xsd:complexContent>
|
||
|
</xsd:complexType>
|
||
|
|
||
|
<xsd:complexType name="SubGrpHeadElemType2">
|
||
|
<xsd:sequence>
|
||
|
<xsd:element name="SubGrpInnerElem4" type="xsd:token" />
|
||
|
</xsd:sequence>
|
||
|
<xsd:attribute name="SubGrpHeadAttr1" type="xsd:string" use="required" />
|
||
|
</xsd:complexType>
|
||
|
|
||
|
|
||
|
</xsd:schema>
|