1 <?xml version="1.0" encoding="utf-8" ?>
3 <!-- ============================================================
4 An XML Schema Definition for a test XML file
5 ============================================================
6 This file Copyright 2010 Andrew M. Bishop
8 This program is free software: you can redistribute it and/or modify
9 it under the terms of the GNU Affero General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
12 ============================================================ -->
14 <xsd:schema elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
16 <!-- The top level -->
18 <xsd:element name="test" type="schemaType"/>
20 <!-- The first level element -->
22 <xsd:complexType name="schemaType">
24 <xsd:element name="level1" type="level1Type"/>
26 <xsd:attribute name="attr1" type="xsd:string"/>
27 <xsd:attribute name="attr2" type="xsd:string"/>
30 <!-- The second level element -->
32 <xsd:complexType name="level1Type">
34 <xsd:element name="level2" type="level2Type" minOccurs="0"/>
36 <xsd:attribute name="attr1" type="xsd:string"/>