Last Updated: 2004

	<!-- just like html -->
	but consider using
	  <documentation xml:lang="en">
	   Ransom demand schema
	   Copyright 2000 All rights reserved.
	for docuementation type comments

	<include schemaLocation=""/>
	Note that the namespace of the importing and imported schemas must be identicle. If they are not identical, use import instead (and correctly prefix every external reference thereafter)

Simple Types:
	Cannot contain elements
	Cannot have attributes

	<xsd:simpleType name="USState">
	  <xsd:restriction base="xsd:string">
	    <xsd:enumeration value="AK"/>
	    <xsd:enumeration value="AL"/>
	    <xsd:enumeration value="AR"/>
	    <!-- and so on ... -->

<csd:element name="someName" type="xsd:anyType/>	allows anything. In fact xsd:anyType is the default for type.

	Define a block of XML you want to reference later as follows:
		<xsd:group name="customerAddress">
		    <xsd:element name="shippingAddress" type="Address"/>
		    <xsd:element name="billingAddress" type="Address"/>

	Then ref it later (see gift example)

	Sequence, Choice, All

	Sequence: Elements must appear in the order they are listed within the sequence block
	Choice: Only one of the elements in the choice block may appear. Choice must be nested in a sequence block
	All: Any of the elements in the all block may appear and may appear in any order. All can only be used directly below the complexType / simpleType header and can't be nested.


		<xsd:complexType name="Gift">
		   <xsd:group ref="socks"/>
		   <xsd:group ref="bookToken"/>
		  <xsd:group ref="customerAddress"/>
		  <xsd:element name="Message" type="xsd:string" minOccurs="0"/>
		 <xsd:attribute name="deliveryDate" type="xsd:date"/>


Complex Types:
	Can contain elements
	Can have attributes, but these must appear after the sequence / choice etc tags (seems to be a .NET 2.0 thing)

	<xsd:complexType name="UKAddress">
		<xsd:element name="line1" type="xsd:string"/>
		<xsd:element name="line2" type="xsd:string" minOccurs="0"/>
		<xsd:element name="town" type="xsd:string"/>
		<xsd:element name="count" type="xsd:string"/>
	    <xsd:attribute name = "version" type="xsd:decimal"/>

	minOccurs / maxOccurs apply to elements only and equal "1" if not specified. Use maxOccurs="unbounded" to set no upper limit
	use="required|optional|prohibited" provides the same functionality for attributes
	default="default value"	applies both to elements and attributes. An attribute cannot have a default and use="required|prohibited" or have the fixed attribute as well
	fixed="xyz" attribute only. Specifies that if the attribute is present, its value must be xyz
 	nillable="true"	(elements only) adds 'null' support (nil in XML terms) for the element. An element can be nil while still having attribute data.
	abstrace="true" (elements only) just like c#. Only dervivates of this element can actually appear in the XML document
	form = "qualified | unqualified" specifies whether the element needs to be qualified by a namespace
	id = "???" Optional
	ref = "some named attribute"

The 'any' tag can be used to include arbitarty elements:
	  <element name="htmlExample">
	      <any namespace=""
	           minOccurs="1" maxOccurs="unbounded"

or text [example taken from]:
	<xsd:complexType name="text">
	 <xsd:complexContent mixed="true">
	  <xsd:restriction base="xsd:anyType">
	    <xsd:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
	   <xsd:attribute ref="xml:lang"/>

<xs:attribute name="twocharandanumber"><xs:simpleType>
  <xs:restriction base="xs:string">
    <xs:pattern value="[A-Z][A-Z][0-9]"/>

Additionally, there is support for the followin:
	Combinations of elements that are legal and illegal (based on path queries)

	XslTransform xslt = new XslTransform();
	XPathDocument xsltDataIn = new XPathDocument("Result.xml");
	XmlTextWriter xsltDataOut = new XmlTextWriter("ResultDataGrid.xml", System.Text.Encoding.UTF8);
	xslt.Transform(xsltDataIn, null, xsltDataOut, null);