<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- XML Schema for PDFlib TET
     (c) PDFlib GmbH 2009-2012     www.pdflib.com

  Known restrictions:
  - The following conditions are not currently detected by the schema although they are disallowed:
    - Content mixes Word and Glyph elements
-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:tet="http://www.pdflib.com/XML/TET3/TET-3.0" targetNamespace="http://www.pdflib.com/XML/TET3/TET-3.0" elementFormDefault="qualified" version="4.1">
	<xs:element name="ColorSpace">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="tet:Exception" minOccurs="0"/>
				<xs:element name="Colorant" minOccurs="0" maxOccurs="unbounded">
					<xs:complexType>
						<xs:attribute name="name" type="xs:string" use="required"/>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
			<xs:attribute name="alternate" type="tet:colorSpaceId" use="optional">
				<xs:annotation>
					<xs:documentation>Only for name=Separation and DeviceN.</xs:documentation>
				</xs:annotation>
			</xs:attribute>
			<xs:attribute name="base" type="tet:colorSpaceId" use="optional"/>
			<xs:attribute name="components" type="xs:positiveInteger" use="required"/>
			<xs:attribute name="id" type="tet:colorSpaceId" use="required"/>
			<xs:attribute name="name" use="required">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="CalGray"/>
						<xs:enumeration value="CalRGB"/>
						<xs:enumeration value="DeviceCMYK"/>
						<xs:enumeration value="DeviceGray"/>
						<xs:enumeration value="DeviceN"/>
						<xs:enumeration value="DeviceRGB"/>
						<xs:enumeration value="ICCBased"/>
						<xs:enumeration value="Indexed"/>
						<xs:enumeration value="Lab"/>
						<xs:enumeration value="Separation"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:element name="Content">
        <xs:complexType mixed="false">
			<xs:group ref="tet:ContentGroup" minOccurs="0" maxOccurs="unbounded"/>
			<xs:attribute name="granularity" use="required">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="glyph"/>
						<xs:enumeration value="line"/>
						<xs:enumeration value="page"/>
						<xs:enumeration value="word"/>
						<xs:enumeration value="wordplus"/>
						<xs:enumeration value="zone"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
			<xs:attribute name="dehyphenation" type="xs:boolean" use="optional">
				<xs:annotation>
					<xs:documentation>TET 4.0</xs:documentation></xs:annotation></xs:attribute>
			<xs:attribute name="dropcap" type="xs:boolean" use="optional">
				<xs:annotation>
					<xs:documentation>TET 4.0</xs:documentation>
				</xs:annotation></xs:attribute>
			<xs:attribute name="font" type="xs:boolean" use="required"/>
			<xs:attribute name="geometry" type="xs:boolean" use="required"/>
			<xs:attribute name="shadow" type="xs:boolean" use="optional">
				<xs:annotation>
					<xs:documentation>TET 4.0</xs:documentation></xs:annotation></xs:attribute>
			<xs:attribute name="sub" type="xs:boolean" use="optional">
				<xs:annotation>
					<xs:documentation>TET 4.0</xs:documentation></xs:annotation></xs:attribute>
			<xs:attribute name="sup" type="xs:boolean" use="optional">
				<xs:annotation>
					<xs:documentation>TET 4.0</xs:documentation></xs:annotation></xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:group name="ContentGroup">
		<xs:choice>
			<xs:element name="Word" maxOccurs="unbounded">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="Text" type="tet:text"/>
						<xs:element name="Box" maxOccurs="unbounded">
							<xs:complexType>
								<xs:sequence>
									<xs:element ref="tet:Glyph" minOccurs="0" maxOccurs="unbounded"/>
								</xs:sequence>
								<xs:attributeGroup ref="tet:BoxAttr"/>
							</xs:complexType>
						</xs:element>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="Line" maxOccurs="unbounded">
				<xs:complexType>
                    <xs:annotation>
                    	<xs:documentation>TET 4.0: Line may also contain Word elements</xs:documentation>
                    </xs:annotation>
                    <xs:choice>
						<xs:element name="Text" type="tet:text"/>
						<xs:element name="Word" maxOccurs="unbounded">
							<xs:complexType>
								<xs:sequence>
									<xs:element name="Text" type="tet:text"/>
									<xs:element name="Box" maxOccurs="unbounded">
										<xs:complexType>
											<xs:sequence>
												<xs:element ref="tet:Glyph" minOccurs="0" maxOccurs="unbounded"/>
											</xs:sequence>
											<xs:attributeGroup ref="tet:BoxAttr"/>
										</xs:complexType>
									</xs:element>
								</xs:sequence>
							</xs:complexType>
						</xs:element>
					</xs:choice>
				</xs:complexType>
			</xs:element>
			<xs:element name="Para" maxOccurs="unbounded">
				<xs:complexType>
					<xs:choice>
						<xs:group ref="tet:ContentGroup" minOccurs="0" maxOccurs="unbounded"/>
						<xs:element name="Text" type="tet:text" minOccurs="0"/>
					</xs:choice>
				</xs:complexType>
			</xs:element>
			<xs:element name="Table" maxOccurs="unbounded">
				<xs:complexType>
					<xs:sequence>
						<xs:element name="Row" maxOccurs="unbounded">
							<xs:complexType>
								<xs:sequence>
									<xs:element name="Cell" maxOccurs="unbounded">
										<xs:complexType>
											<xs:group ref="tet:ContentGroup" minOccurs="0" maxOccurs="unbounded"/>
											<xs:attribute name="colSpan" type="xs:positiveInteger" default="1"/>
										</xs:complexType>
									</xs:element>
								</xs:sequence>
							</xs:complexType>
						</xs:element>
					</xs:sequence>
				</xs:complexType>
			</xs:element>
			<xs:element name="Zone" maxOccurs="unbounded">
				<xs:complexType>
					<xs:group ref="tet:ContentGroup" maxOccurs="unbounded"/>
				</xs:complexType>
			</xs:element>
			<xs:element name="PlacedImage" maxOccurs="unbounded">
				<xs:complexType>
					<xs:attribute name="alpha" use="optional" default="0">
						<xs:simpleType>
							<xs:restriction base="xs:double">
								<xs:minExclusive value="-180"/>
								<xs:maxInclusive value="180"/>
							</xs:restriction>
						</xs:simpleType>
					</xs:attribute>
					<xs:attribute name="beta" use="optional" default="0">
						<xs:simpleType>
							<xs:restriction base="xs:double">
								<xs:minExclusive value="-180"/>
								<xs:maxInclusive value="180"/>
							</xs:restriction>
						</xs:simpleType>
					</xs:attribute>
					<xs:attribute name="height" use="required">
						<xs:simpleType>
							<xs:restriction base="xs:double">
								<xs:minInclusive value="0"/>
							</xs:restriction>
						</xs:simpleType>
					</xs:attribute>
					<xs:attribute name="image" type="tet:imageId" use="required"/>
					<xs:attribute name="width" use="required">
						<xs:simpleType>
							<xs:restriction base="xs:double">
								<xs:minInclusive value="0"/>
							</xs:restriction>
						</xs:simpleType>
					</xs:attribute>
					<xs:attribute name="x" use="required">
						<xs:simpleType>
							<xs:restriction base="xs:double"/>
						</xs:simpleType>
					</xs:attribute>
					<xs:attribute name="y" use="required">
						<xs:simpleType>
							<xs:restriction base="xs:double"/>
						</xs:simpleType>
					</xs:attribute>
				</xs:complexType>
			</xs:element>
			<xs:element ref="tet:Glyph" maxOccurs="unbounded"/>
		</xs:choice>
	</xs:group>
	<xs:element name="Creation">
		<xs:complexType>
			<xs:attribute name="platform" use="required">
				<xs:simpleType>
					<xs:restriction base="xs:string"/>
				</xs:simpleType>
			</xs:attribute>
			<xs:attribute name="tetVersion" use="required">
				<xs:simpleType>
					<xs:restriction base="xs:string"/>
				</xs:simpleType>
			</xs:attribute>
			<xs:attribute name="date" type="xs:dateTime" use="required"/>
		</xs:complexType>
	</xs:element>
	<xs:group name="DocInfoGroup">
		<xs:sequence>
			<xs:element name="Author" type="xs:string" minOccurs="0"/>
			<xs:element name="CreationDate" type="xs:dateTime" minOccurs="0"/>
			<xs:element name="Creator" type="xs:string" minOccurs="0"/>
			<xs:element name="GTS_PDFXConformance" type="xs:string" minOccurs="0"/>
			<xs:element name="GTS_PDFXVersion" type="xs:string" minOccurs="0"/>
			<xs:element name="GTS_PPMLVDXConformance" type="xs:string" minOccurs="0"/>
			<xs:element name="GTS_PPMLVDXVersion" type="xs:string" minOccurs="0"/>
			<xs:element name="ISO_PDFEVersion" type="xs:string" minOccurs="0"/>
			<xs:element name="Keywords" type="xs:string" minOccurs="0"/>
			<xs:element name="ModDate" type="xs:dateTime" minOccurs="0"/>
			<xs:element name="Producer" type="xs:string" minOccurs="0"/>
			<xs:element name="Subject" type="xs:string" minOccurs="0"/>
			<xs:element name="Title" type="xs:string" minOccurs="0"/>
			<xs:element name="Trapped" type="xs:string" minOccurs="0"/>
			<xs:element name="Custom" minOccurs="0" maxOccurs="unbounded">
				<xs:complexType>
					<xs:simpleContent>
						<xs:extension base="xs:string">
							<xs:attribute name="key" use="required">
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:minLength value="1"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:attribute>
						</xs:extension>
					</xs:simpleContent>
				</xs:complexType>
			</xs:element>
			<xs:element name="CustomBinary" minOccurs="0" maxOccurs="unbounded">
				<xs:complexType>
					<xs:simpleContent>
						<xs:extension base="xs:hexBinary">
							<xs:attribute name="key" use="required">
								<xs:simpleType>
									<xs:restriction base="xs:string">
										<xs:minLength value="1"/>
									</xs:restriction>
								</xs:simpleType>
							</xs:attribute>
						</xs:extension>
					</xs:simpleContent>
				</xs:complexType>
			</xs:element>
		</xs:sequence>
	</xs:group>
	<xs:element name="Document">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="Encryption" minOccurs="0">
					<xs:complexType>
						<xs:attribute name="keylength" use="required">
							<xs:simpleType>
								<xs:restriction base="xs:integer">
									<xs:minInclusive value="40" />
									<xs:maxInclusive value="256" />
								</xs:restriction>
							</xs:simpleType>
						</xs:attribute>
						<xs:attribute name="algorithm" use="required">
							<xs:annotation>
								<xs:documentation>
									TET 4.1: extended to algorithm 11
								</xs:documentation>
							</xs:annotation>
							<xs:simpleType>
								<xs:annotation>
									<xs:documentation>
										TET 4.1: added values 8-11
									</xs:documentation>
								</xs:annotation>
								<xs:restriction base="xs:integer">
									<xs:minInclusive value="-1" />
									<xs:maxInclusive value="11" />
								</xs:restriction>
							</xs:simpleType>
						</xs:attribute>
						<xs:attribute name="description"
							use="required">
							<xs:annotation>
								<xs:documentation>
									TET 4.1: added enumerations for
									algorithm 8-11
								</xs:documentation>
							</xs:annotation>
							<xs:simpleType>
								<xs:annotation>
									<xs:documentation>
										TET 4.1: added description for
										values 8-11
									</xs:documentation>
								</xs:annotation>
								<xs:restriction base="xs:string">
									<xs:enumeration
										value="Unknown encryption" />
									<xs:enumeration
										value="No encryption" />
									<xs:enumeration
										value="40-bit RC4 (Acrobat 2-4)" />
									<xs:enumeration
										value="128-bit RC4 (Acrobat 5)" />
									<xs:enumeration
										value="128-bit RC4 (Acrobat 6)" />
									<xs:enumeration
										value="128-bit AES (Acrobat 7)" />
									<xs:enumeration
										value="Public key on top of 128-bit RC4 (Acrobat 5)" />
									<xs:enumeration
										value="Public key on top of 128-bit AES (Acrobat 7)" />
									<xs:enumeration
										value="Adobe Policy Server (Acrobat 7)" />
									<xs:enumeration
										value="Adobe Digital Editions (EBX" />
									<xs:enumeration
										value="256-bit AES (Acrobat 9)" />
									<xs:enumeration
										value="Public key on top of 256-bit AES (Acrobat 9" />
									<xs:enumeration
										value="256-bit AES (Acrobat X)" />
								</xs:restriction>
							</xs:simpleType>
						</xs:attribute>
						<xs:attribute name="masterpassword"
							type="xs:boolean" use="required" />
						<xs:attribute name="userpassword"
							type="xs:boolean" use="required" />
						<xs:attribute name="attachmentpassword"
							type="xs:boolean" use="optional">
							<xs:annotation>
								<xs:documentation>
									TET 4.1
								</xs:documentation>
							</xs:annotation>
						</xs:attribute>
						<xs:attribute name="noprint" type="xs:boolean"
							default="false" />
						<xs:attribute name="nomodify" type="xs:boolean"
							default="false" />
						<xs:attribute name="nocopy" type="xs:boolean"
							default="false" />
						<xs:attribute name="noannots" type="xs:boolean"
							default="false" />
						<xs:attribute name="noassemble"
							type="xs:boolean" default="false" />
						<xs:attribute name="noforms" type="xs:boolean"
							default="false" />
						<xs:attribute name="noaccessible"
							type="xs:boolean" default="false" />
						<xs:attribute name="nohiresprint"
							type="xs:boolean" default="false" />
						<xs:attribute name="plainmetadata"
							type="xs:boolean" default="false" />

					</xs:complexType>
				</xs:element>
				<xs:element name="DocInfo" minOccurs="0">
					<xs:complexType>
						<xs:group ref="tet:DocInfoGroup" minOccurs="0" />
					</xs:complexType>
					<xs:key name="CustomKey">
						<xs:annotation>
							<xs:documentation>
								All Custom and CustomBinary elements
								within the DocInfo element must be
								uniquely identified by their @key
								element.
							</xs:documentation>
						</xs:annotation>
						<xs:selector
							xpath="tet:Custom | tet:CustomBinary" />
						<xs:field xpath="@key" />
					</xs:key>
				</xs:element>
				<xs:element ref="tet:Metadata" minOccurs="0" />
				<xs:element ref="tet:Options" minOccurs="0" />
				<xs:element ref="tet:Exception" minOccurs="0" />
				<xs:element name="Pages">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="Page"
								maxOccurs="unbounded">
								<xs:complexType>
									<xs:sequence>
										<xs:element ref="tet:Options"
											minOccurs="0" />
										<xs:element ref="tet:Content" />
										<xs:element ref="tet:Exception"
											minOccurs="0" />
									</xs:sequence>
									<xs:attribute name="number"
										use="required">
										<xs:simpleType>
											<xs:restriction
												base="xs:string" />
										</xs:simpleType>
									</xs:attribute>
									<xs:attribute name="height"
										type="xs:double" use="required" />
									<xs:attribute name="width"
										type="xs:double" use="required" />
									<xs:attribute name="topdown"
										type="xs:boolean" use="optional" default="false">
									</xs:attribute>
								</xs:complexType>
							</xs:element>
							<xs:element ref="tet:Resources"
								minOccurs="0" />
						</xs:sequence>
					</xs:complexType>
					<xs:key name="FontKey">
						<xs:annotation>
							<xs:documentation>
								Within the Pages element the Font
								elements are identified uniquely by
								their @id attribute.
							</xs:documentation>
						</xs:annotation>
						<xs:selector
							xpath="tet:Resources/tet:Fonts/tet:Font" />
						<xs:field xpath="@id" />
					</xs:key>
					<xs:keyref name="FontRef" refer="tet:FontKey">
						<xs:annotation>
							<xs:documentation>
								All Glyph elements within the Pages
								element refer to an existing Font
								element with their @font attribute.
							</xs:documentation>
						</xs:annotation>
						<xs:selector xpath=".//tet:Glyph" />
						<xs:field xpath="@font" />
					</xs:keyref>
					<xs:key name="ColorSpaceKey">
						<xs:annotation>
							<xs:documentation>
								Within the Pages element the ColorSpace
								elements are identified uniquely by
								their @id attribute.
							</xs:documentation>
						</xs:annotation>
						<xs:selector
							xpath="tet:Resources/tet:ColorSpaces/tet:ColorSpace" />
						<xs:field xpath="@id" />
					</xs:key>
					<xs:keyref name="ColorSpaceRef"
						refer="tet:ColorSpaceKey">
						<xs:annotation>
							<xs:documentation>
								All Image elements within the Pages
								element refer to an existing ColorSpace
								element with their @colorspace
								attribute.
							</xs:documentation>
						</xs:annotation>
						<xs:selector
							xpath="tet:Resources/tet:Images/tet:Image" />
						<xs:field xpath="@colorspace" />
					</xs:keyref>
					<xs:keyref name="BaseColorSpaceRef"
						refer="tet:ColorSpaceKey">
						<xs:annotation>
							<xs:documentation>
								A ColorSpace can refer to an existing
								base ColorSpace.
							</xs:documentation>
						</xs:annotation>
						<xs:selector
							xpath="tet:Resources/tet:ColorSpaces/tet:ColorSpace" />
						<xs:field xpath="@base" />
					</xs:keyref>
					<xs:keyref name="AlternateColorSpaceRef"
						refer="tet:ColorSpaceKey">
						<xs:annotation>
							<xs:documentation>
								A ColorSpace can refer to an existing
								alternate ColorSpace.
							</xs:documentation>
						</xs:annotation>
						<xs:selector
							xpath="tet:Resources/tet:ColorSpaces/tet:ColorSpace" />
						<xs:field xpath="@alternate" />
					</xs:keyref>
					<xs:key name="ImageKey">
						<xs:annotation>
							<xs:documentation>
								Within the Pages element the Image
								elements are identified uniquely by
								their @id attribute.
							</xs:documentation>
						</xs:annotation>
						<xs:selector
							xpath="tet:Resources/tet:Images/tet:Image" />
						<xs:field xpath="@id" />
					</xs:key>
					<xs:keyref name="ImageRef" refer="tet:ImageKey">
						<xs:annotation>
							<xs:documentation>
								All PlacedImage elements within the
								Pages element refer to an existing Image
								element with their @image attribute.
							</xs:documentation>
						</xs:annotation>
						<xs:selector xpath=".//tet:PlacedImage" />
						<xs:field xpath="@image" />
					</xs:keyref>
					<xs:keyref name="ImageMaskRef"
						refer="tet:ImageKey">
						<xs:annotation>
							<xs:documentation>
								An Image can refer to another Image by
								its @mask attribute.
							</xs:documentation>
						</xs:annotation>
						<xs:selector
							xpath="tet:Resources/tet:Images/tet:Image" />
						<xs:field xpath="@mask" />
					</xs:keyref>
				</xs:element>
				<xs:element name="Attachments" minOccurs="0">
					<xs:complexType>
						<xs:choice>
							<xs:element ref="tet:Exception"
								minOccurs="0" />
							<xs:sequence minOccurs="0">
								<xs:element name="Attachment"
									maxOccurs="unbounded">
									<xs:complexType>
										<xs:choice minOccurs="0">
											<xs:element
												ref="tet:Exception" minOccurs="0" />
											<xs:element
												ref="tet:Document" minOccurs="0" />
										</xs:choice>
										<xs:attribute name="name"
											use="required">
											<xs:simpleType>
												<xs:restriction
													base="xs:string">
													<xs:minLength
														value="1" />
												</xs:restriction>
											</xs:simpleType>
										</xs:attribute>
										<xs:attribute name="level"
											use="required">
											<xs:simpleType>
												<xs:restriction
													base="xs:string">
													<xs:enumeration
														value="document" />
													<xs:enumeration
														value="page" />
												</xs:restriction>
											</xs:simpleType>
										</xs:attribute>
										<xs:attribute name="pagenumber"
											type="xs:positiveInteger" use="optional" />
									</xs:complexType>
								</xs:element>
							</xs:sequence>
						</xs:choice>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
			<xs:attribute name="filename" use="required">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:minLength value="1" />
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
			<xs:attribute name="pageCount" type="xs:positiveInteger"
				use="required" />
			<xs:attribute name="filesize" type="xs:positiveInteger"
				use="required" />
			<xs:attribute name="linearized" use="required">
				<xs:simpleType>
					<xs:restriction base="xs:boolean" />
				</xs:simpleType>
			</xs:attribute>
			<xs:attribute name="pdfVersion" use="required">
				<xs:simpleType>
					<xs:restriction base="xs:string" />
				</xs:simpleType>
			</xs:attribute>
			<xs:attribute name="pdfa" use="optional" default="none">
				<xs:annotation>
					<xs:documentation>TET 4.0: added enumerations for PDF/A-2; TET 4.1: added enumerations for PDF/A-3
					</xs:documentation>
				</xs:annotation>
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="none" />
						<xs:enumeration value="PDF/A-1a:2005" />
						<xs:enumeration value="PDF/A-1b:2005" />
						<xs:enumeration value="PDF/A-2a" />
						<xs:enumeration value="PDF/A-2b" />
						<xs:enumeration value="PDF/A-2u" />
						<xs:enumeration value="PDF/A-3a"></xs:enumeration>
						<xs:enumeration value="PDF/A-3b"></xs:enumeration>
						<xs:enumeration value="PDF/A-3u"></xs:enumeration>
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
			<xs:attribute name="pdfe" use="optional" default="none">
				<xs:annotation>
					<xs:documentation>TET 4.0; TET 4.1: added PDF/E-2
					</xs:documentation>
				</xs:annotation>
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="none" />
						<xs:enumeration value="PDF/E-1" />
						<xs:enumeration value="PDF/E-2"></xs:enumeration>
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
			<xs:attribute name="pdfx" use="optional" default="none">
				<xs:annotation>
					<xs:documentation>
						TET 4.1: added enumeration of known values
					</xs:documentation>
				</xs:annotation>
				<xs:simpleType>
					<xs:annotation>
						<xs:documentation></xs:documentation>
					</xs:annotation>
					<xs:restriction base="xs:string">
						<xs:enumeration value="none"></xs:enumeration>
						<xs:enumeration value="PDF/X-1:2001"></xs:enumeration>
						<xs:enumeration value="PDF/X-1a:2001"></xs:enumeration>
						<xs:enumeration value="PDF/X-1a:2003"></xs:enumeration>
						<xs:enumeration value="PDF/X-2:2003"></xs:enumeration>
						<xs:enumeration value="PDF/X-3:2002"></xs:enumeration>
						<xs:enumeration value="PDF/X-3:2003"></xs:enumeration>
						<xs:enumeration value="PDF/X-4"></xs:enumeration>
						<xs:enumeration value="PDF/X-4p"></xs:enumeration>
						<xs:enumeration value="PDF/X-5g"></xs:enumeration>
						<xs:enumeration value="PDF/X-5n"></xs:enumeration>
						<xs:enumeration value="PDF/X-5p"></xs:enumeration>

					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
			<xs:attribute name="tagged" type="xs:boolean" use="optional"
				default="false" />
			<xs:attribute name="pdfvt" use="optional" default="none">
				<xs:annotation>
					<xs:documentation>TET 4.1</xs:documentation>
				</xs:annotation>
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="none"></xs:enumeration>
						<xs:enumeration value="PDF/VT-1"></xs:enumeration>
						<xs:enumeration value="PDF/VT-2"></xs:enumeration>
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
			<xs:attribute name="pdfua" use="optional" default="none">
                <xs:annotation>
                	<xs:documentation>TET 4.1</xs:documentation>
                </xs:annotation>
                <xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="none"></xs:enumeration>
						<xs:enumeration value="PDF/UA-1"></xs:enumeration>
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:element name="Exception">
		<xs:complexType>
			<xs:simpleContent>
				<xs:extension base="xs:string">
					<xs:attribute name="errnum" type="xs:positiveInteger" use="required"/>
				</xs:extension>
			</xs:simpleContent>
		</xs:complexType>
	</xs:element>
	<xs:element name="Glyph">
		<xs:complexType>
			<xs:simpleContent>
				<xs:extension base="xs:string">
					<xs:attribute name="x" type="xs:double" use="required"/>
					<xs:attribute name="y" type="xs:double" use="required"/>
					<xs:attribute name="width" type="xs:double" use="required"/>
					<xs:attributeGroup ref="tet:TextAttr"/>
				</xs:extension>
			</xs:simpleContent>
		</xs:complexType>
	</xs:element>
	<xs:element name="Metadata">
		<xs:complexType>
			<xs:choice>
				<xs:any namespace="##other" processContents="skip"/>
				<xs:sequence>
					<xs:element ref="tet:Exception"/>
					<xs:element name="InvalidMetadata" type="xs:hexBinary"/>
				</xs:sequence>
			</xs:choice>
		</xs:complexType>
	</xs:element>
	<xs:element name="Resources">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="Fonts" minOccurs="0">
					<xs:complexType>
						<xs:choice>
							<xs:element ref="tet:Exception" minOccurs="0"/>
							<xs:sequence minOccurs="0">
								<xs:element name="Font" maxOccurs="unbounded">
									<xs:complexType>
										<xs:sequence>
											<xs:element
												ref="tet:Exception" minOccurs="0" />
											<xs:element
												ref="tet:Metadata" minOccurs="0" />
										</xs:sequence>
										<xs:attribute name="embedded"
											type="xs:boolean" use="required" />
										<xs:attribute name="fullname"
											use="optional">
											<xs:annotation>
												<xs:documentation>
													TET 4.0
												</xs:documentation>
											</xs:annotation>
											<xs:simpleType>
												<xs:restriction
													base="xs:string">
													<xs:minLength
														value="1" />
												</xs:restriction>
											</xs:simpleType>
										</xs:attribute>
										<xs:attribute name="id"
											type="tet:fontId" use="required" />
										<xs:attribute name="type"
											use="required">
											<xs:simpleType>
												<xs:restriction
													base="xs:string">
													<xs:enumeration
														value="(unknown)" />
													<xs:enumeration
														value="Composite" />
													<xs:enumeration
														value="Multiple Master" />
													<xs:enumeration
														value="OpenType" />
													<xs:enumeration
														value="TrueType" />
													<xs:enumeration
														value="TrueType (CID)" />
													<xs:enumeration
														value="Type 1" />
													<xs:enumeration
														value="Type 1 (CID)" />
													<xs:enumeration
														value="Type 1 CFF" />
													<xs:enumeration
														value="Type 1 CFF (CID)" />
													<xs:enumeration
														value="Type 3" />
												</xs:restriction>
											</xs:simpleType>
										</xs:attribute>
										<xs:attribute name="name"
											use="required">
											<xs:simpleType>
												<xs:restriction
													base="xs:string">
													<xs:minLength
														value="1" />
												</xs:restriction>
											</xs:simpleType>
										</xs:attribute>
										<xs:attribute name="vertical"
											type="xs:boolean" use="optional" default="false" />
										<xs:attribute name="ascender"
											type="xs:float" use="optional">
											<xs:annotation>
												<xs:documentation>
													TET 4.1
												</xs:documentation>
											</xs:annotation>
										</xs:attribute>
										<xs:attribute name="capheight"
											type="xs:float" use="optional">
											<xs:annotation>
												<xs:documentation>
													TET 4.1
												</xs:documentation>
											</xs:annotation>
										</xs:attribute>
										<xs:attribute name="italicangle"
											type="xs:float" use="optional">
											<xs:annotation>
												<xs:documentation>
													TET 4.1
												</xs:documentation>
											</xs:annotation>
										</xs:attribute>
										<xs:attribute name="descender"
											type="xs:float" use="optional">
											<xs:annotation>
												<xs:documentation>
													TET 4.1
												</xs:documentation>
											</xs:annotation>
										</xs:attribute>
										<xs:attribute name="weight" use="optional">
											<xs:annotation>
												<xs:documentation>
													TET 4.1
												</xs:documentation>
											</xs:annotation>
											<xs:simpleType>
												<xs:restriction
													base="xs:float">

													<xs:minInclusive
														value="0">
													</xs:minInclusive>

													<xs:maxInclusive
														value="900">
													</xs:maxInclusive>
												</xs:restriction>
											</xs:simpleType>
										</xs:attribute>
										<xs:attribute
											name="xheight" type="xs:float" use="optional">
                                            <xs:annotation>
                                            	<xs:documentation>TET 4.1</xs:documentation>
                                            </xs:annotation>
										</xs:attribute>
									</xs:complexType>
								</xs:element>
							</xs:sequence>
						</xs:choice>
					</xs:complexType>
				</xs:element>
				<xs:element name="Images" minOccurs="0">
					<xs:complexType>
						<xs:choice>
							<xs:element ref="tet:Exception" minOccurs="0"/>
							<xs:sequence minOccurs="0">
								<xs:element name="Image" maxOccurs="unbounded">
									<xs:complexType>
										<xs:sequence>
											<xs:element ref="tet:Exception" minOccurs="0"/>
											<xs:element ref="tet:Metadata" minOccurs="0"/>
										</xs:sequence>
										<xs:attribute name="bitsPerComponent" use="required">
											<xs:simpleType>
												<xs:restriction base="xs:integer">
													<xs:enumeration value="-1"/>
													<xs:enumeration value="1"/>
													<xs:enumeration value="2"/>
													<xs:enumeration value="4"/>
													<xs:enumeration value="8"/>
													<xs:enumeration value="16"/>
												</xs:restriction>
											</xs:simpleType>
										</xs:attribute>
										<xs:attribute name="colorspace" type="tet:colorSpaceId" use="optional"/>
										<xs:attribute name="extractedAs" use="optional" default="unknown">
											<xs:simpleType>
												<xs:restriction
													base="xs:string">
													<xs:enumeration
														value=".jpg" />
													<xs:enumeration
														value=".jpx" />
													<xs:enumeration
														value=".tif" />
													<xs:enumeration
														value=".raw" />
													<xs:enumeration
														value="unknown">
													</xs:enumeration>
												</xs:restriction>
											</xs:simpleType>
										</xs:attribute>
										<xs:attribute name="height" type="xs:positiveInteger" use="required"/>
										<xs:attribute name="id" type="tet:imageId" use="required"/>
										<xs:attribute name="mask" type="tet:imageId" use="optional"/>
										<xs:attribute name="maskonly" type="xs:boolean" use="optional" default="false"/>
										<xs:attribute name="mergetype" use="optional" default="normal">
											<xs:simpleType>
												<xs:restriction base="xs:string">
													<xs:enumeration value="normal"/>
													<xs:enumeration value="artificial"/>
												</xs:restriction>
											</xs:simpleType>
										</xs:attribute>
										<xs:attribute name="width" type="xs:positiveInteger" use="required"/>
									</xs:complexType>
								</xs:element>
							</xs:sequence>
						</xs:choice>
					</xs:complexType>
				</xs:element>
				<xs:element name="ColorSpaces" minOccurs="0">
					<xs:complexType>
						<xs:choice>
							<xs:element ref="tet:Exception" minOccurs="0"/>
							<xs:sequence minOccurs="0">
								<xs:element ref="tet:ColorSpace" maxOccurs="unbounded"/>
							</xs:sequence>
						</xs:choice>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
		</xs:complexType>
	</xs:element>
	<xs:element name="Options" type="xs:string"/>
	<xs:element name="TET">
		<xs:complexType>
			<xs:sequence>
				<xs:element ref="tet:Creation"/>
				<xs:element ref="tet:Document"/>
				<xs:element ref="tet:Exception" minOccurs="0"/>
			</xs:sequence>
			<xs:attribute name="version" use="required">
				<xs:simpleType>
					<xs:restriction base="xs:string">
						<xs:enumeration value="3"/>
						<xs:enumeration value="4.0"/>
						<xs:enumeration value="4.1"/>
					</xs:restriction>
				</xs:simpleType>
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:attributeGroup name="BoxAttr">
		<xs:attribute name="llx" type="xs:double" use="required"/>
		<xs:attribute name="lly" type="xs:double" use="required"/>
		<xs:attribute name="urx" type="xs:double" use="required"/>
		<xs:attribute name="ury" type="xs:double" use="required"/>
		<xs:attribute name="ulx" type="xs:double" use="optional"/>
		<xs:attribute name="uly" type="xs:double" use="optional"/>
		<xs:attribute name="lrx" type="xs:double" use="optional"/>
		<xs:attribute name="lry" type="xs:double" use="optional"/>
	</xs:attributeGroup>
	<xs:attributeGroup name="TextAttr">
		<xs:attribute name="alpha" use="optional" default="0">
			<xs:simpleType>
				<xs:restriction base="xs:double">
					<xs:minExclusive value="-180"/>
					<xs:maxInclusive value="180"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="beta" use="optional" default="0">
			<xs:simpleType>
				<xs:restriction base="xs:double">
					<xs:minExclusive value="-180"/>
					<xs:maxInclusive value="180"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="shadow" type="xs:boolean" use="optional" default="false">
			<xs:annotation>
				<xs:documentation>TET 4.0</xs:documentation></xs:annotation></xs:attribute>
		<xs:attribute name="dropcap" type="xs:boolean" use="optional" default="false">
			<xs:annotation>
				<xs:documentation>TET 4.0</xs:documentation></xs:annotation></xs:attribute>
		<xs:attribute name="font" type="tet:fontId" use="required"/>
		<xs:attribute name="size" use="required">
			<xs:simpleType>
				<xs:restriction base="xs:double">
					<xs:minExclusive value="0"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="sub" type="xs:boolean" use="optional" default="false">
			<xs:annotation>
				<xs:documentation>TET 4.0</xs:documentation></xs:annotation></xs:attribute>
		<xs:attribute name="sup" type="xs:boolean" use="optional" default="false">
			<xs:annotation>
				<xs:documentation>TET 4.0</xs:documentation></xs:annotation></xs:attribute>
		<xs:attribute name="textrendering" use="optional" default="fill">
			<xs:simpleType>
				<xs:restriction base="xs:string">
					<xs:enumeration value="fill"/>
					<xs:enumeration value="stroke"/>
					<xs:enumeration value="fillStroke"/>
					<xs:enumeration value="invisible"/>
					<xs:enumeration value="fillClip"/>
					<xs:enumeration value="strokeClip"/>
					<xs:enumeration value="fillStrokeClip"/>
					<xs:enumeration value="clip"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="unknown" type="xs:boolean" use="optional" default="false"/>
		<xs:attribute name="dehyphenation" use="optional" default="none">
            <xs:annotation>
            	<xs:documentation>TET 4.0</xs:documentation></xs:annotation>
            <xs:simpleType>
				<xs:restriction base="xs:string">
					<xs:enumeration value="artifact"/>
					<xs:enumeration value="none"/>
					<xs:enumeration value="pre"/>
					<xs:enumeration value="post"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
	</xs:attributeGroup>
	<xs:simpleType name="fontId">
		<xs:restriction base="xs:string">
			<xs:pattern value="F\d+"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="imageId">
		<xs:restriction base="xs:string">
			<xs:pattern value="I\d+"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="colorSpaceId">
		<xs:restriction base="xs:string">
			<xs:pattern value="CS\d+"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="text">
		<xs:annotation>
			<xs:documentation>Separate type for Text for further extensions.</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string"/>
	</xs:simpleType>
</xs:schema>
