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

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

 <xs:element name="content">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" ref="table"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="service">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" ref="table"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="table">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" ref="subheading"/>
        <xs:element maxOccurs="unbounded" ref="field"/>
      </xs:sequence>
      <xs:attribute name="columns" type="xs:integer"/>
      <xs:attribute name="name" use="required"/>
      <xs:attribute name="collapsed" type="xs:boolean"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="subheading">
    <xs:complexType>
      <xs:sequence>
        <xs:element maxOccurs="unbounded" ref="heading"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="heading" type="xs:string"/>
  <xs:element name="field">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="name"/>
        <xs:element minOccurs="0" ref="values"/>
      </xs:sequence>
      <xs:attribute name="maxoccurs" type="xs:NCName" fixed="unbounded"/>
      <xs:attribute name="readonly" type="xs:boolean"/>
      <xs:attribute name="url" type="xs:boolean"/>
      <xs:attribute name="path" type="xs:boolean"/>
      <xs:attribute name="required" type="xs:boolean"/>
      <xs:attribute name="type" use="required" type="xs:NCName"/>
      <xs:attribute name="isRichText" type="xs:boolean"/>
      <xs:attribute name="default" type="xs:string"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="name">
    <xs:complexType mixed="true">
      <xs:simpleContent>
        <xs:extension base="restrictedString">
          <xs:attribute name="label" use="optional"/>
        </xs:extension>
      </xs:simpleContent>
    </xs:complexType>
  </xs:element>
  <xs:element name="values">
    <xs:complexType>
      <xs:sequence>
        <xs:element minOccurs="0" maxOccurs="unbounded" ref="value"/>
      </xs:sequence>
      <xs:attribute name="class"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="value" type="xs:string"/>
  <xs:simpleType name="restrictedString">
    <xs:restriction base="xs:string">
      <xs:pattern value="[^~!@#;%^*+={}()\\|\\\\&gt;,]+"/>
    </xs:restriction>
  </xs:simpleType>
</xs:schema>
