<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
	<xs:annotation>
		<xs:documentation xml:lang="en">
			XML-Schema definition of the XML format of the Graphisoft Library Parts.
			2004.05.
		</xs:documentation>
	</xs:annotation>

	<!-- ********** Common element types ****************************************************************************** -->

	<xs:simpleType name="BooleanYesNo">
		<xs:restriction base="xs:string">
			<xs:enumeration value="yes" />
			<xs:enumeration value="no" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="UNIDtype">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				The preferred format is {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXX}-{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXX}.
				The exact format is described in the regular expression. This format is a bit complex but in normal cases the verification won't take too long.
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:pattern value="[ 	]*[{][0123456789ABCDEFabcdef]{8}[+-/*.,; ]*[0123456789ABCDEFabcdef]{4}[+-/*.,; ]*[0123456789ABCDEFabcdef]{4}[+-/*.,; ]*[0123456789ABCDEFabcdef]{2}[+-/*.,; ]*[0123456789ABCDEFabcdef]{2}[+-/*.,; ]*[0123456789ABCDEFabcdef]{2}[+-/*.,; ]*[0123456789ABCDEFabcdef]{2}[+-/*.,; ]*[0123456789ABCDEFabcdef]{2}[+-/*.,; ]*[0123456789ABCDEFabcdef]{2}[+-/*.,; ]*[0123456789ABCDEFabcdef]{2}[+-/*.,; ]*[0123456789ABCDEFabcdef]{2}[}][-][{][0123456789ABCDEFabcdef]{8}[+-/*.,; ]*[0123456789ABCDEFabcdef]{4}[+-/*.,; ]*[0123456789ABCDEFabcdef]{4}[+-/*.,; ]*[0123456789ABCDEFabcdef]{2}[+-/*.,; ]*[0123456789ABCDEFabcdef]{2}[+-/*.,; ]*[0123456789ABCDEFabcdef]{2}[+-/*.,; ]*[0123456789ABCDEFabcdef]{2}[+-/*.,; ]*[0123456789ABCDEFabcdef]{2}[+-/*.,; ]*[0123456789ABCDEFabcdef]{2}[+-/*.,; ]*[0123456789ABCDEFabcdef]{2}[+-/*.,; ]*[0123456789ABCDEFabcdef]{2}[}][ 	]*" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="UNIDtypeLoose">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				The preferred format is {XXXXXXXX-XXXX-XXXX-XXXX-XXXXXX}-{XXXXXXXX-XXXX-XXXX-XXXX-XXXXXX}.
				This format descrioptor doesn't ensure a correct GUID string but it is easy to read and to verify.
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:pattern value="[ 	]*[{][0123456789ABCDEFabcdef-]*[}][-][{][0123456789ABCDEFabcdef-]*[}][ 	]*" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="GDLScriptType">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				This type collects the permitted characters in a GDL script, but is will slow down the verification of the XML if you start using it.
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:pattern value="([0-9]|[a-z]|[A-Z]|[()^*/%+-=#&gt;&lt;&amp;|@:,;!´&quot;_~ 	
])*" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="BinaryType">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				This type collects the permitted characters in a binary section, but is will slow down the verification of the XML if you start using it.
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:pattern value="[0123456789abcdefABCDEF 	
]*" />
		</xs:restriction>
	</xs:simpleType>

	<xs:attributeGroup name="SectionBaseAttrs">
		<xs:attribute name="SubIdent" type="xs:byte" use="required" />
		<xs:attribute name="SectVersion" type="xs:short" use="required" />
		<xs:attribute name="SectionFlags" type="xs:byte" use="required" />
	</xs:attributeGroup>
	<xs:attributeGroup name="SectionBinaryAttrs">
		<xs:attribute name="length_in_bytes" type="xs:long" use="required" />
		<xs:attribute name="platform" use="required">
			<xs:simpleType>
				<xs:restriction base="xs:string">
					<xs:enumeration value="Mac" />
					<xs:enumeration value="Win" />
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
	</xs:attributeGroup>
	<xs:attributeGroup name="SectionPicAttrs">
		<xs:attribute name="path" type="xs:string" use="optional" />
	</xs:attributeGroup>

	<xs:complexType name="GDLScript">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				For the limitations in a GDL script see the GDL Manual.
			</xs:documentation>
		</xs:annotation>
		<xs:simpleContent>
			<xs:extension base="xs:string">		<!-- you can use GDLScriptType, but it will slow down the verification dramatically -->
				<xs:attributeGroup ref="SectionBaseAttrs" />
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
	<xs:complexType name="BinarySection">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				Our binary representation allows hexadecimal and whitespace characters.
			</xs:documentation>
		</xs:annotation>
		<xs:simpleContent>
			<xs:extension base="xs:string">		<!-- you can use BinaryType, but it will slow down the verification a bit -->
				<xs:attributeGroup ref="SectionBaseAttrs" />
				<xs:attributeGroup ref="SectionBinaryAttrs" />
			</xs:extension>
		</xs:simpleContent>
	</xs:complexType>
	<xs:complexType name="empty" />


	<!-- ********** Drawing elements - common descriptors ************************************************************* -->

	<xs:simpleType name="DrawingElemName">
		<xs:restriction base="xs:string">
			<xs:maxLength value="32" />
		</xs:restriction>
	</xs:simpleType>
	<xs:simpleType name="OrderingType">
		<xs:restriction base="xs:string">
			<xs:enumeration value="Natural" />
			<xs:enumeration value="DrawQueue" />
			<xs:enumeration value="SortQueue" />
		</xs:restriction>
	</xs:simpleType>
	<xs:element name="Ang" type="xs:double" />
	<xs:element name="Layer" type="xs:short" />
	<xs:element name="DrawIndex" type="xs:byte" />
	<xs:element name="Pattern" type="xs:short" />
	<xs:element name="Pen" type="xs:short" />
	<xs:element name="X" type="xs:double" />
	<xs:element name="Y" type="xs:double" />
	<xs:element name="BegX" type="xs:double" />
	<xs:element name="BegY" type="xs:double" />
	<xs:element name="EndX" type="xs:double" />
	<xs:element name="EndY" type="xs:double" />
	<xs:element name="IsContour" type="BooleanYesNo" />
	<xs:element name="Size" type="xs:double" />
	<xs:element name="Spac" type="xs:double" />
	<xs:element name="StyleInd" type="xs:long" />
	<xs:element name="LocX" type="xs:double" />
	<xs:element name="LocY" type="xs:double" />
	<xs:element name="Width" type="xs:double" />
	<xs:element name="Ind1" type="xs:short" />
	<xs:element name="Ind2" type="xs:short" />
	<xs:element name="ParamInd" type="xs:unsignedByte" />
	<xs:element name="L" type="xs:string">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				Represents the last line of the text (without new line sequence at the end).
			</xs:documentation>
		</xs:annotation>
	</xs:element>


	<!-- ********** Parameter types - common descriptors ************************************************************** -->

	<xs:simpleType name="ParamName">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				This type collects the permitted characters in a GDL identifier. In the XML file you can place whitespace characters before and after the name.
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="32" />
			<xs:pattern value="[ 	]*([_~]|[a-z]|[A-Z]|[_~]){1}([_~]|[a-z]|[A-Z]|[_~]|[0-9])*[ 	]*" />
		</xs:restriction>
	</xs:simpleType>
	<xs:attribute name="Name" use="required" type="ParamName" />
	<xs:element name="Description" type="xs:string" />
	<xs:element name="Fix" type="empty" />
	<xs:element name="Flags">
		<xs:annotation>
			<xs:documentation xml:lang="en">The flags which are set in the mask are present in the XML representation.</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:choice minOccurs="0" maxOccurs="unbounded">
				<xs:element name="ParFlg_Child" type="empty" />
				<xs:element name="ParFlg_BoldName" type="empty" />
				<xs:element name="ParFlg_Fixed" type="empty" />
				<xs:element name="ParFlg_SHidden" type="empty" />
				<xs:element name="ParFlg_Open" type="empty" />
				<xs:element name="ParFlg_Disabled" type="empty" />
				<xs:element name="ParFlg_Hidden" type="empty" />
			</xs:choice>
		</xs:complexType>
	</xs:element>
	<xs:element name="Value" type="xs:string" />
	<xs:element name="ArrayValues">
		<xs:complexType>
			<xs:sequence>
				<xs:element name="AVal" maxOccurs="unbounded">
					<xs:complexType>
						<xs:simpleContent>
							<xs:extension base="xs:string">
								<xs:attribute name="Row" use="required" type="xs:long" />
								<xs:attribute name="Column" type="xs:long" />
							</xs:extension>
						</xs:simpleContent>
					</xs:complexType>
				</xs:element>
			</xs:sequence>
			<xs:attribute name="FirstDimension" use="required" type="xs:long" />
			<xs:attribute name="SecondDimension" use="required" type="xs:long" />
		</xs:complexType>
	</xs:element>
	<xs:element name="UNID" type="UNIDtype" />
	<xs:complexType name="ParameterTypeWithValue">
		<xs:sequence>
			<xs:element ref="Description" />
			<xs:element ref="Fix" minOccurs="0" />
			<xs:element ref="Flags" minOccurs="0" maxOccurs="1" />
			<xs:choice minOccurs="0" maxOccurs="1">
				<xs:element ref="Value" />
				<xs:element ref="ArrayValues" />
			</xs:choice>
		</xs:sequence>
		<xs:attribute ref="Name" />
	</xs:complexType>
	<xs:complexType name="ParameterTypeWithoutValue">
		<xs:sequence>
			<xs:element ref="Description" />
			<xs:element ref="Fix" minOccurs="0" />
			<xs:element ref="Flags" minOccurs="0" maxOccurs="1" />
		</xs:sequence>
		<xs:attribute ref="Name" />
	</xs:complexType>


	<!-- ********** the GDL sections in the file *********************************************************************** -->

	<xs:simpleType name="FrameExpressionType">
		<xs:annotation>
			<xs:documentation xml:lang="en">
				This type only restricts the string length of a frame expression.
			</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:maxLength value="256" />
		</xs:restriction>
	</xs:simpleType>
	<xs:element name="Symbol">
		<xs:complexType>
			<xs:choice minOccurs="0" maxOccurs="unbounded">

				<!-- ********** ParamSection section ********** -->
				<xs:element name="ParamSection">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="ParamSectHeader">
								<xs:complexType>
									<xs:sequence>
										<xs:element name="Version" type="xs:unsignedByte" />
										<xs:element name="AutoHotspots" type="BooleanYesNo" />
										<xs:element name="HoleBits" minOccurs="0" maxOccurs="1">
											<xs:annotation>
												<xs:documentation xml:lang="en">
													The flags which are set in the mask are present in the XML representation.
												</xs:documentation>
											</xs:annotation>
											<xs:complexType>
												<xs:choice minOccurs="0" maxOccurs="unbounded">
													<xs:element name="WDBit_3DFrame" type="empty" />
													<xs:element name="WDBit_2DSideFr" type="empty" />
													<xs:element name="WDBit_2DLengFr" type="empty" />
													<xs:element name="WDBit_OrientCustom" type="empty" />
													<xs:element name="WDBit_OrientReverse" type="empty" />
													<xs:element name="WDBit_ThickIsParam" type="empty" />
													<xs:element name="WDBit_LFramIsParam" type="empty" />
													<xs:element name="WDBit_RFramIsParam" type="empty" />
													<xs:element name="WDBit_TFramIsParam" type="empty" />
													<xs:element name="WDBit_BFramIsParam" type="empty" />
													<xs:element name="WDBit_InsetIsParam" type="empty" />
												</xs:choice>
											</xs:complexType>
										</xs:element>
										<xs:element name="StatBits" minOccurs="0" maxOccurs="1">
											<xs:annotation>
												<xs:documentation xml:lang="en">
													The flags which are set in the mask are present in the XML representation.
												</xs:documentation>
											</xs:annotation>
											<xs:complexType>
												<xs:choice minOccurs="0" maxOccurs="unbounded">
													<xs:element name="STBit_UIDefault" type="empty" />
													<xs:element name="STBit_FixSize" type="empty" />
													<xs:element name="STBit_SizeTo2D" type="empty" />
												</xs:choice>
											</xs:complexType>
										</xs:element>
										<xs:element name="WDLeftFrame" type="xs:double" />
										<xs:element name="WDRightFrame" type="xs:double" />
										<xs:element name="WDTopFrame" type="xs:double" />
										<xs:element name="WDBotFrame" type="xs:double" />
										<xs:element name="LayFlags" type="xs:long" />
										<xs:element name="WDMirrorThickness" type="xs:double" />
										<xs:element name="NumberOfParameters" type="xs:short" />
										<xs:element name="WDWallInset" type="xs:double" />
										<xs:element name="SymbolColor" type="xs:long" />
										<xs:element name="ModifTime" type="xs:dateTime">
											<xs:annotation>
												<xs:documentation xml:lang="en">
													Use the CCYY-MM-DDThh:mm:ss date format which is defined as standard XML data type.
												</xs:documentation>
											</xs:annotation>
										</xs:element>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<xs:element name="Parameters">
								<xs:complexType>
									<xs:choice maxOccurs="unbounded">
										<xs:element name="Length" type="ParameterTypeWithValue" />
										<xs:element name="Boolean" type="ParameterTypeWithValue" />
										<xs:element name="Integer" type="ParameterTypeWithValue" />
										<xs:element name="Title" type="ParameterTypeWithoutValue" />
										<xs:element name="Separator" type="ParameterTypeWithoutValue" />
										<xs:element name="String" type="ParameterTypeWithValue" />
										<xs:element name="Angle" type="ParameterTypeWithValue" />
										<xs:element name="FillPattern" type="ParameterTypeWithValue" />
										<xs:element name="LineType" type="ParameterTypeWithValue" />
										<xs:element name="Material" type="ParameterTypeWithValue" />
										<xs:element name="PenColor" type="ParameterTypeWithValue" />
										<xs:element name="RealNum" type="ParameterTypeWithValue" />
										<xs:element name="ColorRGB" type="ParameterTypeWithValue" />
										<xs:element name="Intensity" type="ParameterTypeWithValue" />
										<xs:element name="LightSwitch" type="ParameterTypeWithValue" />
									</xs:choice>
									<xs:attribute name="number" type="xs:unsignedByte" use="required" />
									<xs:attribute name="fix_vars" type="xs:unsignedByte" use="required" />
								</xs:complexType>
							</xs:element>
							<xs:element name="WDFrameExpression" minOccurs="0" maxOccurs="1">
								<xs:complexType>
									<xs:sequence>
										<xs:element name="F" type="FrameExpressionType" minOccurs="6" maxOccurs="6" />
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<xs:element name="WDOrientation" minOccurs="0" maxOccurs="1">
								<xs:complexType>
									<xs:sequence>
										<xs:element name="Def" type="xs:string" />
										<xs:element name="Mirr" type="xs:string" />
									</xs:sequence>
								</xs:complexType>
							</xs:element>
						</xs:sequence>
						<xs:attributeGroup ref="SectionBaseAttrs" />
					</xs:complexType>
				</xs:element>

				<!-- ********** Script_1D section ********** -->
				<xs:element name="Script_1D" type="GDLScript" />

				<!-- ********** Script_2D section ********** -->
				<xs:element name="Script_2D" type="GDLScript" />

				<!-- ********** Script_3D section ********** -->
				<xs:element name="Script_3D" type="GDLScript" />

				<!-- ********** Script_PR section ********** -->
				<xs:element name="Script_PR" type="GDLScript" />

				<!-- ********** Script_UI section ********** -->
				<xs:element name="Script_UI" type="GDLScript" />

				<!-- ********** Script_VL section ********** -->
				<xs:element name="Script_VL" type="GDLScript" />

				<!-- ********** Comment section ********** -->
				<xs:element name="Comment" type="GDLScript" />

				<!-- ********** Drawing section ********** -->
				<xs:element name="Drawing">
					<xs:complexType>
						<xs:choice minOccurs="0" maxOccurs="unbounded">
							<xs:element name="Font">
								<xs:complexType>
									<xs:sequence>
										<xs:element name="FamilyType" type="xs:short" />
										<xs:element name="FontName" type="DrawingElemName" />
										<xs:element ref="StyleInd" />
										<xs:element name="Face" type="xs:unsignedByte" />
										<xs:element name="Centre" type="xs:byte" />
										<xs:element name="Justification" type="xs:short" />
										<xs:element name="Slant" type="xs:double" />
										<xs:element ref="Size" />
										<xs:element ref="Spac" />
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<xs:element name="PixMap">
								<xs:complexType>
									<xs:sequence>
										<xs:element ref="DrawIndex" />
										<xs:element ref="Layer" />
										<xs:element name="Mirrored" type="BooleanYesNo" />
										<xs:element name="AnchorPoint" type="xs:byte" />
										<xs:element name="ColorDepth" type="xs:short" />
										<xs:element name="PixelSizeX" type="xs:short" />
										<xs:element name="PixelSizeY" type="xs:short" />
										<xs:element name="PixMapFormat" type="xs:unsignedLong" />
										<xs:element name="DestXMin" type="xs:double" />
										<xs:element name="DestYMin" type="xs:double" />
										<xs:element name="DestXMax" type="xs:double" />
										<xs:element name="DestYMax" type="xs:double" />
										<xs:element name="OrigXMin" type="xs:double" />
										<xs:element name="OrigYMin" type="xs:double" />
										<xs:element name="OrigXMax" type="xs:double" />
										<xs:element name="OrigYMax" type="xs:double" />
										<xs:element name="PixName" type="DrawingElemName" />
										<xs:element name="RotAngle" type="xs:double" />
										<xs:element name="PixBinLen" type="xs:long" />
										<xs:element name="PixBin" type="xs:string" /><!-- or BinaryType -->
										<xs:element name="Transparent" type="BooleanYesNo" />
										<xs:element name="MimeType" type="xs:string" />
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<xs:element name="Hatch">
								<xs:complexType>
									<xs:sequence>
										<xs:element ref="DrawIndex" />
										<xs:element name="FillPen" type="xs:short" />
										<xs:element ref="Layer" />
										<xs:element name="FillPat" type="xs:short" />
										<xs:element name="ContPen" type="xs:short" />
										<xs:element name="ContLType" type="xs:short" />
										<xs:element name="FillBkgPen" type="xs:short" />
										<xs:element name="Global" type="BooleanYesNo" />
										<xs:element name="OffsetX" type="xs:double" />
										<xs:element name="OffsetY" type="xs:double" />
										<xs:element ref="Ang" />
										<xs:element name="Polygons">
											<xs:complexType>
												<xs:sequence>
													<xs:element name="Contour" minOccurs="1" maxOccurs="unbounded">
														<xs:complexType>
															<xs:sequence>
																<xs:element name="V" minOccurs="2" maxOccurs="unbounded">
																	<xs:complexType>
																		<xs:sequence>
																			<xs:element ref="X" />
																			<xs:element ref="Y" />
																			<xs:element name="ArcAngle" minOccurs="0" type="xs:double" />
																		</xs:sequence>
																	</xs:complexType>
																</xs:element>
															</xs:sequence>
														</xs:complexType>
													</xs:element>
												</xs:sequence>
											</xs:complexType>
										</xs:element>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<xs:element name="Line">
								<xs:complexType>
									<xs:sequence>
										<xs:element ref="DrawIndex" />
										<xs:element ref="Pen" />
										<xs:element ref="Layer" />
										<xs:element ref="Pattern" />
										<xs:element name="InIndex" type="xs:long" />
										<xs:element ref="BegX" />
										<xs:element ref="BegY" />
										<xs:element ref="EndX" />
										<xs:element ref="EndY" />
										<xs:element ref="IsContour" />
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<xs:element name="Hotspot">
								<xs:complexType>
									<xs:sequence>
										<xs:element ref="DrawIndex" />
										<xs:element ref="Pen" />
										<xs:element ref="Layer" />
										<xs:element name="HotspotType" type="xs:short" />
										<xs:element name="HSSubtype" type="xs:short" />
										<xs:element name="SuppUnId" type="xs:long" />
										<xs:element name="CoordX" type="xs:double" />
										<xs:element name="CoordY" type="xs:double" />
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<xs:element name="Arc">
								<xs:complexType>
									<xs:sequence>
										<xs:element ref="DrawIndex" />
										<xs:element ref="Pen" />
										<xs:element ref="Layer" />
										<xs:element ref="Pattern" />
										<xs:element name="Whole" type="BooleanYesNo" />
										<xs:element name="Elliptic" type="BooleanYesNo" />
										<xs:element name="Reflected" type="BooleanYesNo" />
										<xs:element name="origX" type="xs:double" />
										<xs:element name="origY" type="xs:double" />
										<xs:element name="Radius" type="xs:double" />
										<xs:element ref="Ang" />
										<xs:element name="Ratio" type="xs:double" />
										<xs:element name="BegAng" type="xs:double" />
										<xs:element name="EndAng" type="xs:double" />
										<xs:element ref="BegX" />
										<xs:element ref="BegY" />
										<xs:element ref="EndX" />
										<xs:element ref="EndY" />
										<xs:element ref="IsContour" />
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<xs:element name="Spline">
								<xs:complexType>
									<xs:sequence>
										<xs:element ref="DrawIndex" />
										<xs:element ref="Pen" />
										<xs:element ref="Layer" />
										<xs:element ref="Pattern" />
										<xs:element name="AutoSm" type="BooleanYesNo" />
										<xs:element name="Closed" type="BooleanYesNo" />
										<xs:element ref="IsContour" />
										<xs:element name="SplinePoints">
											<xs:complexType>
												<xs:sequence>
													<xs:element name="P" maxOccurs="unbounded">
														<xs:complexType>
															<xs:sequence>
																<xs:element ref="X" />
																<xs:element ref="Y" />
																<xs:element name="LenPrev" type="xs:double">
																	<xs:annotation>
																		<xs:documentation xml:lang="en">
																			In the first point use 0.
																		</xs:documentation>
																	</xs:annotation>
																</xs:element>
																<xs:element name="LenNext" type="xs:double">
																	<xs:annotation>
																		<xs:documentation xml:lang="en">
																			In the last point use 0.
																		</xs:documentation>
																	</xs:annotation>
																</xs:element>
																<xs:element name="DirAng" type="xs:double">
																	<xs:annotation>
																		<xs:documentation xml:lang="en">
																			In both ending points use 0.
																		</xs:documentation>
																	</xs:annotation>
																</xs:element>
															</xs:sequence>
														</xs:complexType>
													</xs:element>
												</xs:sequence>
											</xs:complexType>
										</xs:element>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<xs:element name="Text">
								<xs:complexType>
									<xs:sequence>
										<xs:element ref="DrawIndex" />
										<xs:element ref="Pen" />
										<xs:element ref="Layer" />
										<xs:element name="NonBreaking" type="xs:boolean" />
										<xs:element ref="ParamInd" />
										<xs:element ref="StyleInd" />
										<xs:element ref="LocX" />
										<xs:element ref="LocY" />
										<xs:element ref="Ang" />
										<xs:element ref="Width" />
										<xs:element name="Height" type="xs:double" />
										<xs:element ref="Size" />
										<xs:element ref="Spac" />
										<xs:element ref="Ind1" />
										<xs:element ref="Ind2" />
										<xs:element name="TLines">
											<xs:complexType>
												<xs:sequence>
													<xs:element name="L_RET" type="xs:string" minOccurs="0" maxOccurs="unbounded">
														<xs:annotation>
															<xs:documentation xml:lang="en">
																Represents a line of the text ended by a new line sequence.
															</xs:documentation>
														</xs:annotation>
													</xs:element>
													<xs:element ref="L" minOccurs="0" maxOccurs="unbounded" />
												</xs:sequence>
											</xs:complexType>
										</xs:element>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
							<xs:element name="RichText">
								<xs:complexType>
									<xs:sequence>
										<xs:element ref="DrawIndex" />
										<xs:element ref="Layer" />
										<xs:element ref="LocX" />
										<xs:element ref="LocY" />
										<xs:element ref="Width" />
										<xs:element ref="Ang" />
										<xs:element name="WidthFactor" type="xs:double" />
										<xs:element name="CharSpaceFactor" type="xs:double" />
										<xs:element name="Anchor" type="xs:short" />
										<xs:element name="FixedHeight" type="BooleanYesNo" />
										<xs:element name="NonBreaking" type="BooleanYesNo" />
										<xs:element ref="ParamInd" />
										<xs:element ref="Ind1" />
										<xs:element ref="Ind2" />
										<xs:element name="Content">
											<xs:complexType>
												<xs:sequence>
													<xs:element name="Paragraph" minOccurs="0" maxOccurs="unbounded">
														<xs:complexType>
															<xs:sequence>
																<xs:element name="Alignment" type="xs:short" />
																<xs:element name="FirstLineIndent" type="xs:double" />
																<xs:element name="LeftIndent" type="xs:double" />
																<xs:element name="RightIndent" type="xs:double" />
																<xs:element name="LineSpacing" type="xs:double" />
																<xs:element name="TextStyles">
																	<xs:complexType>
																		<xs:sequence>
																			<xs:element name="TStyle">
																				<xs:complexType>
																					<xs:sequence>
																						<xs:element ref="Size" />
																						<xs:element ref="StyleInd" />
																						<xs:element name="PenInd" type="xs:short" />
																						<xs:element ref="L" minOccurs="1" maxOccurs="unbounded" />
																					</xs:sequence>
																				</xs:complexType>
																			</xs:element>
																		</xs:sequence>
																	</xs:complexType>
																</xs:element>
																<xs:element name="Tabulators">
																	<xs:complexType>
																		<xs:sequence>
																			<xs:element ref="Tab" maxOccurs="unbounded">
																				<xs:complexType>
																					<xs:sequence>
																						<xs:element name="Position" type="xs:double" />
																						<xs:element name="Type" type="xs:short" />
																					</xs:sequence>
																				</xs:complexType>
																			</xs:element>
																		</xs:sequence>
																	</xs:complexType>
																</xs:element>
															</xs:sequence>
														</xs:complexType>
													</xs:element>
												</xs:sequence>
											</xs:complexType>
										</xs:element>
									</xs:sequence>
								</xs:complexType>
							</xs:element>
						</xs:choice>
						<xs:attributeGroup ref="SectionBaseAttrs" />
						<xs:attribute name="Ordering" type="OrderingType" use="required"/>
					</xs:complexType>
				</xs:element>

				<!-- ********** Binary3D section ********** -->
				<xs:element name="Binary3D" type="BinarySection" />

				<!-- ********** InfoPict section ********** -->
				<xs:element name="InfoPict">
					<xs:complexType>
						<xs:simpleContent>
							<xs:extension base="BinarySection">
								<xs:attributeGroup ref="SectionPicAttrs" />
							</xs:extension>
						</xs:simpleContent>
					</xs:complexType>
				</xs:element>

				<!-- ********** Picture section ********** -->
				<xs:element name="Picture">
					<xs:complexType>
						<xs:simpleContent>
							<xs:extension base="BinarySection">
								<xs:attributeGroup ref="SectionPicAttrs" />
								<xs:attribute name="MIME" type="xs:string" use="required" />
							</xs:extension>
						</xs:simpleContent>
					</xs:complexType>
				</xs:element>

				<!-- ********** GDLPict section ********** -->
				<xs:element name="GDLPict">
					<xs:complexType>
						<xs:simpleContent>
							<xs:extension base="BinarySection">
								<xs:attributeGroup ref="SectionPicAttrs" />
								<xs:attribute name="MIME" type="xs:string" use="optional" />
							</xs:extension>
						</xs:simpleContent>
					</xs:complexType>
				</xs:element>

				<!-- ********** SubKind section ********** -->
				<xs:element name="SubKind" type="BinarySection" />

				<!-- ********** CalledMacros section ********** -->
				<xs:element name="CalledMacros">
					<xs:complexType>
						<xs:sequence>
							<xs:element name="Macro" maxOccurs="unbounded">
								<xs:complexType>
									<xs:sequence>
										<xs:element name="MName" type="xs:string" />
										<xs:element ref="UNID" />
									</xs:sequence>
								</xs:complexType>
							</xs:element>
						</xs:sequence>
						<xs:attributeGroup ref="SectionBaseAttrs" />
					</xs:complexType>
				</xs:element>

				<!-- ********** Ancestry section ********** -->
				<xs:element name="Ancestry">
					<xs:complexType>
						<xs:sequence>
							<xs:element ref="UNID" maxOccurs="unbounded" />
						</xs:sequence>
						<xs:attributeGroup ref="SectionBaseAttrs" />
						<xs:attribute name="Template" use="required" type="BooleanYesNo"/>
					</xs:complexType>
				</xs:element>

				<!-- ********** Unknown section ********** -->
				<xs:element name="UnknownSection">
					<xs:complexType>
						<xs:simpleContent>
							<xs:extension base="BinarySection">
								<xs:attribute name="SectionType" type="xs:unsignedLong"/>
							</xs:extension>
						</xs:simpleContent>
					</xs:complexType>
				</xs:element>

			</xs:choice>
			<xs:attribute name="UNID" type="UNIDtype" use="required" />
			<xs:attribute name="Owner" type="xs:int" use="required" />
			<xs:attribute name="Signature" type="xs:unsignedLong" use="optional" />
			<xs:attribute name="IsPlaceable" type="BooleanYesNo" use="required" />
			<xs:attribute name="IsArchivable" type="BooleanYesNo" use="required" />
			<xs:attribute name="Version" type="xs:unsignedLong" fixed="21">
				<xs:annotation>
					<xs:documentation xml:lang="en">
						This XML Schema describes only this version of the Graphisoft Library Part XML Format.
					</xs:documentation>
				</xs:annotation>
			</xs:attribute>
		</xs:complexType>
	</xs:element>	<!-- Symbol -->
</xs:schema>
