<?xml version="1.0" encoding="utf-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="qualified">
<xs:simpleType name="content">
<xs:restriction base="xs:string">
<xs:whiteSpace value="collapse"/>
<xs:minLength value="1" />
</xs:restriction>
</xs:simpleType>
<!-- Notice that restriction base type is our own datatype "content" -->
<xs:simpleType name="title">
<xs:restriction base="content">
<xs:maxLength value="255" />
</xs:restriction>
</xs:simpleType>
<xs:element name="article">
<xs:complexType>
<xs:sequence>
<xs:element name="publishdate" type="xs:date" />
<xs:element name="title" type="xs:string" />
<xs:element name="content" type="xs:string" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
|