Skip to content

Instantly share code, notes, and snippets.

@gabrielgreen
Created July 16, 2011 10:42
Show Gist options
  • Save gabrielgreen/1086252 to your computer and use it in GitHub Desktop.
Save gabrielgreen/1086252 to your computer and use it in GitHub Desktop.
Example XSD
<?xml version="1.0" encoding="utf-8"?>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Lead">
<xs:complexType>
<xs:sequence>
<xs:element name="Name" type="TName" />
<xs:element name="Interested" type="TBool" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:simpleType name="TName">
<xs:restriction base="xs:normalizedString">
<xs:maxLength value="128"/>
<xs:minLength value="1"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="TBool">
<xs:restriction base="xs:string">
<xs:enumeration value="Y"/>
<xs:enumeration value="N"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment