[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
MicroXSD for MicroXML - version 2010
- From: Stephen Green <stephengreenubl@gmail.com>
- To: xml-dev@lists.xml.org
- Date: Thu, 30 Dec 2010 14:10:26 +0000
A final '2010' version of my suggested 'MicroXSD' schema: attached and below.
This MicroXSD just supports local elements and attributes to support a MicroXML
profile with a single 'xmlns' namespace attribute (no namespace prefixes) in the
XML instances.
---------
With best regards and best wishes for 2011
Stephen D Green
<schema targetNamespace="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified"
version="MicroXSD-2010" xmlns="http://www.w3.org/2001/XMLSchema">
<!-- -->
<!-- This schema designates a suggested subset of W3C XML Schema -->
<!-- for use with the lightweight profile of XML called MicroXML [ref 1] -->
<!-- as discussed on XML-DEV mailing list December 2010 [ref 2]. -->
<!-- -->
<!-- Reference ref 1: http://blog.jclark.com/2010/12/more-on-microxml.html -->
<!-- Reference ref 2:
http://lists.xml.org/archives/xml-dev/201012/maillist.html -->
<!-- -->
<!-- Author: Stephen D Green (JLT Group Ltd), December 2010 -->
<!-- Website: www.stephengreenxml.org.uk -->
<!-- (c) Portions Copyright JLT Group Ltd 2010 -->
<!-- No restrictions are placed on use and adaptation of this schema
but no -->
<!-- guarantee is given of its quality or suitability for any purpose. -->
<!-- Those who use or adapt this schema do so at their own risk. -->
<!-- -->
<element name="schema">
<complexType>
<sequence>
<element name="element" form="qualified">
<complexType>
<choice>
<element name="complexType">
<complexType>
<sequence>
<element name="sequence" minOccurs="0">
<complexType>
<group ref="sequence_group" minOccurs="0"
maxOccurs="unbounded"></group>
</complexType>
</element>
<sequence>
<element name="attribute" minOccurs="0"
maxOccurs="unbounded">
<complexType>
<sequence>
<element name="simpleType">
<complexType>
<sequence>
<element name="restriction">
<complexType>
<sequence>
<element name="enumeration"
minOccurs="0"
maxOccurs="unbounded">
<complexType>
<attribute name="value"
type="string"
use="required">
</attribute>
</complexType>
</element>
</sequence>
<attribute ref="base"
use="optional"
default="string"></attribute>
</complexType>
</element>
</sequence>
</complexType>
</element>
</sequence>
<attribute name="use" use="optional">
<simpleType>
<restriction base="string">
<enumeration value="optional">
</enumeration>
<enumeration value="required">
</enumeration>
</restriction>
</simpleType>
</attribute>
<attribute name="name" type="NCName"
use="required"></attribute>
</complexType>
</element>
</sequence>
</sequence>
<attribute name="mixed" use="optional">
<simpleType>
<restriction base="string">
<enumeration value="true"></enumeration>
<enumeration value="false"></enumeration>
</restriction>
</simpleType>
</attribute>
</complexType>
</element>
<element name="simpleType">
<complexType>
<sequence>
<element name="restriction">
<complexType>
<sequence>
<element name="enumeration" minOccurs="0"
maxOccurs="unbounded">
<complexType>
<attribute name="value" type="string"
use="required"></attribute>
</complexType>
</element>
</sequence>
<attribute ref="base" use="optional"
default="string"></attribute>
</complexType>
</element>
</sequence>
</complexType>
</element>
</choice>
<attribute name="name" type="NCName" use="required">
</attribute>
</complexType>
</element>
</sequence>
<attribute name="version" type="string" use="optional">
</attribute>
<attribute name="attributeFormDefault" use="required"
fixed="unqualified"></attribute>
<attribute name="elementFormDefault" use="required"
fixed="qualified"></attribute>
<attribute name="targetNamespace" type="string"
use="optional"></attribute>
</complexType>
</element>
<group name="sequence_group">
<choice>
<element name="element" form="qualified">
<complexType>
<choice>
<element name="complexType">
<complexType>
<sequence>
<element name="sequence" minOccurs="0">
<complexType>
<group ref="sequence_group" minOccurs="0"
maxOccurs="unbounded"></group>
</complexType>
</element>
<sequence>
<element name="attribute" minOccurs="0"
maxOccurs="unbounded">
<complexType>
<sequence>
<element name="simpleType">
<complexType>
<sequence>
<element name="restriction">
<complexType>
<sequence>
<element name="enumeration"
minOccurs="0"
maxOccurs="unbounded">
<complexType>
<attribute name="value"
type="string"
use="required">
</attribute>
</complexType>
</element>
</sequence>
<attribute ref="base"
use="optional"
default="string"></attribute>
</complexType>
</element>
</sequence>
</complexType>
</element>
</sequence>
<attribute name="use" use="optional">
<simpleType>
<restriction base="string">
<enumeration value="optional">
</enumeration>
<enumeration value="required">
</enumeration>
</restriction>
</simpleType>
</attribute>
<attribute name="name" type="NCName"
use="required"></attribute>
</complexType>
</element>
</sequence>
</sequence>
<attribute name="mixed" use="optional">
<simpleType>
<restriction base="string">
<enumeration value="true"></enumeration>
<enumeration value="false"></enumeration>
</restriction>
</simpleType>
</attribute>
</complexType>
</element>
<element name="simpleType">
<complexType>
<sequence>
<element name="restriction">
<complexType>
<sequence>
<element name="enumeration" minOccurs="0"
maxOccurs="unbounded">
<complexType>
<attribute name="value" type="string"
use="required"></attribute>
</complexType>
</element>
</sequence>
<attribute ref="base" use="optional"
default="string"></attribute>
</complexType>
</element>
</sequence>
</complexType>
</element>
</choice>
<attribute name="name" type="NCName" use="required">
</attribute>
<attribute name="minOccurs" use="optional">
<simpleType>
<restriction base="string">
<enumeration value="0"></enumeration>
<enumeration value="1"></enumeration>
</restriction>
</simpleType>
</attribute>
<attribute name="maxOccurs" use="optional">
<simpleType>
<restriction base="string">
<enumeration value="1"></enumeration>
<enumeration value="unbounded"></enumeration>
</restriction>
</simpleType>
</attribute>
</complexType>
</element>
</choice>
</group>
<attribute name="base">
<simpleType>
<restriction base="string">
<!-- Suggested, default datatype enumerations are listed as
comments below -->
<!-- and may be uncommented as required. Alternative datatype
enumerations -->
<!-- can be determined for individual contexts and, if
preferred, defined -->
<!-- externally to this schema e.g. with OASIS-open.org Genericode -->
<!--
<enumeration value="string"></enumeration>
<enumeration value="decimal"></enumeration>
<enumeration value="integer"></enumeration>
<enumeration value="date"></enumeration>
<enumeration value="dateTime"></enumeration>
<enumeration value="boolean"></enumeration>
<enumeration value="base64Binary"></enumeration>
<enumeration value="ID"></enumeration>
<enumeration value="IDREF"></enumeration>
-->
</restriction>
</simpleType>
</attribute>
</schema>
MicroXSD-2010.xsd
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]