<?xml version="1.0" encoding="UTF-8"?>
<!-- 
(c) 2003 Electronic Data Systems Corporation. All Rights Reserved. 
This software and related documentation are proprietary to EDS. 
LIMITATIONS TO U.S. GOVERNMENT RIGHTS.  UNPUBLISHED - RIGHTS
RESERVED UNDER THE COPYRIGHT LAWS OF THE UNITED STATES. This 
computer software and related computer software documentation have 
been developed exclusively at private expense and are provided 
subject to the following rights:  If this computer software and 
computer software documentation qualify as "commercial items" (as 
that term is defined in FAR 2.101), their use, duplication or 
disclosure by the U.S. Government is subject to the protections 
and restrictions as set forth in the EDS commercial license for 
the software and/or documentation, as prescribed in FAR 12.212 
and FAR 27.405(b)(2)(i) (for civilian agencies) and in 
DFARS 227.7202-1(a) and DFARS 227.7202-3(a) (for the Department 
of Defense), or any successor or similar regulation, as applicable
or as amended from time to time. If this computer software and 
computer documentation do not qualify as "commercial items," then 
they are "restricted computer software" and are provided with 
"restrictive rights," and their use, duplication or disclosure by 
the U.S. Government is subject to the protections and restrictions 
as set forth in FAR 27.404(b) and FAR 52-227-14 (for civilian 
agencies), and DFARS 227.7203-5(c) and DFARS 252.227-7014 (for the 
Department of Defense), or any successor or similar regulation, as 
applicable or as amended from time to time. 

Electronic Data Systems Corporation, 5400 Legacy Drive, 
Plano, Texas 75024.
-->
<xsd:schema targetNamespace="http://www.plmxml.org/Schemas/PLMXMLSchema" xmlns:plm="http://www.plmxml.org/Schemas/PLMXMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" xml:lang="en">
  <xsd:annotation>
    <xsd:documentation>
    
                        PLMXML Schema
                        
    </xsd:documentation>
    <xsd:appinfo source="http://www.plmxml.org/Schemas/PLMXMLSchema">
      <plm:SchemaInfo name="PLMXMLSchema.xsd" date="2003-11-14" version="5.0" status="release"/>
    </xsd:appinfo>
  </xsd:annotation>
  <xsd:attributeGroup name="idGroup">
    <xsd:annotation>
      <xsd:documentation>
      The 'id' attribute is used for references between elements. It 
      should not be use to encode other information.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:attribute name="id" type="xsd:ID" use="optional"/>
  </xsd:attributeGroup>
  <!-- -->
  <xsd:complexType name="IdBase" abstract="true">
    <xsd:annotation>
      <xsd:appinfo source="PLMXMLSchemaGenerator">sdkname=IdObject</xsd:appinfo>
    </xsd:annotation>
    <xsd:attributeGroup ref="plm:idGroup"/>
  </xsd:complexType>
  <!-- -->
  <xsd:simpleType name="DescriptionType">
    <xsd:restriction base="xsd:string"/>
  </xsd:simpleType>
  <!-- -->
  <xsd:simpleType name="anyURIType">
    <xsd:annotation>
      <xsd:documentation>
      plm:anyURIType is used in place of xsd:anyURI, since we want to allow
      filenames as well as genuine URIs.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string"/>
  </xsd:simpleType>
  <!-- -->
  <xsd:complexType name="ApplicationRefType">
    <xsd:annotation>
      <xsd:documentation>
      The ApplicationRef element is meant to relate the parent element (Product, 
      Representation, etc) back to the owning entity in the sending  application.

      Attributes:

      application:  the context in which the contents of the label and version attributes 
                    make sense. Whether this field includes an application version number 
                    is up to the application, as long as it starts with something identifiable 
                    to the sending application.

      label:        the string which identifies the application entity - the value of this field
                    is only meaningful to the sending/authoring application. The receiving 
                    application can compare the contents of the attribute to test if two entities 
                    are the 'same' entity. But the actual value is meaningless to the receiving 
                    application.

      version:      the optional string attribute which identifies the version of the application 
                    entity. This attribute can only be used to test if the versions of an entity 
                    are the same (i.e. the test is only meaningful if the label attribute values 
                    are the same). No version ordering can be deduced from the value. Similar to 
                    the label attribute, the version attribute contents are meaningless to the 
                    receiving application.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:attribute name="application" type="xsd:string" use="optional"/>
    <xsd:attribute name="label" type="xsd:string" use="required"/>
    <xsd:attribute name="version" type="xsd:string" use="optional"/>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="DescriptionBase" abstract="true">
    <xsd:annotation>
      <xsd:appinfo source="PLMXMLSchemaGenerator">sdkname=DescriptionObject</xsd:appinfo>
      <xsd:documentation>
      The DescriptionBase type is an abstract base type for PLM XML types which have optional 
      description and ApplicationRef.
      
      Attributes:
      
	   name:            descriptive or display name

      Sub-elements:
			
      Description      Readable textual description of the element.
      ApplicationRef   A means of uniquely identifying the element in terms understood by the
                       sending system. More than one is allowed (at most one per Application).
       </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:IdBase">
        <xsd:sequence>
          <xsd:element name="Description" type="plm:DescriptionType" minOccurs="0"/>
          <xsd:element name="ApplicationRef" type="plm:ApplicationRefType" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
        <xsd:attribute name="name" type="xsd:string" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="AttribOwnerBase" abstract="true">
    <xsd:annotation>
      <xsd:documentation>
        Base class for elements which have PLMXML Attributes, i.e. elements
        derived from plm:AttributeBase.
      
        Attributes:
        
        attributeRefs: reference to Attributes
               
        SubElements:
      
        Attribute:     any element derived from AttributeBase.
        </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:DescriptionBase">
        <xsd:sequence>
          <xsd:element ref="plm:Attribute" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
        <xsd:attribute name="attributeRefs" type="xsd:IDREFS" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="AttribOwner" type="plm:AttribOwnerBase"/>
  <!-- -->
  <xsd:attributeGroup name="referenceGroup">
    <xsd:attribute name="location" type="plm:anyURIType" use="optional"/>
    <xsd:attribute name="load" type="xsd:boolean" default="false"/>
  </xsd:attributeGroup>
  <!-- -->
  <xsd:simpleType name="uriReferenceListType">
    <xsd:list itemType="plm:anyURIType"/>
  </xsd:simpleType>
  <!-- -->
  <xsd:simpleType name="IntegerListType">
    <xsd:list itemType="xsd:integer"/>
  </xsd:simpleType>
  <!-- -->
  <xsd:simpleType name="BooleanListType">
    <xsd:list itemType="xsd:boolean"/>
  </xsd:simpleType>
  <!-- -->
  <xsd:simpleType name="FloatListType">
    <xsd:list itemType="xsd:float"/>
  </xsd:simpleType>
  <!-- -->
  <xsd:simpleType name="DoubleListType">
    <xsd:list itemType="xsd:double"/>
  </xsd:simpleType>
  <!-- -->
  <xsd:simpleType name="VectorType">
    <xsd:restriction base="plm:DoubleListType">
      <xsd:length value="3"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:simpleType name="DirectionType">
    <xsd:restriction base="plm:DoubleListType">
      <xsd:length value="3"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:complexType name="PositionType">
    <xsd:simpleContent>
      <xsd:extension base="plm:VectorType">
        <xsd:attributeGroup ref="plm:idGroup"/>
      </xsd:extension>
    </xsd:simpleContent>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="NormalType">
    <xsd:simpleContent>
      <xsd:extension base="plm:VectorType">
        <xsd:attributeGroup ref="plm:idGroup"/>
      </xsd:extension>
    </xsd:simpleContent>
  </xsd:complexType>
  <!-- -->
  <xsd:simpleType name="MatrixType">
    <xsd:restriction base="plm:DoubleListType">
      <xsd:minLength value="1"/>
      <xsd:maxLength value="16"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:simpleType name="TransformationType">
    <xsd:restriction base="xsd:NMTOKEN">
      <xsd:enumeration value="general"/>
      <xsd:enumeration value="general3"/>
      <xsd:enumeration value="rotate"/>
      <xsd:enumeration value="translate"/>
      <xsd:enumeration value="scale"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:complexType name="TransformType">
    <xsd:simpleContent>
      <xsd:extension base="plm:MatrixType">
        <xsd:attributeGroup ref="plm:idGroup"/>
        <xsd:attribute name="type" type="plm:TransformationType" default="general"/>
      </xsd:extension>
    </xsd:simpleContent>
  </xsd:complexType>
  <xsd:element name="Transform" type="plm:TransformType"/>
  <!-- -->
  <xsd:complexType name="BoxBoundType">
    <xsd:annotation>
      <xsd:documentation>
      This is a legacy box type. The 'Bound' element should be used.
      </xsd:documentation>
      <xsd:appinfo source="PLMXMLSchemaGenerator">output=ignore</xsd:appinfo>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="LowCorner" type="plm:VectorType"/>
      <xsd:element name="HighCorner" type="plm:VectorType"/>
    </xsd:sequence>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="SphereBoundType">
    <xsd:annotation>
      <xsd:documentation>
      This is a legacy sphere bound type. The 'Bound' element should be used.
      </xsd:documentation>
      <xsd:appinfo source="PLMXMLSchemaGenerator">output=ignore</xsd:appinfo>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="Radius" type="xsd:double"/>
      <xsd:element name="Centre" type="plm:VectorType"/>
    </xsd:sequence>
  </xsd:complexType>
  <!-- -->
  <xsd:simpleType name="BoundingType">
    <xsd:restriction base="xsd:NMTOKEN">
      <xsd:enumeration value="box"/>
      <xsd:enumeration value="sphere"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:complexType name="ZoneBase" abstract="true">
    <xsd:annotation>
      <xsd:documentation>
      This is an abstract base type for elements representing a subset of
      3D space.
      
      Attributes:
      
      transformRef:  Optional transform, to apply to data in derived types.
                     For example, the data in a Bound can define an axis-
                     aligned box. By using a Transform, this can then 
                     represent a non-axis-aligned box.
      
      SubElements:
      
      Transform:     Optional transform. Do not use both transformRef and
                     Transform sub-element.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AttribOwnerBase">
        <xsd:sequence>
          <xsd:element ref="plm:Transform" minOccurs="0"/>
        </xsd:sequence>
        <xsd:attribute name="transformRef" type="xsd:IDREF" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="Zone" type="plm:ZoneBase" substitutionGroup="plm:AttribOwner"/>
  <!-- -->
  <xsd:complexType name="BoundType">
    <xsd:annotation>
      <xsd:documentation>
      This is a box or sphere-shaped bound (zone) in 3-space.
      
      Attributes:
      
      type:          'box' or 'sphere'
      values:        6 or 4 doubles. If a box, these are the coordinates of
                     the centre, followed by xwidth/2, ywidth/2, zwidth/2.
                     If a sphere, these are centre, radius.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:ZoneBase">
        <xsd:attribute name="type" type="plm:BoundingType" default="box"/>
        <xsd:attribute name="values" type="plm:DoubleListType" use="required"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="Bound" type="plm:BoundType" substitutionGroup="plm:Zone"/>
  <!-- -->
  <xsd:complexType name="PlanarZoneType">
    <xsd:annotation>
      <xsd:documentation>
      This is a Zone defined by the intersection of a number of halfspaces. Each
      Halfspace is defined as the area of space behind a Plane (i.e. away from the
      Plane normal). 
      
      If there is only one Plane, the Zone is a halfspace.
      
      SubElements:
      
      Plane:         Plane defining a halfspace
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:ZoneBase">
        <xsd:sequence>
          <xsd:element ref="plm:Plane" minOccurs="1" maxOccurs="unbounded"/>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="PlanarZone" type="plm:PlanarZoneType" substitutionGroup="plm:Zone"/>
  <!-- -->
  <!--*** Attributes -->
  <!-- -->
  <xsd:simpleType name="IntegerFieldType">
    <xsd:restriction base="xsd:integer"/>
  </xsd:simpleType>
  <!-- -->
  <xsd:simpleType name="IntegerFieldListType">
    <xsd:list itemType="plm:IntegerFieldType"/>
  </xsd:simpleType>
  <!-- -->
  <xsd:simpleType name="RealFieldType">
    <xsd:restriction base="xsd:double"/>
  </xsd:simpleType>
  <!-- -->
  <xsd:simpleType name="RealFieldListType">
    <xsd:restriction base="plm:DoubleListType"/>
  </xsd:simpleType>
  <!-- -->
  <xsd:simpleType name="StringFieldType">
    <xsd:annotation>
      <xsd:appinfo source="PLMXMLSchemaGenerator">createClass=true</xsd:appinfo>
    </xsd:annotation>
    <xsd:restriction base="xsd:string"/>
  </xsd:simpleType>
  <!-- -->
  <xsd:simpleType name="VectorFieldType">
    <xsd:restriction base="plm:DoubleListType">
      <xsd:length value="3"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:simpleType name="CoordinateFieldType">
    <xsd:restriction base="plm:DoubleListType">
      <xsd:length value="3"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:simpleType name="DirectionFieldType">
    <xsd:restriction base="plm:DoubleListType">
      <xsd:length value="3"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:simpleType name="AxisFieldType">
    <xsd:restriction base="plm:DoubleListType">
      <xsd:length value="6"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <!--xsd:simpleType name="EntityFieldType">
    <xsd:restriction base="plm:EntityRefType"/>
  </xsd:simpleType -->
  <!-- -->
  <!--xsd:simpleType name="EntityFieldListType">
    <xsd:list itemType="plm:EntityFieldType"/>
  </xsd:simpleType -->
  <!-- -->
  <xsd:simpleType name="AttributeOwnerType">
    <xsd:annotation>
      <xsd:appinfo source="PLMXMLSchemaGenerator">output=ignore</xsd:appinfo>
    </xsd:annotation>
    <xsd:restriction base="xsd:NMTOKEN">
      <xsd:enumeration value="assembly"/>
      <xsd:enumeration value="instance"/>
      <xsd:enumeration value="body"/>
      <xsd:enumeration value="region"/>
      <xsd:enumeration value="shell"/>
      <xsd:enumeration value="face"/>
      <xsd:enumeration value="loop"/>
      <xsd:enumeration value="edge"/>
      <xsd:enumeration value="fin"/>
      <xsd:enumeration value="vertex"/>
      <xsd:enumeration value="group"/>
      <xsd:enumeration value="surface"/>
      <xsd:enumeration value="curve"/>
      <xsd:enumeration value="point"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:simpleType name="AttributeClassType">
    <xsd:annotation>
      <xsd:appinfo source="PLMXMLSchemaGenerator">output=ignore</xsd:appinfo>
    </xsd:annotation>
    <xsd:restriction base="xsd:NMTOKEN">
      <xsd:enumeration value="class_01"/>
      <xsd:enumeration value="class_02"/>
      <xsd:enumeration value="class_03"/>
      <xsd:enumeration value="class_04"/>
      <xsd:enumeration value="class_05"/>
      <xsd:enumeration value="class_06"/>
      <xsd:enumeration value="class_07"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:complexType name="AttributeLegalOwnerType">
    <xsd:annotation>
      <xsd:appinfo source="PLMXMLSchemaGenerator">output=ignore</xsd:appinfo>
    </xsd:annotation>
    <xsd:attribute name="name" type="plm:AttributeOwnerType" use="required"/>
  </xsd:complexType>
  <xsd:element name="AttributeLegalOwner" type="plm:AttributeLegalOwnerType"/>
  <!-- -->
  <xsd:complexType name="AttributeClassBase" abstract="true">
    <xsd:annotation>
      <xsd:appinfo source="PLMXMLSchemaGenerator">output=ignore</xsd:appinfo>
    </xsd:annotation>
    <xsd:attribute name="name" type="plm:AttributeClassType" use="required"/>
  </xsd:complexType>
  <xsd:element name="AttributeClass" type="plm:AttributeClassBase"/>
  <!-- -->
  <xsd:complexType name="AttributeBase" abstract="true">
    <xsd:annotation>
      <xsd:documentation>
      The Attribute element is an abstract element. Useful attributes
      (ones that include fields) must be derived from the Attribute element
      defined within this schema. The derived attributes will define their 
      data elements to represent data fields.
    
      The derived attributes also need to be set as 'equivalent' to the 
      Attribute element. This enables the new derived attribute to be
      inserted into documents wherever the Attribute element is allowed.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:DescriptionBase"/>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="Attribute" type="plm:AttributeBase"/>
  <!--*** Base Classes -->
  <!-- -->
  <xsd:complexType name="PropertiesBase" abstract="true">
    <xsd:annotation>
      <xsd:documentation>
      Base class for elements which may contain 3D bounds.
      
      SubElements:
      
      BoxBound:      legacy, use Bound in preference
      SphereBound:   legacy, use Bound in preference 
      Bound:         3D bound
      </xsd:documentation>
      <xsd:appinfo source="PLMXMLSchemaGenerator">sdkname=Entity3D</xsd:appinfo>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AttribOwnerBase">
        <xsd:sequence>
          <xsd:element name="BoxBound" type="plm:BoxBoundType" minOccurs="0">
            <xsd:annotation>
              <xsd:appinfo source="PLMXMLSchemaGenerator">output=ignore</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
          <xsd:element name="SphereBound" type="plm:SphereBoundType" minOccurs="0">
            <xsd:annotation>
              <xsd:appinfo source="PLMXMLSchemaGenerator">output=ignore</xsd:appinfo>
            </xsd:annotation>
          </xsd:element>
          <xsd:element name="Bound" type="plm:BoundType" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="Properties" type="plm:PropertiesBase" substitutionGroup="plm:AttribOwner"/>
  <!-- -->
  <xsd:complexType name="ManagedBase" abstract="true">
    <xsd:annotation>
      <xsd:documentation>
      This is an abstract base class for elements which require information such as 
      access control, status and checkout information
      
      Attributes:
      
      accessRefs:      reference to one or more elements derived from AccessControlBase
      statusRef:       reference to element derived from StatusBase
      checkoutRefs:    reference to one or more elements derived from CheckoutStatusBase
      effectivityRefs  reference to Effectivity elements
      
      subType:      No specified semantics. This can be used where simple customised sub-types 
                    have been defined and a full PLMXML schema extension is not appropriate.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:PropertiesBase">
        <xsd:attribute name="accessRefs" type="plm:uriReferenceListType" use="optional"/>
        <xsd:attribute name="statusRef" type="plm:anyURIType" use="optional"/>
        <xsd:attribute name="checkoutRefs" type="plm:uriReferenceListType" use="optional"/>
        <xsd:attribute name="subType" type="xsd:string" use="optional"/>
        <xsd:attribute name="effectivityRefs" type="plm:uriReferenceListType" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="Managed" type="plm:ManagedBase" substitutionGroup="plm:Properties"/>
  <!-- -->
  <xsd:complexType name="AccessControlBase" abstract="true">
    <xsd:annotation>
      <xsd:documentation>
      AccessControl - abstract base class for Access Control types.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AttribOwnerBase"/>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="AccessControl" type="plm:AccessControlBase" substitutionGroup="plm:AttribOwner"/>
  <!-- -->
  <xsd:complexType name="StatusBase" abstract="true">
    <xsd:annotation>
      <xsd:documentation>
      Status - abstract base class for status information types.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AttribOwnerBase"/>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="Status" type="plm:StatusBase" substitutionGroup="plm:AttribOwner"/>
  <!-- -->
  <xsd:complexType name="CheckoutStatusBase" abstract="true">
    <xsd:annotation>
      <xsd:documentation>
      CheckoutStatus - abstract base class for Checkout types.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AttribOwnerBase"/>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="CheckoutStatus" type="plm:CheckoutStatusBase" substitutionGroup="plm:AttribOwner"/>
  <!-- -->
  <xsd:complexType name="InternalRepBase" abstract="true">
    <xsd:complexContent>
      <xsd:extension base="plm:AttribOwnerBase"/>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="EntityBase" abstract="true">
    <xsd:annotation>
      <xsd:documentation>
      Base class for elements which reference an external entity such as a
      face in an XT file.
      
      Attributes:
      
      entityRef:     reference to external entity.
      </xsd:documentation>
      <xsd:appinfo source="PLMXMLSchemaGenerator">sdkname=EntityObject</xsd:appinfo>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AttribOwnerBase">
        <xsd:attribute name="entityRef" type="plm:anyURIType" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="PointBase" abstract="true">
    <xsd:annotation>
      <xsd:documentation>
      Base class for elements representing 3D points.
      
      Attributes:
      
      position:      coordinates of point
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:EntityBase">
        <xsd:attribute name="position" type="plm:VectorType"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="ReferencePointType">
    <xsd:complexContent>
      <xsd:extension base="plm:EntityBase">
        <xsd:attribute name="position" type="plm:VectorType"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="SamplePointsType">
    <xsd:simpleContent>
      <xsd:extension base="plm:DoubleListType">
        <xsd:attribute name="tolerance" type="xsd:double"/>
      </xsd:extension>
    </xsd:simpleContent>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="CurveBase" abstract="true">
    <xsd:annotation>
      <xsd:documentation>
      Base class for elements representing parametrised curves in 3-space.
      
      Attributes:
      
      startT:        start parameter
      endT:          end parameter
      
      SubElements:
      
      StartPoint:    optional coordinates of start point
      EndPoint:      optional coordinates of end point
      SamplePoints:  optional coordinates of a sequence of points along curve
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:EntityBase">
        <xsd:sequence>
          <xsd:element name="StartPoint" type="plm:ReferencePointType" minOccurs="0"/>
          <xsd:element name="EndPoint" type="plm:ReferencePointType" minOccurs="0"/>
          <xsd:element name="SamplePoints" type="plm:SamplePointsType" minOccurs="0"/>
        </xsd:sequence>
        <xsd:attribute name="startT" type="xsd:double" use="optional"/>
        <xsd:attribute name="endT" type="xsd:double" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="PlaneCurveBase" abstract="true">
    <xsd:annotation>
      <xsd:documentation>
      Base class for 3D curves which lie in a plane.
      
      Attributes:
      
      origin:        centre of plane
      zAxis:         normal to plane
      xAxis:         x-direction in plane
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:CurveBase">
        <xsd:attribute name="origin" type="plm:VectorType" default="0 0 0"/>
        <xsd:attribute name="zAxis" type="plm:DirectionType" default="0 0 1"/>
        <xsd:attribute name="xAxis" type="plm:DirectionType" default="1 0 0"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="SurfaceBase" abstract="true">
    <xsd:annotation>
      <xsd:documentation>
      Base class for elements representing a u-v-parametrised surface in 3-space. 
      
      Attributes:
      
      startU:        lowest U value
      endU:          highest U value
      startV:        lowest V value
      endV:          highest V value
      
      SubElements:
      
      SamplePoints:  optional coordinates of a set of points on the surface
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:EntityBase">
        <xsd:sequence>
          <xsd:element name="SamplePoints" type="plm:SamplePointsType" minOccurs="0"/>
        </xsd:sequence>
        <xsd:attribute name="startU" type="xsd:double" use="optional"/>
        <xsd:attribute name="endU" type="xsd:double" use="optional"/>
        <xsd:attribute name="startV" type="xsd:double" use="optional"/>
        <xsd:attribute name="endV" type="xsd:double" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="SurfacePositionBase" abstract="true">
    <xsd:annotation>
      <xsd:documentation>
      Base class for elements representing a surface which uses an
      X-Y-Z coordinate frame as part of its definition.
      
      Attributes:
      
      origin:        origin of coordinate frame
      zAxis:         Z Axis of coordinate frame
      xAxis:         X Axis of coordinate frame
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:SurfaceBase">
        <xsd:attribute name="origin" type="plm:VectorType" default="0 0 0"/>
        <xsd:attribute name="zAxis" type="plm:DirectionType" default="0 0 1"/>
        <xsd:attribute name="xAxis" type="plm:DirectionType" default="1 0 0"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!--*** Display Control -->
  <!--*** PLMXML Schema to define colours, materials, lights, etc -->
  <!--*** required to support display controls -->
  <!-- -->
  <xsd:simpleType name="RGBFloatType">
    <xsd:restriction base="xsd:float">
      <xsd:minInclusive value="0.0"/>
      <xsd:maxInclusive value="1.0"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:simpleType name="RGBFloatListType">
    <xsd:list itemType="plm:RGBFloatType"/>
  </xsd:simpleType>
  <!-- -->
  <xsd:simpleType name="RGBType">
    <xsd:annotation>
      <xsd:documentation>
      Type representing a Red-Green-Blue colour.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="plm:RGBFloatListType">
      <xsd:length value="3"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:simpleType name="RGBAType">
    <xsd:annotation>
      <xsd:documentation>
      Type representing a colour in Red-Green-Blue-Alpha format.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="plm:RGBFloatListType">
      <xsd:length value="4"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:simpleType name="ShininessType">
    <xsd:restriction base="xsd:float">
      <xsd:minInclusive value="0.0"/>
      <xsd:maxInclusive value="255.0"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:simpleType name="AlphaType">
    <xsd:restriction base="xsd:float">
      <xsd:minInclusive value="0.0"/>
      <xsd:maxInclusive value="1.0"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:complexType name="MaterialType">
    <xsd:annotation>
      <xsd:documentation>
      Element representing a material type.
      
      Attributes:
      
      ambient:       ambient colour
      diffuse:       diffuse colour
      specular:      specular colour
      emissive:      emissive colour
      shininess:     shininess coefficient
      alpha:         alpha coefficient
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AttribOwnerBase">
        <xsd:attribute name="ambient" type="plm:RGBType" use="required"/>
        <xsd:attribute name="diffuse" type="plm:RGBType" use="required"/>
        <xsd:attribute name="specular" type="plm:RGBType" default="0.0 0.0 0.0"/>
        <xsd:attribute name="emissive" type="plm:RGBType" default="0.0 0.0 0.0"/>
        <xsd:attribute name="shininess" type="plm:ShininessType" default="0.0"/>
        <xsd:attribute name="alpha" type="plm:AlphaType" default="1.0"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="Material" type="plm:MaterialType" substitutionGroup="plm:AttribOwner"/>
  <!-- -->
  <xsd:complexType name="EntityMaterialType">
    <xsd:annotation>
      <xsd:documentation>
      Element used to associate an entity with a material (colour).
      
      Attributes:
      
      materialRef:   IDREF to the material element.
      
      SubElements:
      
      EntityRef:     Element derived from EntityRef, used to specify which entity
                     is to be associated with the material.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AttribOwnerBase">
        <xsd:choice>
          <xsd:element ref="plm:EntityRef" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:choice>
        <xsd:attribute name="materialRef" type="xsd:IDREF" use="required"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="EntityMaterial" type="plm:EntityMaterialType" substitutionGroup="plm:AttribOwner"/>
  <!-- -->
  <xsd:simpleType name="AttenuationType">
    <xsd:restriction base="plm:DoubleListType">
      <xsd:length value="3"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:simpleType name="IntensityExponentType">
    <xsd:restriction base="xsd:float">
      <xsd:minInclusive value="0.0"/>
      <xsd:maxInclusive value="255.0"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:simpleType name="CutoffAngleType">
    <xsd:restriction base="xsd:float">
      <xsd:minInclusive value="0.0"/>
      <xsd:maxInclusive value="90.0"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:complexType name="LightSourceBase" abstract="true">
    <xsd:annotation>
      <xsd:documentation>
      Base class for elements representing Light Sources
      
      Attributes:
      
      ambient:       ambient light
      diffuse:       diffuse light
      specular:      specular light
      intensity:     intensity multiplier
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AttribOwnerBase">
        <xsd:attribute name="ambient" type="plm:RGBType" default="0.0 0.0 0.0"/>
        <xsd:attribute name="diffuse" type="plm:RGBType" default="1.0 1.0 1.0"/>
        <xsd:attribute name="specular" type="plm:RGBType" default="1.0 1.0 1.0"/>
        <xsd:attribute name="intensity" type="plm:AlphaType" default="1.0"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="LightSource" type="plm:LightSourceBase"/>
  <!-- -->
  <xsd:complexType name="DirectionalLightType">
    <xsd:annotation>
      <xsd:documentation>
      Directional Light Source (from infinity)
      
      Attributes:
      
      direction:     direction TO the light source.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:LightSourceBase">
        <xsd:attribute name="direction" type="plm:VectorType" default="0.0 0.0 1.0"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="DirectionalLight" type="plm:DirectionalLightType" substitutionGroup="plm:LightSource"/>
  <!-- -->
  <xsd:complexType name="PositionalLightType">
    <xsd:annotation>
      <xsd:documentation>
      Positional Light Source, i.e. point source.
      
      Attributes:
      
      position:      position of light
      direction:     direction in which the light is shining
      cutoffAngle:   semiAngle of cone of light. If absent, the source is not
                     a spotlight, but shines in all directions.
      intensityExponent:  the intensity exponent determines the intensity distribution within the 
                     cone. Higher intensity exponent values result in a more focused light source. 
      attenuation:   the attenuation of the light source within the scene. The three attenuation 
                     values are the factors in a quadratic equation, giving intensity as a function
                     of distance from the source. The values within the attribute are in order: 
                     quadratic, linear and constant.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:LightSourceBase">
        <xsd:attribute name="position" type="plm:VectorType" default="0.0 0.0 1.0"/>
        <xsd:attribute name="direction" type="plm:VectorType" default="0.0 0.0 -1.0"/>
        <xsd:attribute name="cutoffAngle" type="plm:CutoffAngleType" use="optional"/>
        <xsd:attribute name="intensityExponent" type="plm:IntensityExponentType" default="0.0"/>
        <xsd:attribute name="attenuation" type="plm:AttenuationType" default="0.0 0.0 1.0"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="PositionalLight" type="plm:PositionalLightType" substitutionGroup="plm:LightSource"/>
  <!-- -->
  <xsd:simpleType name="ShadingStyleType">
    <xsd:restriction base="xsd:NMTOKEN">
      <xsd:enumeration value="flat"/>
      <xsd:enumeration value="smooth"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:simpleType name="DrawingStyleType">
    <xsd:restriction base="xsd:NMTOKEN">
      <xsd:enumeration value="wireframe"/>
      <xsd:enumeration value="hidden"/>
      <xsd:enumeration value="hiddenMarked"/>
      <xsd:enumeration value="shaded"/>
      <xsd:enumeration value="shadedWithEdges"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:complexType name="DisplayControlType">
    <xsd:complexContent>
      <xsd:extension base="plm:AttribOwnerBase">
        <xsd:attribute name="drawingStyle" type="plm:DrawingStyleType" default="shaded"/>
        <xsd:attribute name="shadingStyle" type="plm:ShadingStyleType" default="flat"/>
        <xsd:attribute name="backgroundColour" type="plm:RGBType" default="0.0 0.0 0.0"/>
        <xsd:attribute name="lightSourceRefs" type="xsd:IDREFS" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!--*** Reference -->
  <!--*** Schemas for defining references to entities via the data references.-->
  <!-- -->
  <xsd:simpleType name="RefSelectType">
    <xsd:annotation>
      <xsd:documentation>
      This type describes whether the PLMXML reference is
      specifying a single entity or a set of entities.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:NMTOKEN">
      <xsd:enumeration value="single"/>
      <xsd:enumeration value="multiple"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:complexType name="EntityRefBase" abstract="true">
    <xsd:annotation>
      <xsd:documentation>
      Base class for defining a reference to an entity. All entity
      reference elements should be based on this type and defined
      as a substitution class for EntityRef.
  
      Attributes:
      
      select:   Type of the reference - single or multiple.  
      contextRef: Context for the reference
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:DescriptionBase">
        <xsd:attribute name="contextRef" type="plm:anyURIType" use="optional"/>
        <xsd:attribute name="select" type="plm:RefSelectType" default="single"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="EntityRef" type="plm:EntityRefBase"/>
  <!-- -->
  <xsd:simpleType name="LocatorRefFormatType">
    <xsd:annotation>
      <xsd:documentation>
    Locator reference format.
    </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:NMTOKEN">
      <xsd:enumeration value="PLMXMLPointer"/>
      <xsd:enumeration value="Unregistered"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:complexType name="LocatorRefType">
    <xsd:annotation>
      <xsd:documentation>
      Locator reference element. The reference is a URI based reference and
      the syntax of the URI must be pre-defined. Hence the only predefined
      type is currently PLMXMLPointer.
      
      Attributes:
      
      locationRef:  The value of the URI reference.
      type:         Format of the locator reference.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:EntityRefBase">
        <xsd:attribute name="locationRef" type="plm:anyURIType" use="required"/>
        <xsd:attribute name="type" type="plm:LocatorRefFormatType" default="PLMXMLPointer"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="LocatorRef" type="plm:LocatorRefType" substitutionGroup="plm:EntityRef"/>
  <!-- -->
  <xsd:complexType name="AttributeRefType">
    <xsd:annotation>
      <xsd:documentation>
      Attribute reference element. The reference is based on a user
      defined named attribute on the host representation. This type
      enables the author to note the attribute name, field name/index
      and the value of the attribute.

      Attributes:
      
      attribute:  The name of the attribute to query, e.g.
                  "COMPANYNAME/Tracking_attribute".
      field:      The name of the field within the attribute.
      index:      The index of the field within the attribute, if its
                  name is not given. (The first field is index 0).
      value:      The value of the attribute to match.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:EntityRefBase">
        <xsd:attribute name="attribute" type="xsd:string" use="required"/>
        <xsd:attribute name="field" type="xsd:string" use="optional"/>
        <xsd:attribute name="index" type="xsd:integer" use="optional"/>
        <xsd:attribute name="value" type="xsd:string" use="required"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="AttributeRef" type="plm:AttributeRefType" substitutionGroup="plm:EntityRef"/>
  <!-- -->
  <xsd:complexType name="GUIDRefType">
    <xsd:annotation>
      <xsd:documentation>
      GUID reference element. This simply specifies the GUID of the entity
      being referenced.
      
      Attribute:
    
      guid:       The GUID of the entity referenced, in the form of a string containing 
                  32 hex digits, with arbitrary non-hex spacing characters.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:EntityRefBase">
        <xsd:attribute name="guid" type="xsd:string" use="required"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="GUIDRef" type="plm:GUIDRefType" substitutionGroup="plm:EntityRef"/>
  <!--*** Geometry -->
  <xsd:element name="Point" type="plm:PointBase"/>
  <!-- -->
  <xsd:complexType name="RefPointType">
    <xsd:annotation>
      <xsd:documentation>
      Reference Point element
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:PointBase"/>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="RefPoint" type="plm:RefPointType" substitutionGroup="plm:Point"/>
  <!--*** Curve geometry types -->
  <!-- -->
  <xsd:complexType name="LineType">
    <xsd:annotation>
      <xsd:documentation>
      Straight line curve.
      
      Attributes:
      
      origin:        start (T=0).
      direction:     direction of increasing T.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:CurveBase">
        <xsd:attribute name="origin" type="plm:VectorType" use="required"/>
        <xsd:attribute name="direction" type="plm:DirectionType" use="required"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- -->
  <xsd:simpleType name="PolyLineDimensionType">
    <xsd:restriction base="xsd:positiveInteger">
      <xsd:minInclusive value="2"/>
      <xsd:maxInclusive value="3"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:complexType name="PolyLineType">
    <xsd:annotation>
      <xsd:documentation>
      Polyline, i.e. sequence of connected line-segments.
      
      Attributes:
      
      closed:        true if the end of the polyline equals its start.
      dimension:     dimension of the curve. This determines the length of each 
                     vector in 'Points'. Defaults to 3.
                     
      type:          an optional indication of the shape of the polyline, e.g. "arc".
                     
      SubElements:
      
      Points:        coordinates of the ends of the line segments, in order.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:CurveBase">
        <xsd:sequence>
          <xsd:element name="Points" type="plm:DoubleListType"/>
        </xsd:sequence>
        <xsd:attribute name="closed" type="xsd:boolean" default="false"/>
        <xsd:attribute name="dimension" type="plm:PolyLineDimensionType" default="3"/>
        <xsd:attribute name="type" type="xsd:string" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="CircleType">
    <xsd:annotation>
      <xsd:documentation>
      Circular curve. The T=0 point is on the positive x-axis of the underlying plane. The
      T=pi/2 point is on the positive y-axis.
      
      Attributes:
      
      radius:        radius
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:PlaneCurveBase">
        <xsd:attribute name="radius" type="xsd:double" use="required"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="EllipseType">
    <xsd:annotation>
      <xsd:documentation>
      Elliptical curve. The T=0 point is on the positive x-axis of the underlying plane, at
      a distance 'majorRadius' from the origin. The T=pi/2 point is on the positive y-axis, 
      at a distance 'minorRadius' from the origin.
      
      Attributes:
      
      majorRadius:   major radius.
      minorRadius:   minor radius.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:PlaneCurveBase">
        <xsd:attribute name="majorRadius" type="xsd:double" use="required"/>
        <xsd:attribute name="minorRadius" type="xsd:double" use="required"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- -->
  <xsd:simpleType name="SplineDimensionType">
    <xsd:restriction base="xsd:positiveInteger">
      <xsd:minInclusive value="2"/>
      <xsd:maxInclusive value="3"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:simpleType name="SplineCurveFormType">
    <xsd:restriction base="xsd:NMTOKEN">
      <xsd:enumeration value="planar"/>
      <xsd:enumeration value="general"/>
      <xsd:enumeration value="unknown"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:complexType name="BSplineCurveType">
    <xsd:annotation>
      <xsd:documentation>
      B-Spline curve in 2- or 3-dimensional space.
      
      Attributes:
      
      degree:        degree of the curve.
      dimension:     dimension of the curve. This determines the length of each vector in 
                     'Vertices': if isRational is true, it is 'dimension+1', else it is 'dimension'.
                     Defaults to 3.
      isRational:    true if the spline is rational.
      isPeriodic:    true if the spline is periodic.
      isClosed:      true if the start and end of the curve coincide.
      form:          form of the curve.

      SubElements:
      
      Knots:         knot values, in increasing order, no repetitions.
      KnotMultiplicities: multiplicities of the knots.
      Vertices:      coordinates of the vertices.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:CurveBase">
        <xsd:sequence>
          <xsd:element name="Knots" type="plm:DoubleListType"/>
          <xsd:element name="KnotMultiplicities" type="plm:IntegerListType"/>
          <xsd:element name="Vertices" type="plm:DoubleListType"/>
        </xsd:sequence>
        <xsd:attribute name="degree" type="xsd:positiveInteger" use="required"/>
        <xsd:attribute name="dimension" type="plm:SplineDimensionType" default="3"/>
        <xsd:attribute name="isRational" type="xsd:boolean" use="required"/>
        <xsd:attribute name="isPeriodic" type="xsd:boolean" use="required"/>
        <xsd:attribute name="isClosed" type="xsd:boolean" use="required"/>
        <xsd:attribute name="form" type="plm:SplineCurveFormType" default="unknown"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="CompositeCurveType">
    <xsd:annotation>
      <xsd:documentation>
      Composite Curve, formed by joining curves together end-to-end.
             
      Attributes:
      
      curves:        sequence of curves. NB this attribute name is non-standard,
                     PLMXML conventions require that IDREFS attributes end in 'Refs'.
      isClosed:      true if the end of the last curve coincides with the start
                     of the first.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:CurveBase">
        <xsd:attribute name="curves" type="xsd:IDREFS" use="required"/>
        <xsd:attribute name="isClosed" type="xsd:boolean" default="false"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="SPCurveType">
    <xsd:annotation>
      <xsd:documentation>
      A curve defined in the parameter-space of a surface. The x,y positions
      of the curve correspond to u,v parameters in the surface.
             
      Attributes:
      
      parameterCurve:  reference to a 2-dimensional BSpline curve.
      surface:         reference to a surface.
      
                       NB both these attributes have non-standard names, PLMXML
                       conventions require reference attributes to end in 'Ref'.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:CurveBase">
        <xsd:attribute name="parameterCurve" type="xsd:IDREF" use="required"/>
        <xsd:attribute name="surface" type="xsd:IDREF" use="required"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!--*** Curve geometry elements -->
  <xsd:element name="Curve" type="plm:CurveBase"/>
  <xsd:element name="Line" type="plm:LineType" substitutionGroup="plm:Curve"/>
  <xsd:element name="PolyLine" type="plm:PolyLineType" substitutionGroup="plm:Curve"/>
  <xsd:element name="Circle" type="plm:CircleType" substitutionGroup="plm:Curve"/>
  <xsd:element name="Ellipse" type="plm:EllipseType" substitutionGroup="plm:Curve"/>
  <xsd:element name="BSplineCurve" type="plm:BSplineCurveType" substitutionGroup="plm:Curve"/>
  <xsd:element name="CompositeCurve" type="plm:CompositeCurveType" substitutionGroup="plm:Curve"/>
  <xsd:element name="SPCurve" type="plm:SPCurveType" substitutionGroup="plm:Curve"/>
  <!--xsd:element name="SurfacePosition" type="plm:SurfacePositionBase" substitutionGroup="plm:Surface"/-->
  <!-- -->
  <xsd:complexType name="PlaneType">
    <xsd:complexContent>
      <xsd:extension base="plm:SurfacePositionBase"/>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="CylinderType">
    <xsd:complexContent>
      <xsd:extension base="plm:SurfacePositionBase">
        <xsd:attribute name="radius" type="xsd:double" use="required"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="SphereType">
    <xsd:complexContent>
      <xsd:extension base="plm:SurfacePositionBase">
        <xsd:attribute name="radius" type="xsd:double" use="required"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="ConeType">
    <xsd:annotation>
      <xsd:documentation>
      Conical surface. The cone axis is along the Z-Axis of the underlying 
      coordinate frame. The cone radius increases in the direction of the
      Z-Axis.
      
      Attributes:
      
      radius:          radius of the cone at the origin of the coordinate frame.
                       This is zero or positive.
      halfAngle:       the positive angle between the Z-Axis and a line in the
                       cone, in radians.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:SurfacePositionBase">
        <xsd:attribute name="radius" type="xsd:double" use="required"/>
        <xsd:attribute name="halfAngle" type="xsd:double" use="required"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="TorusType">
    <xsd:annotation>
      <xsd:documentation>
      Toroidal surface. The axis of the torus is the Z-Axis of the underlying
      coordinate frame.
      
      Attributes:
      
      majorRadius:     major radius 
      minorRadius:     minor radius
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:SurfacePositionBase">
        <xsd:attribute name="majorRadius" type="xsd:double" use="required"/>
        <xsd:attribute name="minorRadius" type="xsd:double" use="required"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="BSplineSurfaceType">
    <xsd:annotation>
      <xsd:documentation>
      B-Spline surface, normally in 3-dimensional space.
      
      Attributes:
      
      uDegree:       degree of the surface in U.
      vDegree:       degree of the surface in V.
      dimension:     dimension of the surface. This determines the length of each vector in 
                     'Vertices': if isRational is true, it is 'dimension+1', else it is 'dimension'.
                     Defaults to 3.
      isRational:    true if the surface is rational.
      isUPeriodic:   true if the surface is periodic in U.
      isUPeriodic:   true if the surface is periodic in U.
      isVClosed:     true if the surface is closed in V.
      isVClosed:     true if the surface is closed in V.
      numberOfUVertices: number of U vertices.
      numberOfVVertices: number of V vertices.

      SubElements:
      
      UKnots:        U knot values, in increasing order, no repetitions.
      VKnots:        V knot values, in increasing order, no repetitions.
      UKnotMultiplicities: multiplicities of the U knots.
      VKnotMultiplicities: multiplicities of the V knots.
      Vertices:      coordinates of the vertices.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:SurfaceBase">
        <xsd:sequence>
          <xsd:element name="UKnots" type="plm:DoubleListType"/>
          <xsd:element name="VKnots" type="plm:DoubleListType"/>
          <xsd:element name="UKnotMultiplicities" type="plm:IntegerListType"/>
          <xsd:element name="VKnotMultiplicities" type="plm:IntegerListType"/>
          <xsd:element name="Vertices" type="plm:DoubleListType"/>
        </xsd:sequence>
        <xsd:attribute name="dimension" type="plm:SplineDimensionType" default="3"/>
        <xsd:attribute name="numberOfUVertices" type="xsd:positiveInteger" use="required"/>
        <xsd:attribute name="numberOfVVertices" type="xsd:positiveInteger" use="required"/>
        <xsd:attribute name="uDegree" type="xsd:positiveInteger" use="required"/>
        <xsd:attribute name="vDegree" type="xsd:positiveInteger" use="required"/>
        <xsd:attribute name="isRational" type="xsd:boolean" use="required"/>
        <xsd:attribute name="isUPeriodic" type="xsd:boolean" use="required"/>
        <xsd:attribute name="isVPeriodic" type="xsd:boolean" use="required"/>
        <xsd:attribute name="isUClosed" type="xsd:boolean" use="required"/>
        <xsd:attribute name="isVClosed" type="xsd:boolean" use="required"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!--*** Surface geometry elements -->
  <xsd:element name="Surface" type="plm:SurfaceBase"/>
  <xsd:element name="Plane" type="plm:PlaneType" substitutionGroup="plm:Surface"/>
  <xsd:element name="Cylinder" type="plm:CylinderType" substitutionGroup="plm:Surface"/>
  <xsd:element name="Sphere" type="plm:SphereType" substitutionGroup="plm:Surface"/>
  <xsd:element name="Cone" type="plm:ConeType" substitutionGroup="plm:Surface"/>
  <xsd:element name="Torus" type="plm:TorusType" substitutionGroup="plm:Surface"/>
  <xsd:element name="BSplineSurface" type="plm:BSplineSurfaceType" substitutionGroup="plm:Surface"/>
  <!-- -->
  <xsd:complexType name="PlanarCoordinateSystemType">
    <xsd:annotation>
      <xsd:documentation>
      Planar Coordinate system.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:EntityBase">
        <xsd:attribute name="origin" type="plm:VectorType" default="0 0 0"/>
        <xsd:attribute name="zAxis" type="plm:DirectionType" default="0 0 1"/>
        <xsd:attribute name="xAxis" type="plm:DirectionType" default="1 0 0"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="CoordinateSystem" type="plm:PlanarCoordinateSystemType"/>
  <!-- -->
  <xsd:complexType name="CompositionType">
    <xsd:annotation>
      <xsd:documentation>
      Geometry composition.
      
      SubElements:
      
      Point:         any elements derived from Point.
      Curve:         any elements derived from Curve.
      Surface:       any elements derived from Surface.
      CoordinateSystem:  coordinate systems.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:EntityBase">
        <xsd:sequence>
          <xsd:element name="LocalCoordinateSystem" type="plm:PlanarCoordinateSystemType"/>
          <xsd:choice maxOccurs="unbounded">
            <xsd:element ref="plm:Point"/>
            <xsd:element ref="plm:Curve"/>
            <xsd:element ref="plm:Surface"/>
            <xsd:element ref="plm:CoordinateSystem"/>
          </xsd:choice>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="GeometryComposition" type="plm:CompositionType"/>
  <!-- -->
  <xsd:complexType name="ConstructionGeometryType">
    <xsd:annotation>
      <xsd:documentation>
      Top level construction geometry element.
      
      SubElements:
      
      Point:         any elements derived from Point.
      Curve:         any elements derived from Curve.
      Surface:       any elements derived from Surface.
      CoordinateSystem:     coordinate systems.
      GeometryComposition:  geometry compositions.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:EntityBase">
        <xsd:choice maxOccurs="unbounded">
          <xsd:element ref="plm:Point"/>
          <xsd:element ref="plm:Curve"/>
          <xsd:element ref="plm:Surface"/>
          <xsd:element ref="plm:CoordinateSystem"/>
          <xsd:element ref="plm:GeometryComposition"/>
        </xsd:choice>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!--*** View Control -->
  <!--*** Elements for defining view controls -->
  <!-- -->
  <xsd:complexType name="PerspectiveType">
    <xsd:annotation>
      <xsd:documentation>
      Defines a perspective view from a point.
      Toroidal surface. The axis of the torus is the Z-Axis of the underlying
      coordinate frame.
      
      SubElements:
      
      ViewFrom:        eye point
      ViewTo:          point towards which eye is looking
      ViewVertical:    vector which is vertical in the view. Should be
                       perpendicular to (ViewFrom - ViewTo).
      </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="ViewFrom" type="plm:VectorType"/>
      <xsd:element name="ViewTo" type="plm:VectorType"/>
      <xsd:element name="ViewVertical" type="plm:VectorType"/>
    </xsd:sequence>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="OrthographicType">
    <xsd:annotation>
      <xsd:documentation>
      Defines a view from infinity (no perspective).
      
      SubElements:
      
      ViewDirection:   direction eye is looking in.
      ViewVertical:    vector which is vertical in the view. Should be
                       perpendicular to ViewDirection.
      ViewTo:          optional point at which eye is looking, only needed
                       if depth is significant in the view.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="ViewDirection" type="plm:VectorType"/>
      <xsd:element name="ViewVertical" type="plm:VectorType"/>
      <xsd:choice minOccurs="0">
        <xsd:element name="ViewTo" type="plm:VectorType"/>
      </xsd:choice>
    </xsd:sequence>
  </xsd:complexType>
  <!-- -->
  <xsd:simpleType name="ViewPortCornerType">
    <xsd:restriction base="plm:DoubleListType">
      <xsd:length value="2"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:complexType name="ViewPortType">
    <xsd:sequence>
      <xsd:element name="ViewPortLow" type="plm:ViewPortCornerType"/>
      <xsd:element name="ViewPortHigh" type="plm:ViewPortCornerType"/>
    </xsd:sequence>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="ViewControlType">
    <xsd:annotation>
      <xsd:documentation>
      Defines a view, i.e. a camera position and optional viewport.
      
      SubElements:
      
      One of Perspective, Orthographic or ViewMatrix (4 by 4).
      
      ViewPort:        optional viewport definition.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:DescriptionBase">
        <xsd:sequence>
          <xsd:choice>
            <xsd:element name="Perspective" type="plm:PerspectiveType"/>
            <xsd:element name="Orthographic" type="plm:OrthographicType"/>
            <xsd:element name="ViewMatrix" type="plm:MatrixType"/>
          </xsd:choice>
          <xsd:element name="ViewPort" type="plm:ViewPortType" minOccurs="0"/>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!--*** Texture -->
  <!--*** PLMXML Schema to define textures to support entity display properties. -->
  <!-- -->
  <xsd:simpleType name="TextureDataFormatType">
    <xsd:annotation>
      <xsd:documentation>
      Basic texture data format definition
      
      Determines the length of each data element in the hexBinary data element.
    
      RGBA = 4 bytes of red, green, blue and alpha
      RGB  = 3 bytes of red, green and blue
      LA   = 2 bytes of luminance and alpha
      A    = 1 byte of alpha
      L    = 1 byte of luminance
      </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:NMTOKEN">
      <xsd:enumeration value="RGBA"/>
      <xsd:enumeration value="RGB"/>
      <xsd:enumeration value="LA"/>
      <xsd:enumeration value="A"/>
      <xsd:enumeration value="L"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:complexType name="Texture1DDataType">
    <xsd:annotation>
      <xsd:documentation>
      Basic 1D texture data definition 
      </xsd:documentation>
    </xsd:annotation>
    <xsd:simpleContent>
      <xsd:extension base="xsd:hexBinary">
        <xsd:attribute name="level" type="xsd:nonNegativeInteger" use="required"/>
        <xsd:attribute name="width" type="xsd:positiveInteger" use="required"/>
        <xsd:attribute name="border" type="xsd:nonNegativeInteger" default="0"/>
        <xsd:attribute name="location" type="plm:anyURIType" use="optional"/>
      </xsd:extension>
    </xsd:simpleContent>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="Texture1DType">
    <xsd:choice maxOccurs="unbounded">
      <xsd:element name="Data" type="plm:Texture1DDataType"/>
    </xsd:choice>
    <xsd:attribute name="format" type="plm:TextureDataFormatType" use="required"/>
    <xsd:attribute name="levels" type="xsd:positiveInteger" default="1"/>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="Texture2DDataType">
    <xsd:annotation>
      <xsd:documentation>
      Basic 2D texture data definition
      </xsd:documentation>
    </xsd:annotation>
    <xsd:simpleContent>
      <xsd:extension base="xsd:hexBinary">
        <xsd:attribute name="level" type="xsd:nonNegativeInteger" use="required"/>
        <xsd:attribute name="width" type="xsd:positiveInteger" use="required"/>
        <xsd:attribute name="height" type="xsd:positiveInteger" use="required"/>
        <xsd:attribute name="border" type="xsd:nonNegativeInteger" default="0"/>
        <xsd:attribute name="location" type="plm:anyURIType" use="optional"/>
      </xsd:extension>
    </xsd:simpleContent>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="Texture2DType">
    <xsd:choice maxOccurs="unbounded">
      <xsd:element name="Data" type="plm:Texture2DDataType"/>
    </xsd:choice>
    <xsd:attribute name="format" type="plm:TextureDataFormatType" use="required"/>
    <xsd:attribute name="levels" type="xsd:positiveInteger" default="1"/>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="TextureDataType">
    <xsd:annotation>
      <xsd:documentation>
      Basic texture data definition 
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AttribOwnerBase">
        <xsd:choice>
          <xsd:element name="Texture2D" type="plm:Texture2DType"/>
          <xsd:element name="Texture1D" type="plm:Texture1DType"/>
        </xsd:choice>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="TextureData" type="plm:TextureDataType" substitutionGroup="plm:AttribOwner"/>
  <!-- -->
  <xsd:simpleType name="TextureMapType">
    <xsd:annotation>
      <xsd:documentation>
      Texture control definition
      </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:NMTOKEN">
      <xsd:enumeration value="decal"/>
      <xsd:enumeration value="modulate"/>
      <xsd:enumeration value="blend"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:simpleType name="TextureSampleType">
    <xsd:restriction base="xsd:NMTOKEN">
      <xsd:enumeration value="nearest"/>
      <xsd:enumeration value="linear"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:simpleType name="TextureWrapType">
    <xsd:restriction base="xsd:NMTOKEN">
      <xsd:enumeration value="clamp"/>
      <xsd:enumeration value="wrap"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:complexType name="TextureType">
    <xsd:annotation>
      <xsd:documentation>
      Basic texture definition
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AttribOwnerBase">
        <xsd:choice minOccurs="0">
          <xsd:element name="TextureData" type="plm:TextureDataType"/>
        </xsd:choice>
        <xsd:attribute name="dataRef" type="xsd:IDREF" use="optional"/>
        <xsd:attribute name="mapping" type="plm:TextureMapType" use="required"/>
        <xsd:attribute name="subsamplingLow" type="plm:TextureSampleType" default="nearest"/>
        <xsd:attribute name="subsamplingHigh" type="plm:TextureSampleType" default="nearest"/>
        <xsd:attribute name="oversampling" type="plm:TextureSampleType" default="nearest"/>
        <xsd:attribute name="wrapping" type="plm:TextureWrapType" default="clamp"/>
        <xsd:attribute name="borderColour" type="plm:RGBAType" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="Texture" type="plm:TextureType" substitutionGroup="plm:AttribOwner"/>
  <!-- -->
  <xsd:simpleType name="TextureCoordDataType">
    <xsd:annotation>
      <xsd:documentation>
      Texture coordinates 
      </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="plm:DoubleListType">
      <xsd:minLength value="1"/>
      <xsd:maxLength value="4"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:simpleType name="GeometryParamType">
    <xsd:restriction base="plm:DoubleListType">
      <xsd:length value="2"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:complexType name="TextureCoordType">
    <xsd:simpleContent>
      <xsd:extension base="plm:TextureCoordDataType">
        <xsd:attributeGroup ref="plm:idGroup"/>
        <xsd:attribute name="textureRef" type="xsd:IDREF" use="optional"/>
        <xsd:attribute name="geometryCoord" type="plm:VectorType" use="optional"/>
        <xsd:attribute name="geometryParam" type="plm:GeometryParamType" use="optional"/>
      </xsd:extension>
    </xsd:simpleContent>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="EntityTextureType">
    <xsd:annotation>
      <xsd:documentation>
      Texture structures that can be associated with a remote entity.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AttribOwnerBase">
        <xsd:sequence>
          <xsd:element name="TextureCoord" type="plm:TextureCoordType" minOccurs="0" maxOccurs="unbounded"/>
          <xsd:element ref="plm:EntityRef" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
        <xsd:attribute name="textureRef" type="xsd:IDREF" use="required"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="EntityTexture" type="plm:EntityTextureType" substitutionGroup="plm:AttribOwner"/>
  <!-- -->
  <!-- *** Representation -->
  <!-- -->
  <xsd:simpleType name="RepresentationFormatType">
    <xsd:restriction base="xsd:NMTOKEN">
      <xsd:enumeration value="XT"/>
      <xsd:enumeration value="eXT"/>
      <xsd:enumeration value="PLMXML"/>
      <xsd:enumeration value="jXT"/>
      <xsd:enumeration value="JT"/>
      <xsd:enumeration value="XPK"/>
      <xsd:enumeration value="XGL"/>
      <xsd:enumeration value="VRML"/>
      <xsd:enumeration value="STL"/>
      <xsd:enumeration value="SAT"/>
      <xsd:enumeration value="STEP"/>
      <xsd:enumeration value="IGES"/>
      <xsd:enumeration value="UGBkm"/>
      <xsd:enumeration value="UGPrt"/>
      <xsd:enumeration value="SEPrt"/>
      <xsd:enumeration value="SEAsm"/>
      <xsd:enumeration value="IdeasPrt"/>
      <xsd:enumeration value="IdeasAsm"/>
      <xsd:enumeration value="IdeasIDI"/>
      <xsd:enumeration value="Cat4Prt"/>
      <xsd:enumeration value="Cat5Prt"/>
      <xsd:enumeration value="Cat5Asm"/>
      <xsd:enumeration value="SWPrt"/>
      <xsd:enumeration value="SWAsm"/>
      <xsd:enumeration value="IDI"/>
      <xsd:enumeration value="TX"/>
      <xsd:enumeration value="DWG"/>
      <xsd:enumeration value="ProE"/>
      <xsd:enumeration value="Unregistered"/>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:element name="InternalRep" type="plm:InternalRepBase"/>
  <!-- -->
  <xsd:complexType name="CompoundRepType">
    <xsd:annotation>
      <xsd:documentation>
      This class represents the 'CompoundRep' element in a PLMXML file.
      
      Attributes:
      
      location:       URI of data source
      load:           True if data is to be loaded at the same time as the PLMXML file.
      format:         Data format. If this is absent, the format is taken from the parent
                      Representation.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AttribOwnerBase">
        <xsd:attributeGroup ref="plm:referenceGroup"/>
        <xsd:attribute name="format" type="plm:RepresentationFormatType" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="CompoundRep" type="plm:CompoundRepType" substitutionGroup="plm:AttribOwner"/>
  <!-- -->
  <xsd:complexType name="RepresentationType">
    <xsd:annotation>
      <xsd:documentation>
      The Representation element in an PLMXML file refers to a model in some
      particular format, such as XT or jXT. It can refer to the model data in
      another file (an External Representation), or the data can be embedded within
      the Representation element in the XML file (an InternalRepresentation).
	   
      Attributes:
	   
      format:         data format
      revision:       revision of data
      transformRef:   optional reference to a Transform which positions the data in the
                      coordinate frame of the owner.
      location:       URI of data source
      load:           true if data is to be loaded at the same time as the PLMXML file.
      
      equivalentRef:  an optional reference to a Representation which is equivalent to
                      this one (for example, has the same shape). If this attribute is used, 
                      then it should collect together equivalent Representations into a 
                      ring, with each Representation using this attribute to point to the 
                      next in the ring.
   
      SubElements:
	   
      Transform:      see transformRef.
      CompoundRep:    the Representation may not have a single location. Instead, it may
                      contain a number of CompoundRep sub-elements, each with its own 
                      location. The representation is the aggregate of these data sources.
      InternalRep:    the Representation may contain one element derived from InternalRep,
                      in which case it should not also have a location attribute.
	   
      May contain elements of type Material, EntityMaterial, TextureData, Texture, or
      EntityTexture.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AttribOwnerBase">
        <xsd:sequence>
          <xsd:element ref="plm:Transform" minOccurs="0"/>
          <xsd:element ref="plm:InternalRep" minOccurs="0"/>
          <xsd:element ref="plm:CompoundRep" minOccurs="0" maxOccurs="unbounded"/>
          <xsd:choice minOccurs="0" maxOccurs="unbounded">
            <xsd:element ref="plm:Material"/>
            <xsd:element ref="plm:EntityMaterial"/>
            <xsd:element ref="plm:TextureData"/>
            <xsd:element ref="plm:Texture"/>
            <xsd:element ref="plm:EntityTexture"/>
          </xsd:choice>
        </xsd:sequence>
        <xsd:attribute name="transformRef" type="xsd:IDREF" use="optional"/>
        <xsd:attribute name="format" type="plm:RepresentationFormatType" use="optional"/>
        <xsd:attribute name="revision" type="xsd:decimal" use="optional"/>
        <xsd:attributeGroup ref="plm:referenceGroup"/>
        <xsd:attribute name="equivalentRef" type="xsd:IDREF" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="Representation" type="plm:RepresentationType" substitutionGroup="plm:AttribOwner"/>
  <!-- -->
  <xsd:simpleType name="ProductViewDefinitionType">
    <xsd:restriction base="xsd:NMTOKEN">
      <xsd:enumeration value="select"/>
      <xsd:enumeration value="overlay"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:simpleType name="ProductViewUsageType">
    <xsd:restriction base="xsd:NMTOKEN">
      <xsd:enumeration value="visual"/>
      <xsd:enumeration value="arrangement"/>
      <xsd:enumeration value="variant"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:complexType name="ProductViewType">
    <xsd:annotation>
      <xsd:documentation>
      ProductView. This is a collection of Occurrences of Parts within one
      Assembly, i.e. it selects certain Occurrences, for example in order to
      display them.

      All the root Occurrences (given by primaryOccurrenceRef or rootRefs) must
      have the same 'top Structure'. This is called the 'top Structure' of the 
      ProductView.
	   
      Attributes:
	   
      primaryOccurrenceRef: )  These two attributes are used to specify the root
      rootRefs:             )  Occurrences, i.e. those which are not children of
                               other Occurrences in this ProductView. If there is
                               only one root, either attribute may be used. If there 
                               is more than one root, rootRefs must be used.
      viewControlRef:    optional reference to a ViewControl
      displayControlRef: optional reference to a DisplayControl

      alternativeOfRef:  A ProductView may be defined by reference to another ProductView,
                      in which case it may include Occurrences which override certain
                      corresponding Occurrences in the other ProductView. This attribute
                      is used to specify other ProductView, which must have the same
                      'top Structure' as this one.
                      
      definition:     how the ProductView is defined. 
                      
                      "select" means the ProductView is a selection of Occurrences from the
                      InstanceGraph. 
                      
                      "overlay" mean the ProductView modifies the view implied by the 
                      InstanceGraph by changing some of the Occurrences. (Occurrences can 
                      also be masked by including an Occurrence in the ProductView with 
                      its "visible" attribute set to "false").
                      
      usage:          This optional attribute specifies the intent of the ProductView. 
                      Possible values are:
      
                      "visual". This means that the Occurrences in the ProductView are simply 
                      for display, as in an exploded view. They do not necessarily represent a 
                      physically realisable state.
                      
                      "arrangement". The Occurrences represent a realisable state or position 
                      of (part of) the assembly.
                      
                      "variant". The Occurrences represent a configuration of the Product 
                      Structure, i.e. with certain Options chosen.
   
      SubElements:

      Occurrence:     the Occurrences in the ProductView.
      Transform:      Transforms which may be referenced by the Occurrences.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AttribOwnerBase">
        <xsd:choice minOccurs="0" maxOccurs="unbounded">
          <xsd:element ref="plm:Occurrence"/>
          <xsd:element ref="plm:Transform"/>
        </xsd:choice>
        <xsd:attribute name="primaryOccurrenceRef" type="xsd:IDREF" use="optional">
          <xsd:annotation>
            <xsd:appinfo source="PLMXMLSchemaGenerator">deprecated=true</xsd:appinfo>
          </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="rootRefs" type="xsd:IDREFS" use="optional"/>
        <xsd:attribute name="viewControlRef" type="xsd:IDREF" use="optional"/>
        <xsd:attribute name="displayControlRef" type="xsd:IDREF" use="optional"/>
        <xsd:attribute name="alternativeOfRef" type="plm:anyURIType" use="optional"/>
        <xsd:attribute name="definition" type="plm:ProductViewDefinitionType" use="optional"/>
        <xsd:attribute name="usage" type="plm:ProductViewUsageType" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- -->
  <xsd:simpleType name="PreferredPartUnitsType">
    <xsd:restriction base="xsd:NMTOKEN">
      <xsd:enumeration value="millimetres"/>
      <xsd:enumeration value="metres"/>
      <xsd:enumeration value="inches"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:simpleType name="PartTypesType">
    <xsd:annotation>
      <xsd:appinfo source="PLMXMLSchemaGenerator">sdkname=PartType</xsd:appinfo>
    </xsd:annotation>
    <xsd:restriction base="xsd:NMTOKEN">
      <xsd:enumeration value="assembly"/>
      <xsd:enumeration value="minimal"/>
      <xsd:enumeration value="wire"/>
      <xsd:enumeration value="solid"/>
      <xsd:enumeration value="sheet"/>
      <xsd:enumeration value="general"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:complexType name="InstanceGraphType">
    <xsd:annotation>
      <xsd:documentation>
      InstanceGraph. This is an element used as a container for elements which
      represent an assembly graph. 
	   
      Attributes:
	   
      rootInstanceRef: if the graph of Instances and StructureRevisionViews 
                       in the InstanceGraph has a single root, which is an Instance, 
                       this may be use to indicate it. 
      rootRefs:        however, in general there may be more than one root, and the 
                       roots may be Instances or StructureRevisionViews. The use of 
                       this attribute to specify the root(s) is preferred.
      
      viewControlRef:    optional reference to a ViewControl
      displayControlRef: optional reference to a DisplayControl
      
      SubElements:
      
      May contain any element derived from Instance, GDEInstanceGroup, Structure
      StructureRevision or StructureRevisionView. May also contain Transforms which
      may be referenced by Instances.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:PropertiesBase">
        <xsd:choice minOccurs="0" maxOccurs="unbounded">
          <xsd:element ref="plm:Instance"/>
          <xsd:element ref="plm:GDEInstanceGroup"/>
          <xsd:element ref="plm:StructureRevisionView"/>
          <xsd:element ref="plm:Structure"/>
          <xsd:element ref="plm:StructureRevision"/>
          <xsd:element ref="plm:Transform"/>
        </xsd:choice>
        <xsd:attribute name="rootInstanceRef" type="xsd:IDREF" use="optional">
          <xsd:annotation>
            <xsd:appinfo source="PLMXMLSchemaGenerator">deprecated=true</xsd:appinfo>
          </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="rootRefs" type="xsd:IDREFS" use="optional"/>
        <xsd:attribute name="viewControlRef" type="xsd:IDREF" use="optional"/>
        <xsd:attribute name="displayControlRef" type="xsd:IDREF" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="InstanceGraph" type="plm:InstanceGraphType"/>
  <!-- -->
  <xsd:complexType name="StructureDefBase">
    <xsd:annotation>
      <xsd:documentation>
      StructureDef. This element may contain one or more InstanceGraphs, representing
      all or part of one or more assembly graphs. It also contains elements relating
      to its display. 
	   
      Attributes:
	
      revision:           revision.
      defaultProductView: may be used to indicate a default from among the ProductViews.
      default:            may be used to indicate that this is the default from among the
                          StructureDefs in the document.
      
      revisionRuleRef: reference to a RevisionRule which was used to generate this
                       assembly from an Unconfigured Product Structure.
      variantRuleRef:  reference to a VariantRule which was use to generate this
                       assembly.
                       NB: these elements are not defined in this schema.
      
      SubElements:

      This element may contain Representations, DisplayControls, ViewControls, Light
      Sources, ProductViews, Materials, ConstructionGeometry, StructureRevisionViews,
      or InstanceGraphs.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AttribOwnerBase">
        <xsd:choice minOccurs="0" maxOccurs="unbounded">
          <xsd:element ref="plm:InstanceGraph"/>
          <xsd:element ref="plm:StructureRevisionView"/>
          <xsd:element ref="plm:Representation"/>
          <xsd:element name="ProductView" type="plm:ProductViewType"/>
          <xsd:element name="DisplayControl" type="plm:DisplayControlType"/>
          <xsd:element name="ViewControl" type="plm:ViewControlType"/>
          <xsd:element ref="plm:LightSource"/>
          <xsd:element ref="plm:Material"/>
          <xsd:element name="ConstructionGeometry" type="plm:ConstructionGeometryType"/>
        </xsd:choice>
        <xsd:attribute name="revision" type="xsd:decimal" use="optional"/>
        <xsd:attribute name="defaultProductView" type="xsd:IDREF" use="optional"/>
        <xsd:attribute name="default" type="xsd:boolean" use="optional"/>
        <xsd:attribute name="variantRuleRef" type="plm:anyURIType"/>
        <xsd:attribute name="revisionRuleRef" type="plm:anyURIType"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="StructureDef" type="plm:StructureDefBase" substitutionGroup="plm:AttribOwner"/>
  <!-- -->
  <xsd:complexType name="ProductDefType">
    <xsd:annotation>
      <xsd:documentation>
      ProductDef.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:StructureDefBase"/>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="ProductDef" type="plm:ProductDefType" substitutionGroup="plm:StructureDef"/>
  <!-- -->
  <xsd:simpleType name="UserValueDataType">
    <xsd:annotation>
      <xsd:documentation>
      Basic types that can be represented by user value entries and tables.

      int       = Data entity is an integer 
      ints      = Data entity is a list of integers
      real      = Data entity is a real
      reals     = Data entity is a list of reals
      boolean   = Data entity is a boolean (true/false)
      booleans  = Data entity is a list of booleans
      reference = Data entity is a reference (anyURI)
      enum      = Data entity is an enumeration.
      list      = Data entity is a list item.
      dateTime  = Data entity is a dateTime
                     (as in xsd:dateTime, i.e. CCYY-MM-DDThh:mm:ss).
      </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:NMTOKEN">
      <xsd:enumeration value="int"/>
      <xsd:enumeration value="ints"/>
      <xsd:enumeration value="real"/>
      <xsd:enumeration value="reals"/>
      <xsd:enumeration value="boolean"/>
      <xsd:enumeration value="booleans"/>
      <xsd:enumeration value="string"/>
      <xsd:enumeration value="reference"/>
      <xsd:enumeration value="enum"/>
      <xsd:enumeration value="list"/>
      <xsd:enumeration value="dateTime"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:complexType name="UserListElementType">
    <xsd:annotation>
      <xsd:documentation>
      This element defines a single entry in a UserList. The 'value' attribute 
      must contain data of the type specified by the 'type' attribute in the owning list.

      Attributes:

      value:          data value (required).
      description:    textual description of the value.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:attribute name="value" type="xsd:string" use="required"/>
    <xsd:attribute name="description" type="xsd:string" use="optional"/>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="UserListDataType">
    <xsd:annotation>
      <xsd:documentation>
      This element defines a list of user specified data items. Each item in the 
      list is of the same type - as specified by the 'type' attribute'.

      Attributes:

      type:           type of data items, i.e. int, ints, etc. 

      SubElements:

      Item:           One element per data item. (At least one).
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AttributeBase">
        <xsd:choice>
          <xsd:element name="Item" type="plm:UserListElementType" maxOccurs="unbounded"/>
        </xsd:choice>
        <xsd:attribute name="type" type="plm:UserValueDataType" default="string"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="UserList" type="plm:UserListDataType" substitutionGroup="plm:Attribute"/>
  <!-- -->
  <xsd:complexType name="UserDataElementType">
    <xsd:annotation>
      <xsd:appinfo source="PLMXMLSchemaGenerator">sdkname=UserValue</xsd:appinfo>
      <xsd:documentation>
      This element defines a single title/value pair in a UserData table.

      Attributes:

      title:          name of this entry in the table.
      value:          value of the entry.
      type:           datatype of the value, i.e. int, ints, etc, from UserValueDataType.
      format:         format string as used by printf.
      editable:       false if this value should not be modified by the receiving application.
      dataRef:        If type is 'enum' or 'list', then a UserList element should be specified
                      either by dataRef, or by being included as a sub-element. In the 'enum'
                      case, the UserList gives the valid values of the enum; in the 'list'
                      case, 'value' is ignored and the UserList IS the value of this entry in
                      the table. 

      minInclusive:   Minimum value allowed (inclusive).
      minExclusive:   Minimum value allowed (exclusive).
      maxInclusive:   Maximum value allowed (inclusive).
      maxExclusive:   Maximum value allowed (exclusive).
      stepValue:      Allowed values go from min to max in steps of 'stepValue'.
      minLength:      Minimum list length allowed (only for type="list").
      maxLength:      Maximum list length allowed (ditto).

      SubElements:

      UserList:       May contain a single UserList element (see dataRef above).
      </xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="UserList" type="plm:UserListDataType" minOccurs="0"/>
    </xsd:sequence>
    <xsd:attribute name="title" type="xsd:string" use="required"/>
    <xsd:attribute name="value" type="xsd:string" use="required"/>
    <xsd:attribute name="type" type="plm:UserValueDataType" default="string"/>
    <xsd:attribute name="format" type="xsd:string" use="optional"/>
    <xsd:attribute name="dataRef" type="plm:anyURIType" use="optional"/>
    <xsd:attribute name="editable" type="xsd:boolean" default="false"/>
    <xsd:attribute name="minInclusive" type="xsd:double" use="optional"/>
    <xsd:attribute name="minExclusive" type="xsd:double" use="optional"/>
    <xsd:attribute name="maxInclusive" type="xsd:double" use="optional"/>
    <xsd:attribute name="maxExclusive" type="xsd:double" use="optional"/>
    <xsd:attribute name="stepValue" type="xsd:double" use="optional"/>
    <xsd:attribute name="minLength" type="xsd:nonNegativeInteger" use="optional"/>
    <xsd:attribute name="maxLength" type="xsd:nonNegativeInteger" use="optional"/>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="UserDataType">
    <xsd:annotation>
      <xsd:documentation>
      The UserData element is a PLMXML Attribute used to represent a table of
      title/value pairs. It is up to communicating applications to agree on the
      meaning of these tables.
    
      UserData is based on the plm:Attribute base class so that it may be substituted
      wherever PLMXML Attributes are permitted. 

      Attributes:

      type:           A string giving the type of UserData. No specified values.

      SubElements:

      UserValue:      One element per entry in the table (at least one).
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AttributeBase">
        <xsd:choice>
          <xsd:element name="UserValue" type="plm:UserDataElementType" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:choice>
        <xsd:attribute name="type" type="xsd:string" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="UserData" type="plm:UserDataType" substitutionGroup="plm:Attribute"/>
  <!-- -->
  <xsd:complexType name="UserEnumDataType">
    <xsd:annotation>
      <xsd:appinfo source="PLMXMLSchemaGenerator">sdkname=UserEnum</xsd:appinfo>
      <xsd:documentation>
      This element represents a user defined enumeration value. 

      Attributes:

      value:          the enum value (required).
      listRef:        reference to a UserList element which gives the valid
                      values in the enum. 'value' must be one of these values.                            
      </xsd:documentation>
    </xsd:annotation>
    <xsd:attribute name="value" type="xsd:string" use="required"/>
    <xsd:attribute name="listRef" type="plm:anyURIType" use="optional"/>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="EntityUserDataType">
    <xsd:annotation>
      <xsd:documentation>
      This element is used to associate one or more entities with a set of UserData 
      elements. It is substitutable for Attribute.
      
      Attributes:
      
      userDataRefs:  IDREFS to the UserData element(s).
      
      SubElements:
      
      EntityRef:     Element derived from EntityRef, used to specify which entity
                     is to be associated with the UserData.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AttributeBase">
        <xsd:choice>
          <xsd:element ref="plm:EntityRef" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:choice>
        <xsd:attribute name="userDataRefs" type="xsd:IDREFS" use="required"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="EntityUserData" type="plm:EntityUserDataType" substitutionGroup="plm:Attribute"/>
  <!-- -->
  <xsd:simpleType name="XTDataType">
    <xsd:annotation>
      <xsd:documentation>
      This class represents the &lt;XTData&gt; element in a PLMXML
      file, which is used to embed XT files in a Representation 
      element, for example: 

        &lt;Representation ...&gt;
          &lt;XTRep&gt;
            &lt;XTData&gt;T51 : TRANSMIT FILE 
    created by modeller version 130021217 SCH_1300212_130060 
    12 1 63 2 3 0 0 0 0 1e3 1e-8 0 0 0 1 0 1 1 4 5 6 7 8 9 10 
    81 1 2 63 11 1 0 0 0 0 1 ...
            &lt;/XTData&gt;
          &lt;/XTRep&gt;
        &lt;/Representation&gt;
      </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:string"/>
  </xsd:simpleType>
  <!-- -->
  <xsd:complexType name="XTRepType">
    <xsd:annotation>
      <xsd:documentation>
      XT Representation component of the PLMXML Schema
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:InternalRepBase">
        <xsd:sequence>
          <xsd:element name="XTData" type="plm:XTDataType"/>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="XTRep" type="plm:XTRepType" substitutionGroup="plm:InternalRep"/>
  <!-- -->
  <xsd:simpleType name="MassPropertyUnitType">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="grams,millimetres">
        <xsd:annotation>
          <xsd:appinfo source="PLMXMLSchemaGenerator">sdkname=GramsMillimetres</xsd:appinfo>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration value="grams,centimetres">
        <xsd:annotation>
          <xsd:appinfo source="PLMXMLSchemaGenerator">sdkname=GramsCentimetres</xsd:appinfo>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration value="kilograms,metres">
        <xsd:annotation>
          <xsd:appinfo source="PLMXMLSchemaGenerator">sdkname=KilogramsMetres</xsd:appinfo>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration value="pounds,feet">
        <xsd:annotation>
          <xsd:appinfo source="PLMXMLSchemaGenerator">sdkname=PoundsFeet</xsd:appinfo>
        </xsd:annotation>
      </xsd:enumeration>
      <xsd:enumeration value="pounds,inches">
        <xsd:annotation>
          <xsd:appinfo source="PLMXMLSchemaGenerator">sdkname=PoundsInches</xsd:appinfo>
        </xsd:annotation>
      </xsd:enumeration>
    </xsd:restriction>
  </xsd:simpleType>
  <xsd:attributeGroup name="MassPropertyGroup">
    <xsd:attribute name="error" type="plm:RealFieldType" use="optional"/>
  </xsd:attributeGroup>
  <!-- -->
  <xsd:complexType name="MassPropertyRealType">
    <xsd:simpleContent>
      <xsd:extension base="plm:RealFieldType">
        <xsd:attributeGroup ref="plm:MassPropertyGroup"/>
      </xsd:extension>
    </xsd:simpleContent>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="LengthType">
    <xsd:simpleContent>
      <xsd:restriction base="plm:MassPropertyRealType"/>
    </xsd:simpleContent>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="AreaType">
    <xsd:simpleContent>
      <xsd:restriction base="plm:MassPropertyRealType"/>
    </xsd:simpleContent>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="VolumeType">
    <xsd:simpleContent>
      <xsd:restriction base="plm:MassPropertyRealType"/>
    </xsd:simpleContent>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="DensityType">
    <xsd:simpleContent>
      <xsd:restriction base="plm:MassPropertyRealType"/>
    </xsd:simpleContent>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="MassType">
    <xsd:simpleContent>
      <xsd:restriction base="plm:MassPropertyRealType"/>
    </xsd:simpleContent>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="MassPropertyVectorType">
    <xsd:simpleContent>
      <xsd:extension base="plm:VectorFieldType">
        <xsd:attributeGroup ref="plm:MassPropertyGroup"/>
      </xsd:extension>
    </xsd:simpleContent>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="CentreOfMassType">
    <xsd:simpleContent>
      <xsd:restriction base="plm:MassPropertyVectorType"/>
    </xsd:simpleContent>
  </xsd:complexType>
  <!-- -->
  <xsd:simpleType name="MassPropertyArrayFieldType">
    <xsd:restriction base="plm:DoubleListType">
      <xsd:length value="3"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:complexType name="MassPropertyArrayType">
    <xsd:simpleContent>
      <xsd:extension base="plm:MassPropertyArrayFieldType">
        <xsd:attributeGroup ref="plm:MassPropertyGroup"/>
      </xsd:extension>
    </xsd:simpleContent>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="MomentsOfInertiaType">
    <xsd:simpleContent>
      <xsd:restriction base="plm:MassPropertyArrayType"/>
    </xsd:simpleContent>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="ProductsOfInertiaType">
    <xsd:simpleContent>
      <xsd:restriction base="plm:MassPropertyArrayType"/>
    </xsd:simpleContent>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="MassPropertyType">
    <xsd:annotation>
      <xsd:documentation>
      PLMXML Attribute describing mass properties.
      </xsd:documentation>
      <xsd:appinfo source="PLMXMLSchemaGenerator">ChildElementOccurrences=1</xsd:appinfo>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AttributeBase">
        <xsd:choice minOccurs="0" maxOccurs="unbounded">
          <xsd:element name="Length" type="plm:LengthType"/>
          <xsd:element name="Area" type="plm:AreaType"/>
          <xsd:element name="Volume" type="plm:VolumeType"/>
          <xsd:element name="Density" type="plm:DensityType"/>
          <xsd:element name="Mass" type="plm:MassType"/>
          <xsd:element name="CentreOfMass" type="plm:CentreOfMassType"/>
          <xsd:element name="MomentsOfInertia" type="plm:MomentsOfInertiaType"/>
          <xsd:element name="ProductsOfInertia" type="plm:ProductsOfInertiaType"/>
        </xsd:choice>
        <xsd:attribute name="units" type="plm:MassPropertyUnitType" default="kilograms,metres"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="MassProperties" type="plm:MassPropertyType" substitutionGroup="plm:Attribute"/>
  <!-- -->
  <xsd:complexType name="DocumentBase" abstract="true">
    <xsd:annotation>
      <xsd:appinfo source="PLMXMLSchemaGenerator">sdkname=DocumentBase</xsd:appinfo>
      <xsd:documentation>
      This class corresponds to a top-level (root) element in a PLMXML file. 

      Attributes:

      author:        Author.
      date:          Date modified.
      time:          Time modified.
      language:      Language used, e.g. in comments.
      schemaVersion: Version of the schema this file was written for, e.g. "3.0".
      
      referenceSearchPaths:   A space-separated sequence of URIs or other strings used
                              by the Application to specify base URIs or other contexts
                              to enable relative URIs in the document to be resolved. The
                              URIs should be processed in sequence.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AttribOwnerBase">
        <xsd:attribute name="schemaVersion" type="xsd:decimal" use="required"/>
        <xsd:attribute name="author" type="xsd:string" use="required"/>
        <xsd:attribute name="time" type="xsd:time" use="required"/>
        <xsd:attribute name="date" type="xsd:date" use="required"/>
        <xsd:attribute name="language" type="xsd:language" default="en"/>
        <xsd:attribute name="referenceSearchPaths" type="xsd:string" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="MarkupType">
    <xsd:annotation>
      <xsd:documentation>
      The redline markup element for PLMXML - is a simple annotation
      type that describes its textual data via the xhtml spec. Thus
      the text can include format and font information as per a 
      normal html document.
      The redline element(s) is defined via simple polyline geometric
      element and references to related entities can be made via the 
      'EntityRef' element.
      </xsd:documentation>
      <xsd:appinfo source="PLMXMLSchemaGenerator">output=ignore</xsd:appinfo>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AttributeBase">
        <xsd:sequence>
          <xsd:element name="html">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:any namespace="http://www.w3.org/1999/xhtml" processContents="skip" maxOccurs="unbounded"/>
              </xsd:sequence>
              <xsd:anyAttribute namespace="http://www.w3.org/1999/xhtml"/>
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="Redline" type="plm:PolyLineType" minOccurs="0" maxOccurs="unbounded"/>
          <xsd:element ref="plm:EntityRef" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
        <xsd:attribute name="author" type="xsd:string" use="optional"/>
        <xsd:attribute name="time" type="xsd:time" use="optional"/>
        <xsd:attribute name="date" type="xsd:date" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="Markup" type="plm:MarkupType" substitutionGroup="plm:Attribute"/>
  <!-- -->
  <xsd:complexType name="SchemaType">
    <xsd:annotation>
      <xsd:documentation>
      This element contains or references an XML Schema used by the document it occurs in.
      The schema may be a full schema, or a 'skeleton' schema only provided to convey type
      hierarchy information.
      
      Attributes:
      
      schemaRef:         URI Reference to schema file
      
      SubElements:
      
      The actual schema, in the xsd namespace.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:IdBase">
        <xsd:sequence>
          <!-- have to use ##any to allow for appinfo elements -->
          <xsd:any namespace="##any" maxOccurs="unbounded" processContents="strict"/>
        </xsd:sequence>
        <xsd:attribute name="schemaRef" type="plm:anyURIType" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="SchemaInfoType">
    <xsd:annotation>
      <xsd:documentation>
      This element contains information about a PLMXML schema extension. It is embedded in the
      schema file inside an appinfo element.
      
      Attributes:
      
      version:       e.g. "4.1.1"
      status:        e.g. "development", "release".
      skeleton:      true if this is a schema skeleton, i.e. it just defines the type hierarchy 
                     but does not specify any attributes or sub-elements.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:attribute name="author" type="xsd:string"/>
    <xsd:attribute name="name" type="xsd:string"/>
    <xsd:attribute name="date" type="xsd:date"/>
    <xsd:attribute name="version" type="xsd:string"/>
    <xsd:attribute name="status" type="xsd:string"/>
    <xsd:attribute name="skeleton" type="xsd:boolean" default="false"/>
  </xsd:complexType>
  <xsd:element name="SchemaInfo" type="plm:SchemaInfoType"/>
  <!-- -->
  <xsd:complexType name="DocumentHeaderType">
    <xsd:annotation>
      <xsd:documentation>
      This element contains header information for the PLMXML document. 
      
      Attributes:
    
      traverseRootRefs:   a collection of elements to start from, if traversing
                          the PLM XML elements according to some rule.
      
      SubElements:
      
      Schema elements.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:IdBase">
        <xsd:sequence>
          <xsd:element name="Schema" type="plm:SchemaType" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
        <xsd:attribute name="traverseRootRefs" type="plm:uriReferenceListType" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="PLMXMLType">
    <xsd:annotation>
      <xsd:documentation>
      This defines the type of the outermost element in a PLMXML file.
      </xsd:documentation>
      <xsd:appinfo source="PLMXMLSchemaGenerator">sdkname=Document</xsd:appinfo>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:DocumentBase">
        <xsd:choice minOccurs="0" maxOccurs="unbounded">
          <xsd:annotation>
            <xsd:documentation>
            The elements inside the appinfo are not part of the actual schema, but are
            processed by the CodeGenerator, and so appear in the PLM XML SDK run-time
            model and API.
            </xsd:documentation>
            <xsd:appinfo source="PLMXMLSchemaGenerator">
              <xsd:element name="ProductDef" type="plm:ProductDefType"/>
              <xsd:element ref="plm:StructureDef"/>
              <xsd:element ref="plm:Representation"/>
              <xsd:element name="ConstructionGeometry" type="plm:ConstructionGeometryType"/>
              <xsd:element ref="plm:Structure"/>
              <xsd:element ref="plm:StructureRevision"/>
            </xsd:appinfo>
          </xsd:annotation>
          <xsd:element name="Header" type="plm:DocumentHeaderType"/>
          <xsd:element ref="plm:AttribOwner"/>
        </xsd:choice>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="PLMXML" type="plm:PLMXMLType"/>
  <!-- -->
  <!-- ************************* Structure *********************************** -->
  <!-- -->
  <xsd:complexType name="StructureBase" abstract="true">
    <xsd:annotation>
      <xsd:documentation>
      This is a base type for objects which can be revisioned and support hierarchical, 
      configurable structure.
      
      Attributes:
      
      catalogueId: The identifier of the Structure, unique in some context, e.g. an 
                   Organisation.
      
      optionRefs:  Options. Each Option gives the full set of allowed values for this
                   product. ProductRevisions may specify an Option with a sub-set of allowed values.
      
      releaseStatusRefs: Reference to one or more ReleaseStatus elements, which give release 
                   dates and effectivities.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:ManagedBase">
        <xsd:attribute name="catalogueId" type="xsd:string" use="optional"/>
        <xsd:attribute name="optionRefs" type="plm:uriReferenceListType" use="optional"/>
        <xsd:attribute name="releaseStatusRefs" type="plm:uriReferenceListType" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="Structure" type="plm:StructureBase" substitutionGroup="plm:Managed"/>
  <!-- -->
  <!-- ************************* StructureRevision *********************** -->
  <!-- -->
  <xsd:complexType name="StructureRevisionBase" abstract="true">
    <xsd:annotation>
      <xsd:documentation>
      This is a revision of a Structure.
      
      Attributes:
    
      revision:      Identifies the revision. Could be numeric, alphabetic, or a mixture.
      version:       Gives the current 'version' of this revision. The version captures
                     changes en route to the next revision of this Product. 
      masterRef:     Reference to the Structure of which this is a version.
      optionRefs:    Options. Each Option gives the set of allowed values for this
                     StructureRevision. 
      releaseStatusRefs: Reference to one or more ReleaseStatus elements, which give release 
                     dates and effectivities.
      instanceRefs:  Reference to elements derived from Instance, which define the
                     hierarchical structure. Both StructureRevision and StructureRevisionView
                     can have instanceRefs. In the case of StructureRevision, the element is
                     then representing a 'default' or 'unspecified' view.
                     
      gdeInstanceRefs: Referenced GDEInstance elements.

     
      simplifiedRepRefs: If an assembly has replacement representations (that is, in case the
                     assembly structure is not important in some context, then the replacement      
                     representations can be used).

      Elements:
                     
      VariantDefault    
      VariantRuleCheck  
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:ManagedBase">
        <xsd:choice minOccurs="0" maxOccurs="unbounded">
          <xsd:element ref="plm:VariantDefault"/>
          <xsd:element ref="plm:VariantRuleCheck"/>
        </xsd:choice>
        <xsd:attribute name="revision" type="xsd:string" use="required"/>
        <xsd:attribute name="version" type="xsd:nonNegativeInteger" use="optional"/>
        <xsd:attribute name="masterRef" type="plm:anyURIType" use="required"/>
        <xsd:attribute name="optionRefs" type="plm:uriReferenceListType" use="optional"/>
        <xsd:attribute name="releaseStatusRefs" type="plm:uriReferenceListType" use="optional"/>
        <xsd:attribute name="instanceRefs" type="plm:uriReferenceListType" use="optional"/>
        <xsd:attribute name="gdeInstanceRefs" type="plm:uriReferenceListType" use="optional"/>
        <xsd:attribute name="simplifiedRepRefs" type="plm:uriReferenceListType" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="StructureRevision" type="plm:StructureRevisionBase" substitutionGroup="plm:Managed"/>
  <!-- -->
  <!-- ************************* StructureRevisionView ****************************** -->
  <!-- -->
  <xsd:complexType name="StructureRevisionViewBase" abstract="true">
    <xsd:annotation>
      <xsd:documentation>
      This is a base type for elements representing a 'view' (design, 
      manufacturing, etc) of a StructureRevision.
	   
      Attributes:
	   
      revisionRef:    Specifies the StructureRevision of which this is a view.
      viewRef:        A reference to a view element (e.g. 'design')
      instanceRefs:   Referenced Instances which define the hierarchical structure.
                      
      gdeInstanceRefs: Referenced GDEInstance elements. 
                      
      occurrenceRefs: if an assembly, this element may have certain Occurrences singled out, so
                      that, for example, they can have different Materials associated, or can
                      be repositioned.

      SubElements:

      Occurrence:     These Occurrences play the same role as occurrenceRefs, above.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:ManagedBase">
        <xsd:choice minOccurs="0" maxOccurs="unbounded">
          <xsd:element ref="plm:Occurrence"/>
        </xsd:choice>
        <xsd:attribute name="revisionRef" type="plm:anyURIType" use="optional"/>
        <xsd:attribute name="viewRef" type="plm:anyURIType" use="optional"/>
        <xsd:attribute name="instanceRefs" type="xsd:IDREFS" use="optional"/>
        <xsd:attribute name="gdeInstanceRefs" type="plm:uriReferenceListType" use="optional"/>
        <xsd:attribute name="occurrenceRefs" type="plm:uriReferenceListType" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="StructureRevisionView" type="plm:StructureRevisionViewBase" substitutionGroup="plm:Managed"/>
  <!-- -->
  <!-- ************************* Product ****************************** -->
  <!-- -->
  <xsd:complexType name="ProductType">
    <xsd:annotation>
      <xsd:documentation>
      This is the revision-independent Product, derived from Structure.
      It corresponds to the STEP 'product'.
      
      Attributes:
      
      productId:        The identifier of the Product, unique in some context, e.g. an 
                        Organisation.
      alternateForRef:  An 'alternate' Product is one which is substitutable, in all 
                        contexts, for a particular Product. If this is an 'alternate'
                        Product, then this attribute references the Product for which this
                        is an alternate.

      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:StructureBase">
        <xsd:attribute name="productId" type="xsd:string" use="optional"/>
        <xsd:attribute name="alternateForRef" type="plm:anyURIType" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="Product" type="plm:ProductType" substitutionGroup="plm:Structure"/>
  <!-- -->
  <!-- ************************* ProductRevision *********************** -->
  <!-- -->
  <xsd:complexType name="ProductRevisionType">
    <xsd:annotation>
      <xsd:documentation>
      This is a revision of a Product. It corresponds to STEP 'product_definition_formation'.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:StructureRevisionBase"/>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="ProductRevision" type="plm:ProductRevisionType" substitutionGroup="plm:StructureRevision"/>
  <!-- -->
  <!-- ************************* ProductRevisionView ******************************** -->
  <!-- -->
  <xsd:complexType name="ProductRevisionViewType">
    <xsd:annotation>
      <xsd:documentation>
      This is a 'view' (e.g. 'design', 'manufacturing', 'maintenance') of a revision of a 
      Product.
      
      Attributes:
      
      releaseStatusRefs:  Reference to ReleaseStatus elements giving release date and
                          effectivity information for this revision.
      representationRefs: Representations of the ProductRevisionView.
      materialRef:        an optional Material for use when displaying the ProductRevisionView.
      preferredUnits:     the units preferred when presenting this element to the user. Note 
                          that this does NOT affect any numerical values representing lengths
                          in the PLMXML file - these are always in metres.
      geometryRefs:       geometry elements referenced by the ProductRevisionView.
      type:               assembly, minimal, wire, solid, sheet or general.
      
      annotation3DGroupRefs: (deprecated) reference to any 3D Annotation groups associated 
                          with the ProductRevisionView.
                          (note: these are not defined within this schema).
                          
      partRefs:           (deprecated). If an assembly, it is also possible to 'instance' 
                          other Parts directly without the need for an actual Instance 
                          element. However this is limited to cases where information 
                          stored on the Instance (such as Transform) is not required.
      
      SubElements:

      Representation:     see representationRefs.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:StructureRevisionViewBase">
        <xsd:choice minOccurs="0" maxOccurs="unbounded">
          <xsd:element ref="plm:Representation"/>
        </xsd:choice>
        <xsd:attribute name="releaseStatusRefs" type="plm:uriReferenceListType" use="optional"/>
        <xsd:attribute name="representationRefs" type="xsd:IDREFS" use="optional"/>
        <xsd:attribute name="materialRef" type="xsd:IDREF" use="optional"/>
        <xsd:attribute name="preferredUnits" type="plm:PreferredPartUnitsType" default="millimetres"/>
        <xsd:attribute name="geometryRefs" type="plm:uriReferenceListType" use="optional"/>
        <xsd:attribute name="type" type="plm:PartTypesType" use="optional"/>
        <xsd:attribute name="annotation3DGroupRefs" type="plm:uriReferenceListType" use="optional">
          <xsd:annotation>
            <xsd:appinfo source="PLMXMLSchemaGenerator">deprecated=true</xsd:appinfo>
          </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="partRefs" type="xsd:IDREFS" use="optional">
          <xsd:annotation>
            <xsd:appinfo source="PLMXMLSchemaGenerator">deprecated=true</xsd:appinfo>
          </xsd:annotation>
        </xsd:attribute>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="ProductRevisionView" type="plm:ProductRevisionViewType" substitutionGroup="plm:StructureRevisionView"/>
  <xsd:element name="Part" type="plm:ProductRevisionViewType" substitutionGroup="plm:StructureRevisionView">
    <xsd:annotation>
      <xsd:documentation>
      The Part element is only provided for legacy compatibility. Use the
      ProductRevisionView element in its place.
      </xsd:documentation>
      <xsd:appinfo source="PLMXMLSchemaGenerator">deprecated=true</xsd:appinfo>
      <xsd:appinfo source="PLMXMLSchemaGenerator">output=ignore</xsd:appinfo>
    </xsd:annotation>
  </xsd:element>
  <!-- -->
  <!-- ****************************** View ****************************** -->
  <!-- -->
  <xsd:complexType name="ViewType">
    <xsd:annotation>
      <xsd:documentation>
      This is a 'view' (e.g. 'design', 'manufacturing', 'maintenance'). Referenced by a 
      ProductRevisionView.
      
      Attributes:
      
      (the 'name' attribute of the View is inherited from AttribOwnerBase)
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AttribOwnerBase"/>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="View" type="plm:ViewType" substitutionGroup="plm:AttribOwner"/>
  <!-- -->
  <!-- *********************** GDERelationshipType *********************** -->
  <!-- -->
  <xsd:simpleType name="GDERelationshipType">
    <xsd:restriction base="xsd:string">
      <xsd:enumeration value="associated"/>
      <xsd:enumeration value="attached"/>
      <xsd:enumeration value="related"/>
      <xsd:enumeration value="connection"/>
      <xsd:enumeration value="implementation"/>
      <xsd:enumeration value="realisation"/>
      <xsd:enumeration value="misc"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <!-- ******************** GDEReferenceType ********************* -->
  <!-- -->
  <xsd:complexType name="GDEReferenceType">
    <xsd:annotation>
      <xsd:documentation>
      A reference from a GDEInstance to an Occurrence, or an Occurrence 
      and an entity in a Representation.
      
      Attributes:
     
      type:           type of the Reference.
      occurrenceRef:  reference to an Occurrence.
      
      Sub-elements:
      
      EntityRef:      reference to an Entity in a Representation. This must be
                      a Representation of the 'bottom Structure' of the Occurrence.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:IdBase">
        <xsd:sequence>
          <xsd:element ref="plm:EntityRef" minOccurs="0"/>
        </xsd:sequence>
        <xsd:attribute name="type" type="plm:GDERelationshipType" use="optional"/>
        <xsd:attribute name="occurrenceRef" type="xsd:anyURI" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- -->
  <!-- ************************* GDEBase ************************* -->
  <!-- -->
  <xsd:complexType name="GDEBase" abstract="true">
    <xsd:annotation>
      <xsd:documentation>
      This is the revision-independent Design feature, derived from
      Structure.
      
      Attributes:
     
      gdeInstanceRefs: a list of references to associated GDEInstances or GDEInstanceGroups.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:StructureBase">
        <xsd:attribute name="gdeInstanceRefs" type="plm:uriReferenceListType" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="GDE" type="plm:GDEBase" substitutionGroup="plm:Structure"/>
  <!-- -->
  <!-- *********************** GDERevisionBase ************************ -->
  <!-- -->
  <xsd:complexType name="GDERevisionBase" abstract="true">
    <xsd:annotation>
      <xsd:documentation>
      This is a revision of a GDE. 
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:StructureRevisionBase"/>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="GDERevision" type="plm:GDERevisionBase" substitutionGroup="plm:StructureRevision"/>
  <!-- -->
  <!-- ************************ GDERevisionViewBase ************************ -->
  <!-- -->
  <xsd:complexType name="GDERevisionViewBase" abstract="true">
    <xsd:annotation>
      <xsd:documentation>
      This is a 'view' (e.g. 'design', 'manufacturing', 'maintenance') of a 
      revision of a GDE.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:StructureRevisionViewBase"/>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="GDERevisionView" type="plm:GDERevisionViewBase" substitutionGroup="plm:StructureRevisionView"/>
  <!-- -->
  <!-- ****************************** LinkBase ****************************** -->
  <!-- -->
  <xsd:complexType name="LinkBase" abstract="true">
    <xsd:annotation>
      <xsd:documentation>
      A type of GDE which represents a non-revisionable connection between 
      (Occurrences of) elements.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:GDEBase"/>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="Link" type="plm:LinkBase" substitutionGroup="plm:GDE"/>
  <!-- -->
  <!-- ************************** ConnectionBase ************************** -->
  <!-- -->
  <xsd:complexType name="ConnectionBase" abstract="true">
    <xsd:annotation>
      <xsd:documentation>
      A type of GDE which represents a revisionable connection between (Occurrences
      of) elements.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:GDEBase"/>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="Connection" type="plm:ConnectionBase" substitutionGroup="plm:GDE"/>
  <!-- -->
  <!-- ************************* ConnectionRevisionType ************************* -->
  <!-- -->
  <xsd:complexType name="ConnectionRevisionType">
    <xsd:annotation>
      <xsd:documentation>
      This is a revision of a Connection. 
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:GDERevisionBase"/>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="ConnectionRevision" type="plm:ConnectionRevisionType" substitutionGroup="plm:GDERevision"/>
  <!-- -->
  <!-- ************************ ConnectionRevisionViewType *********************** -->
  <!-- -->
  <xsd:complexType name="ConnectionRevisionViewType">
    <xsd:annotation>
      <xsd:documentation>
      This is a 'view' (e.g. 'design', 'manufacturing', 'maintenance') of a 
      revision of a Connection.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:GDERevisionViewBase"/>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="ConnectionRevisionView" type="plm:ConnectionRevisionViewType" substitutionGroup="plm:GDERevisionView"/>
  <!-- -->
  <!-- ******************************* Feature ************************************ -->
  <!-- -->
  <xsd:complexType name="FeatureBase" abstract="true">
    <xsd:annotation>
      <xsd:documentation>
      This abstract datatype describes a single feature within the feature
      tree hierarchy. The feature description contains basic information
      such as name and type, as well as information to link the feature
      to the originating application. Parameter descriptions can also
      be included in the feature description.
    
      Attributes:
    
      nextFeature       - (optional) the XML id of the next feature in the 
                          feature hierarchy.
      targetFeature     - (optional) the XML id of the target feature that this
                          feature relies on. The target feature defines which
                          feature forms the resultant entity.
      toolFeature       - (optional) the XML id of the tool feature that this
                          feature relies on.  
      suppressed        - (default=false) TRUE if the feature is suppressed in 
                          the feature tree.
      editable          - (default=false)) TRUE if any parameters of the feature may 
                          be edited.
    
      Elements:  
    
      Type              - (1) element describing the type of feature. This is an 
                          application specific type. The receiving application is not 
                          meant to deduce or interpret the type but could use it to 
                          classify or group the feature.
 
      Parameter         - (0 or many) elements to describe the parameters associated 
                          with the  feature. It is up to the application to decide 
                          what parameters to exchange or describe within the feature 
                          description.
      EntityRef         - (0 or many) references to entities on another representation
                          (e.g. a BRep) expressed as PLMXML references.
      Reference         - (0 or many) references to other entities.

      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:GDEBase">
        <xsd:sequence>
          <xsd:element name="Type" type="plm:UserEnumDataType"/>
          <xsd:element name="Parameter" type="plm:UserDataElementType" minOccurs="0" maxOccurs="unbounded"/>
          <xsd:choice minOccurs="0" maxOccurs="unbounded">
            <xsd:element ref="plm:EntityRef"/>
            <xsd:element name="Reference" type="plm:GDEReferenceType"/>
          </xsd:choice>
        </xsd:sequence>
        <xsd:attribute name="nextFeature" type="xsd:IDREF" use="optional"/>
        <xsd:attribute name="targetFeature" type="xsd:IDREF" use="optional"/>
        <xsd:attribute name="toolFeature" type="xsd:IDREF" use="optional"/>
        <xsd:attribute name="suppressed" type="xsd:boolean" default="false"/>
        <xsd:attribute name="editable" type="xsd:boolean" default="false"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="Feature" type="plm:FeatureBase" substitutionGroup="plm:GDE"/>
  <!-- -->
  <xsd:complexType name="EnumFeatureType">
    <xsd:annotation>
      <xsd:documentation>
      Generic feature element which can be used to enumerate
      'any' parameterised feature. No semantic or specialised 
      information is exchanged via this schema.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:FeatureBase"/>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="EnumFeature" type="plm:EnumFeatureType" substitutionGroup="plm:Feature"/>
  <!-- -->
  <!-- ******************************** FeatureTree ************************** -->
  <!-- -->
  <xsd:complexType name="FeatureTreeType">
    <xsd:annotation>
      <xsd:documentation>
      This datatype describes a feature hierarchy for feature based
      modelling system.
  
      The feature hierarchy is represented via a single linked list of
      set of feature elements that reference the next feature in the 
      hieratchy. The linked list hierachy must describe the features
      in 'replay' order (ie. first operation first in the hierachy).
      There is scope to describe 'tree-like' dependencies via additional
      'dependentFeatures' reference attributes. 
  
      The feature tree is represented within PLMXML as an 'Internal Representation'
      - the FeatureTreeType is based on InternalRepBase and the 
      element FeatureTree is a substitution class for InternalRep.
      
      Attributes:
      
      firstFeature   - (optional) the XML id of the first feature in the 
                       feature hierarchy.
      editable       - (optional) TRUE if any features of the feature tree 
                       may be edited.

      Elements:
      
      Type           - (1) element describing the type of feature tree. This is an 
                       application specific type. The receiving application is not 
                       meant to deduce or interpret the type but could use it to 
                       classify feature tree.

      Feature        - (0 or many) the list of features thaat make up the feature tree.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:InternalRepBase">
        <xsd:sequence>
          <xsd:element name="Type" type="plm:UserEnumDataType"/>
          <xsd:element ref="plm:Feature" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
        <xsd:attribute name="firstFeature" type="xsd:IDREF" use="optional"/>
        <xsd:attribute name="editable" type="xsd:boolean" default="false"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="FeatureTree" type="plm:FeatureTreeType" substitutionGroup="plm:InternalRep"/>
  <!-- -->
  <!-- ****************************** StructureUsage ****************************** -->
  <!-- -->
  <xsd:complexType name="StructureUsageBase" abstract="true">
    <xsd:annotation>
      <xsd:documentation>
      A base type for a usage relation between Structure, StructureRevision and
      StructureRevisionView elements.
	   
      Attributes:
	   
      instancedRef     Reference to the 'used' element. This should be derived from 
                       StructureRevisionView, StructureRevision, or Structure. In the latter 
                       cases some other context must determine which view or revision is 
                       intended.
                       
      partRef:         This attribute is retained for compatibility reasons and should only
                       be used for Product Structure, not general Structures.
                       
      transformRef:    optional Transform which positions the 'used' element in the 
                       coordinates of the using one.
                       
      materialRef:     reference to a Material element to use when displaying the 'used' 
                       element.
	                   
	   representationRefs: an optional collection of Representations of the 'used' element.
                       
      SubElements:
      
      Transform:       see transformRef. (This should not be used in conjunction with
                       transformRef).
      Representation:  see representationRefs
      VariantCondition:An optional VariantCondition
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:ManagedBase">
        <xsd:sequence>
          <xsd:element ref="plm:Transform" minOccurs="0"/>
          <xsd:element ref="plm:Representation" minOccurs="0" maxOccurs="unbounded"/>
          <xsd:element ref="plm:VariantCondition" minOccurs="0"/>
        </xsd:sequence>
        <xsd:attribute name="instancedRef" type="plm:anyURIType" use="optional"/>
        <xsd:attribute name="transformRef" type="xsd:IDREF" use="optional"/>
        <xsd:attribute name="materialRef" type="xsd:IDREF" use="optional"/>
        <xsd:attribute name="partRef" type="plm:anyURIType" use="optional">
          <xsd:annotation>
            <xsd:appinfo source="PLMXMLSchemaGenerator">deprecated=true</xsd:appinfo>
          </xsd:annotation>
        </xsd:attribute>
        <xsd:attribute name="representationRefs" type="plm:uriReferenceListType" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="StructureUsage" type="plm:StructureUsageBase" substitutionGroup="plm:Managed"/>
  <!-- -->
  <!-- ****************************** Occurrence ****************************** -->
  <!-- -->
  <xsd:complexType name="OccurrenceType">
    <xsd:annotation>
      <xsd:documentation>
      Occurrence. An Occurrence specifies a usage of a Structure, StructureRevision, or
      StructureRevisionView in an Assembly. The usage is defined by specifying a chain of 
      Instances which lead from the Assembly down to the Structure, or by a chain of 
      Instances and other Occurrences, which when joined together define an Instance chain. 
      It is also possible for an Occurrence to reference a ProductView at the end of its 
      Instance chain, rather than a Structure.

      The Assembly, which is the parent of the first Instance in the Instance chain, is called
      the 'top Structure' of the Occurrence. The Structure, which is instanced by the last 
      Instance in the Instance chain, is called the 'bottom Structure' of the Occurrence.
      
      Note that the following inherited attributes on an Occurrence override the attributes 
      of the same name on the last Instance of the Instance chain:
	      materialRef
	      instanceRef
	      partRef
	      representationRefs
	      
	   In addition, the 'transformRef' attribute overrides the transform
	   obtained by accumulating the transforms in the Instance chain. 
	   
      Attributes:
	   
      instanceRefs:   chain of Instances which define the Occurrence.
      pathRefs:       chain of Instances and Occurrences which, when joined together,
                      define an Instance chain. Only one of instanceRefs and pathRefs should
                      be present.
     
      geometryRefs:   optional geometry associated with this Occurrence.

      occurrenceRefs: an Occurrence may have a number of 'child' Occurrences, which this 
                      attribute specifies. A child Occurrence must have an Instance chain which
                      is the same as that of its parent, but with one more Instance added at the 
                      bottom end. An Occurrence is normally only rendered in a view if it has no
                      child Occurrences.
                      
      alternativeOfRef: It is possible for one ProductView to be defined by reference to another
                      ProductView. In this case the first ProductView will contain some
                      Occurrences which override Occurrences in the referenced ProductView.
                      The 'alternativeOfRef' attribute is used to indicate the Occurrence which
                      this Occurrence is overriding. If an Occurrence has an alternativeOfRef
                      attribute, it should not also have an instanceRefs attribute, nor should
                      it have an occurrenceRefs attribute.

      productViewRef: If an Occurrence has a productViewRef, then it is regarded as an Occurrence
                      of that ProductView, not of its 'bottom Structure'. In this case, the 
                      'top Structure' of the ProductView must be the same as the 
                      'bottom Structure' of the Occurrence. 
                      
      visible:        Flag to indicate the Occurrence is visible. If absent, visible is implied.
                      An Occurrence which references another Occurrence via the
                      alternativeOfRef attribute may override its visibility, i.e. make it
                      visible if invisible or vice-versa.
   
      SubElements: 
      
      Material:
      EntityMaterial: Allows the association of a Material with an entity; for example the
                      Occurrence could specify the colour of a face of a body. The entity should
                      be in a Representation specified by this Occurrence, or by the last 
                      Instance in the Instance chain, or by the 'bottom Structure' of the 
                      Occurrence.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:StructureUsageBase">
        <xsd:sequence>
          <xsd:element ref="plm:Material" minOccurs="0" maxOccurs="unbounded"/>
          <xsd:element ref="plm:EntityMaterial" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
        <xsd:attribute name="occurrenceRefs" type="xsd:IDREFS" use="optional"/>
        <xsd:attribute name="instanceRefs" use="optional">
          <xsd:simpleType>
            <xsd:restriction base="plm:uriReferenceListType">
              <xsd:minLength value="1"/>
            </xsd:restriction>
          </xsd:simpleType>
        </xsd:attribute>
        <xsd:attribute name="pathRefs" type="plm:uriReferenceListType" use="optional"/>
        <xsd:attribute name="geometryRefs" type="plm:uriReferenceListType" use="optional"/>
        <xsd:attribute name="alternativeOfRef" type="plm:anyURIType" use="optional"/>
        <xsd:attribute name="productViewRef" type="plm:anyURIType" use="optional"/>
        <xsd:attribute name="visible" type="xsd:boolean" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="Occurrence" type="plm:OccurrenceType" substitutionGroup="plm:Managed"/>
  <!-- -->
  <!-- ****************************** Instance ****************************** -->
  <!-- -->
  <xsd:complexType name="InstanceBase">
    <xsd:annotation>
      <xsd:documentation>
      A base type for instancing relations between Structure, StructureRevision and
      StructureRevisionView elements. (This is not an abstract type because the Instance 
      element is retained for compatibility reasons).
	   
      Attributes:
	   
      quantity:        Quantity of the element referenced. If absent, 1 is implied. If 
                       present, any contained or referenced Transform is ignored.               
      unitRef:         Units for the quantity attribute. If absent, 'each' is implied. An 
                       IDREF to a 'Unit' element.
      instanceType     A 'subtype' string for the instance. No specified semantics.
      sequenceNumber   Serves to identify the instance within its parent. If 
                       present, should be unique within the parent.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:StructureUsageBase">
        <xsd:attribute name="quantity" type="xsd:double" use="optional"/>
        <xsd:attribute name="unitRef" type="xsd:IDREF" use="optional"/>
        <xsd:attribute name="instanceType" type="xsd:string" use="optional"/>
        <xsd:attribute name="sequenceNumber" type="xsd:nonNegativeInteger" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="Instance" type="plm:InstanceBase" substitutionGroup="plm:StructureUsage"/>
  <!-- -->
  <!-- ********************* ProductInstance ****************************** -->
  <!-- -->
  <xsd:complexType name="ProductInstanceType">
    <xsd:annotation>
      <xsd:documentation>
      An Instance between Product, ProductRevision, or ProductRevisionView elements.
      
      Attributes:
      
      substituteForRef:  A ProductInstance may be a 'substitute' for another, which means
                       that it may be used instead, but only in the context of their common
                       parent assembly. If this is a substitute for another ProductInstance,
                       then this attribute references it.

      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:InstanceBase">
        <xsd:attribute name="substituteForRef" type="plm:anyURIType" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="ProductInstance" type="plm:ProductInstanceType" substitutionGroup="plm:Instance"/>
  <!-- -->
  <!-- ********************* CompositionInstance ****************************** -->
  <!-- -->
  <xsd:complexType name="CompositionInstanceType" abstract="true">
    <xsd:annotation>
      <xsd:documentation>
      This is a base type for sub-types of Instance which need to reference 
      an Occurrence.
      
      Attributes:
      
      occurrenceRef:   the referenced Occurrence.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:InstanceBase">
        <xsd:attribute name="occurrenceRef" type="plm:anyURIType" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="CompositionInstance" type="plm:CompositionInstanceType" substitutionGroup="plm:Instance"/>
  <!-- -->
  <!-- ********************* GDEInstance ****************************** -->
  <!-- -->
  <xsd:complexType name="GDEInstanceType">
    <xsd:annotation>
      <xsd:documentation>
      An Instance of a GDE, a GDERevision or a GDERevisionView element.
      
      Elements:
      
      Reference           Elements referenced by the GDEInstance.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:InstanceBase">
        <xsd:sequence>
          <xsd:element name="Reference" type="plm:GDEReferenceType" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="GDEInstance" type="plm:GDEInstanceType" substitutionGroup="plm:Instance"/>
  <!-- -->
  <!-- ************************ GDEInstanceGroupType ************************* -->
  <!-- -->
  <xsd:complexType name="GDEInstanceGroupType">
    <xsd:annotation>
      <xsd:documentation>
      GDEInstanceGroup: derived from Managed.

      This global element is used to collect together a number of
      GDEInstance elements to simplify referencing.

      Elements:
      
      any number of GDEInstances.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:ManagedBase">
        <xsd:sequence>
          <xsd:element ref="plm:GDEInstance" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="GDEInstanceGroup" type="plm:GDEInstanceGroupType"/>
  <!-- -->
  <!-- ************************* ConfigurationContext ******************* -->
  <!-- -->
  <xsd:complexType name="ConfigurationContextType">
    <xsd:annotation>
      <xsd:documentation>
      This element acts as a context for effectivities. An Effectivity can reference a
      ConfigurationContext element to indicate that the Effectivity is only applicable
      to that ConfigurationContext. 
      
      Attributes:
       
      configId:   Unique identifier.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:ManagedBase">
        <xsd:attribute name="configId" type="xsd:string" use="required"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="ConfigurationContext" type="plm:ConfigurationContextType" substitutionGroup="plm:Managed"/>
  <!-- -->
  <!-- ********************* Effectivity ****************************** -->
  <!-- -->
  <xsd:complexType name="EffectivityType">
    <xsd:annotation>
      <xsd:documentation>
      Effectivity Base class.
      
      contextRef: the Product, ProductRevision, or ConfigurationContext in which this 
                  Effectivity applies. If absent, then the Effectivity is relevant for all 
                  Products and ProductRevisions which use the element to which the 
                  Effectivity is attached.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AttribOwnerBase">
        <xsd:attribute name="contextRef" type="plm:anyURIType" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="Effectivity" type="plm:EffectivityType" substitutionGroup="plm:AttribOwner"/>
  <!-- -->
  <!-- *********************** Date Effectivity ****************************** -->
  <!-- -->
  <xsd:complexType name="DateEffectivityType">
    <xsd:annotation>
      <xsd:documentation>
      Date Effectivity. Indicates that an element is effective between two specified dates.
      If the start date or end date is omitted, the effectivity is open-ended in that
      direction.

      Attributes:
     
      start:      Start date and time.
      end:        End date and time.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:EffectivityType">
        <xsd:attribute name="start" type="xsd:dateTime" use="optional"/>
        <xsd:attribute name="end" type="xsd:dateTime" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="DateEffectivity" type="plm:DateEffectivityType" substitutionGroup="plm:Effectivity"/>
  <!-- -->
  <!-- *********************** Lot Effectivity ******************************* -->
  <!-- -->
  <xsd:complexType name="LotEffectivityType">
    <xsd:annotation>
      <xsd:documentation>
      Lot Effectivity. Indicates that an element is effective only for a certain 'lot' or
      batch. 
      If the start date or end date is omitted, the effectivity is open-ended in that
      direction.

      Attributes:
     
      lot:        Lot identifier.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:EffectivityType">
        <xsd:attribute name="lot" type="xsd:string" use="required"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="LotEffectivity" type="plm:LotEffectivityType" substitutionGroup="plm:Effectivity"/>
  <!-- -->
  <!-- *********************** SerialNumber Effectivity ********************** -->
  <!-- -->
  <xsd:complexType name="SerialNumberEffectivityType">
    <xsd:annotation>
      <xsd:documentation>
      Serial Number Effectivity. Indicates that an element is effective for a range of
      serial numbers. If the start or end is omitted, the effectivity is open-ended in that
      direction.

      Attributes:
     
      start:      Start serial number.
      end:        End serial number.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:EffectivityType">
        <xsd:attribute name="start" type="xsd:string" use="optional"/>
        <xsd:attribute name="end" type="xsd:string" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="SerialNumberEffectivity" type="plm:SerialNumberEffectivityType" substitutionGroup="plm:Effectivity"/>
  <!-- -->
  <!-- ********************* Option ************************************************ -->
  <!-- -->
  <xsd:simpleType name="OptionScopeType">
    <xsd:restriction base="xsd:NMTOKEN">
      <xsd:enumeration value="public"/>
      <xsd:enumeration value="private"/>
      <xsd:enumeration value="legacy"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:simpleType name="OptionTypesType">
    <xsd:restriction base="xsd:NMTOKEN">
      <xsd:enumeration value="enum"/>
      <xsd:enumeration value="string"/>
      <xsd:enumeration value="int"/>
      <xsd:enumeration value="real"/>
      <xsd:enumeration value="logical"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:complexType name="OptionValueType">
    <xsd:attribute name="v" type="xsd:string"/>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="OptionType">
    <xsd:annotation>
      <xsd:documentation>
      Option. This element specifies the valid values for an Option, either as a set of
      allowed values (i.e. an enum), or as a range of values of a particular type.

      Attributes:

      scope:         Option scope.
      type:          Option type - enum, string, int, real or logical.

      SubElements:

      Value:         If the Option is of type enum, it should contain a sequence of Value
                     sub-elements giving the allowed values.

      GreaterThan:        ) If the Option type is not enum, then its allowed values are                   
      GreaterThanOrEqual: ) given by a range, which is specified by a GreaterThan or 
      LessThan:           ) GreaterThanOrEqual element, followed by a LessThan or
      LessThanOrEqual:    ) LessThanOrEqual element. These are all of type OptionValueType.

      Default:       Following these elements there may be a Default element giving a
                     default value for the Option.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AttribOwnerBase">
        <xsd:sequence>
          <xsd:choice>
            <xsd:choice maxOccurs="unbounded">
              <xsd:element name="Value" type="plm:OptionValueType"/>
            </xsd:choice>
            <xsd:sequence>
              <xsd:choice>
                <xsd:element name="GreaterThan" type="plm:OptionValueType"/>
                <xsd:element name="GreaterThanOrEqual" type="plm:OptionValueType"/>
              </xsd:choice>
              <xsd:choice>
                <xsd:element name="LessThan" type="plm:OptionValueType"/>
                <xsd:element name="LessThanOrEqual" type="plm:OptionValueType"/>
              </xsd:choice>
            </xsd:sequence>
          </xsd:choice>
          <xsd:element name="Default" type="plm:OptionValueType" minOccurs="0"/>
        </xsd:sequence>
        <xsd:attribute name="scope" type="plm:OptionScopeType" use="optional"/>
        <xsd:attribute name="type" type="plm:OptionTypesType" default="enum"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="Option" type="plm:OptionType" substitutionGroup="plm:AttribOwner"/>
  <!-- -->
  <!-- ********************* Operand *************************************** -->
  <!-- -->
  <xsd:complexType name="OperandBase" abstract="true">
    <xsd:annotation>
      <xsd:documentation>
      Operand - abstract base class for Operands (arguments of operators).
      </xsd:documentation>
    </xsd:annotation>
  </xsd:complexType>
  <xsd:element name="Operand" type="plm:OperandBase"/>
  <!-- -->
  <!-- ********************* Statement ************************************* -->
  <!-- -->
  <xsd:complexType name="StatementBase" abstract="true">
    <xsd:annotation>
      <xsd:documentation>
      Statement - abstract base class for statements.
      </xsd:documentation>
    </xsd:annotation>
  </xsd:complexType>
  <xsd:element name="Statement" type="plm:StatementBase"/>
  <!-- -->
  <!-- ********************* StatementListType ****************************** -->
  <!-- -->
  <xsd:complexType name="StatementListType">
    <xsd:annotation>
      <xsd:documentation>
      StatementList - a list of statements.

      SubElements:

      Contains a non-empty sequence of elements derived from Statement.      
      </xsd:documentation>
    </xsd:annotation>
    <xsd:choice maxOccurs="unbounded">
      <xsd:element ref="plm:Statement"/>
    </xsd:choice>
  </xsd:complexType>
  <!-- -->
  <!-- ********************* Expression ************************************ -->
  <!-- -->
  <xsd:complexType name="ExpressionBase" abstract="true">
    <xsd:annotation>
      <xsd:documentation>
      Expression - abstract base class for Expressions.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:OperandBase"/>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="Expression" type="plm:ExpressionBase" substitutionGroup="plm:Operand"/>
  <!-- -->
  <!-- ********************* LogicalExpression ****************************** -->
  <!-- -->
  <xsd:complexType name="LogicalExpressionBase" abstract="true">
    <xsd:annotation>
      <xsd:documentation>
      LogicalExpression - abstract base class for expressions returning a logical result.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:ExpressionBase"/>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="LogicalExpression" type="plm:LogicalExpressionBase" substitutionGroup="plm:Expression"/>
  <!-- -->
  <!-- ********************* And ********************************************* -->
  <!-- -->
  <xsd:complexType name="AndType">
    <xsd:annotation>
      <xsd:documentation>
      And - a type of logical expression.

      SubElements:

      At least two sub-elements, derived from LogicalExpression. The And expression
      returns true if all its sub-elements return true.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:LogicalExpressionBase">
        <xsd:choice minOccurs="2" maxOccurs="unbounded">
          <xsd:element ref="plm:LogicalExpression"/>
        </xsd:choice>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="And" type="plm:AndType" substitutionGroup="plm:LogicalExpression"/>
  <!-- -->
  <!-- ********************* Or ********************************************** -->
  <!-- -->
  <xsd:complexType name="OrType">
    <xsd:annotation>
      <xsd:documentation>
      Or - a type of logical expression.

      SubElements:

      At least two sub-elements, derived from LogicalExpression. The Or expression
      returns true if any of its sub-elements return true.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:LogicalExpressionBase">
        <xsd:choice minOccurs="2" maxOccurs="unbounded">
          <xsd:element ref="plm:LogicalExpression"/>
        </xsd:choice>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="Or" type="plm:OrType" substitutionGroup="plm:LogicalExpression"/>
  <!-- -->
  <!-- ********************* Not ******************************************** -->
  <!-- -->
  <xsd:complexType name="NotType">
    <xsd:annotation>
      <xsd:documentation>
      Not - a type of logical expression.

      SubElements:

      One sub-element, derived from LogicalExpression. The Not expression returns 
      true if its sub-element returns false.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:LogicalExpressionBase">
        <xsd:choice>
          <xsd:element ref="plm:LogicalExpression"/>
        </xsd:choice>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="Not" type="plm:NotType" substitutionGroup="plm:LogicalExpression"/>
  <!-- -->
  <!-- ********************* OptionIs **************************************** -->
  <!-- -->
  <xsd:simpleType name="LogicalOperationType">
    <xsd:restriction base="xsd:NMTOKEN">
      <xsd:enumeration value="eq"/>
      <xsd:enumeration value="ne"/>
      <xsd:enumeration value="gt"/>
      <xsd:enumeration value="ge"/>
      <xsd:enumeration value="lt"/>
      <xsd:enumeration value="le"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:complexType name="OptionIsType">
    <xsd:annotation>
      <xsd:documentation>
      OptionIs - a logical expression which returns true if a given Option has a
      particular relation to a given value (default equality relation).
      
      Attributes:

      optionRef:   Reference to the Option.
      value:       Specified value for the Option.
      operation:   The operation. For example if operation is "gt", then OptionIs
                   returns true if the option is greater than 'value'.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:LogicalExpressionBase">
        <xsd:attribute name="optionRef" type="plm:anyURIType" use="required"/>
        <xsd:attribute name="value" type="xsd:string" use="required"/>
        <xsd:attribute name="operation" type="plm:LogicalOperationType" default="eq"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="OptionIs" type="plm:OptionIsType" substitutionGroup="plm:LogicalExpression"/>
  <!-- -->
  <!-- ************************ Set **************************************** -->
  <!-- -->
  <xsd:complexType name="SetType">
    <xsd:annotation>
      <xsd:documentation>
      Set. A Statement which sets an Option to a particular value.

      Attributes:

      optionRef:   Reference to the Option.
      value:       Specified value for the Option.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:StatementBase">
        <xsd:attribute name="optionRef" type="plm:anyURIType" use="required"/>
        <xsd:attribute name="value" type="xsd:string" use="required"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="Set" type="plm:SetType" substitutionGroup="plm:Statement"/>
  <!-- -->
  <!-- ************************ SetDefault *********************************** -->
  <!-- -->
  <xsd:complexType name="SetDefaultType">
    <xsd:annotation>
      <xsd:documentation>
      SetDefault. A Statement which sets an Option to a particular value, if it
      is unset. Unlike the Set Statement, it will not override an existing value.

      Attributes:

      optionRef:   Reference to the Option.
      value:       Specified value for the Option.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:StatementBase">
        <xsd:attribute name="optionRef" type="plm:anyURIType" use="required"/>
        <xsd:attribute name="value" type="xsd:string" use="required"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="SetDefault" type="plm:SetDefaultType" substitutionGroup="plm:Statement"/>
  <!-- -->
  <!-- ************************ Fix ****************************************** -->
  <!-- -->
  <xsd:complexType name="FixType">
    <xsd:annotation>
      <xsd:documentation>
      Fix. A Statement which sets an Option to a particular value, and fixes it.
      Subsequent Set, SetDefault, or Fix Statements are not allowed to modify it.

      Attributes:

      optionRef:   Reference to the Option.
      value:       Specified value for the Option.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:StatementBase">
        <xsd:attribute name="optionRef" type="plm:anyURIType" use="required"/>
        <xsd:attribute name="value" type="xsd:string" use="required"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="Fix" type="plm:FixType" substitutionGroup="plm:Statement"/>
  <!-- -->
  <!-- ********************* Message **************************************** -->
  <!-- -->
  <xsd:complexType name="MessageBase" abstract="true">
    <xsd:annotation>
      <xsd:documentation>
      Message - abstract base class for Message Statements.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:StatementBase"/>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="Message" type="plm:MessageBase" substitutionGroup="plm:Statement"/>
  <!-- -->
  <!-- ********************* CheckMessage ************************************* -->
  <!-- -->
  <xsd:complexType name="CheckMessageType">
    <xsd:annotation>
      <xsd:documentation>
      Check Message. This is used in VariantRuleChecks.

      Attributes:

      message:     String message to output.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:MessageBase">
        <xsd:attribute name="message" type="xsd:string" use="required"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="CheckMessage" type="plm:CheckMessageType" substitutionGroup="plm:Message"/>
  <!-- -->
  <!-- ********************* InformMessage **************************************** -->
  <!-- -->
  <xsd:complexType name="InformMessageType">
    <xsd:annotation>
      <xsd:documentation>
      Inform Message. Outputs an informative message.

      Attributes:

      message:     String message to output.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:MessageBase">
        <xsd:attribute name="message" type="xsd:string" use="required"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="InformMessage" type="plm:InformMessageType" substitutionGroup="plm:Message"/>
  <!-- -->
  <!-- ********************* WarnMessage ******************************************* -->
  <!-- -->
  <xsd:complexType name="WarnMessageType">
    <xsd:annotation>
      <xsd:documentation>
      Warn Message. Outputs a warning message.

      Attributes:

      message:     String message to output.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:MessageBase">
        <xsd:attribute name="message" type="xsd:string" use="required"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="WarnMessage" type="plm:WarnMessageType" substitutionGroup="plm:Message"/>
  <!-- -->
  <!-- ********************* ErrorMessage ******************************************* -->
  <!-- -->
  <xsd:complexType name="ErrorMessageType">
    <xsd:annotation>
      <xsd:documentation>
      Error Message. Outputs an error message.

      Attributes:

      message:     String message to output.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:MessageBase">
        <xsd:attribute name="message" type="xsd:string" use="required"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="ErrorMessage" type="plm:ErrorMessageType" substitutionGroup="plm:Message"/>
  <!-- -->
  <!-- ********************* ConditionalStatement ****************************** -->
  <!-- -->
  <xsd:complexType name="ConditionalStatementType">
    <xsd:annotation>
      <xsd:documentation>
      ConditionalStatement. This is an If ... Then ... Else ... Statement.

      SubElements:

      First, an element derived from LogicalExpression.

      Then:         StatementList element, executed if the LogicalExpression returns true.
      Else:         Optional StatementList element, executed if the LogicalExpression
                    returns false.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:StatementBase">
        <xsd:sequence>
          <xsd:element ref="plm:LogicalExpression"/>
          <xsd:element name="Then" type="plm:StatementListType"/>
          <xsd:element name="Else" type="plm:StatementListType" minOccurs="0"/>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="If" type="plm:ConditionalStatementType" substitutionGroup="plm:Statement"/>
  <!-- -->
  <!-- ********************* VariantRule ****************************** -->
  <!-- -->
  <xsd:complexType name="VariantRuleType">
    <xsd:annotation>
      <xsd:documentation>
      VariantRule. This specifies a configuration by giving specified values for
      a set of Options.
      
      Attributes:
      
      configuredRef: The StructureRevision this VariantRule is associated with, if any.
      
      SubElements:

      A non-empty sequence of Set Statements, which specify values for a set of
      Options.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AttribOwnerBase">
        <xsd:sequence>
          <xsd:element ref="plm:Set" maxOccurs="unbounded"/>
        </xsd:sequence>
        <xsd:attribute name="configuredRef" type="plm:anyURIType" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="VariantRule" type="plm:VariantRuleType" substitutionGroup="plm:AttribOwner"/>
  <!-- -->
  <!-- ********************* VariantRuleCheck ****************************** -->
  <!-- -->
  <xsd:complexType name="VariantRuleCheckType">
    <xsd:annotation>
      <xsd:documentation>
      VariantRuleCheck. This outputs a Check Message if a condition is true.
      
      SubElements:

      An element derived from LogicalExpression.
      A Check element.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AttribOwnerBase">
        <xsd:sequence>
          <xsd:element ref="plm:LogicalExpression"/>
          <xsd:element ref="plm:CheckMessage"/>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="VariantRuleCheck" type="plm:VariantRuleCheckType"/>
  <!-- -->
  <!-- ********************* VariantDefault ****************************** -->
  <!-- -->
  <xsd:complexType name="VariantDefaultBase" abstract="true">
    <xsd:annotation>
      <xsd:documentation>
      VariantDefault. An abstract base class for Variant Defaults.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AttribOwnerBase"/>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="VariantDefault" type="plm:VariantDefaultBase"/>
  <!-- -->
  <!-- ********************* VariantDefaultFixed ****************************** -->
  <!-- -->
  <xsd:complexType name="VariantDefaultFixedType">
    <xsd:annotation>
      <xsd:documentation>
      VariantDefaultFixed. This is a collection of 'SetDefault' Statements.

      SubElements:
 
      A non-empty sequence of SetDefault Statements, which set the values of some
      Options, if they are not already set.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:VariantDefaultBase">
        <xsd:choice maxOccurs="unbounded">
          <xsd:element ref="plm:SetDefault"/>
        </xsd:choice>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="VariantDefaultFixed" type="plm:VariantDefaultFixedType" substitutionGroup="plm:VariantDefault"/>
  <!-- -->
  <!-- ********************* VariantDefaultDerived ****************************** -->
  <!-- -->
  <xsd:complexType name="VariantDefaultDerivedType">
    <xsd:annotation>
      <xsd:documentation>
      VariantDefaultDerived. A set of SetDefault Statements which depend on a 
      LogicalExpression.

      SubElements:

      An element derived from LogicalExpression.
      A non-empty sequence of SetDefault Statements, which are executed if the
          expression returns true.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:VariantDefaultBase">
        <xsd:sequence>
          <xsd:element ref="plm:LogicalExpression"/>
          <xsd:element ref="plm:SetDefault" maxOccurs="unbounded"/>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="VariantDefaultDerived" type="plm:VariantDefaultDerivedType" substitutionGroup="plm:VariantDefault"/>
  <!-- -->
  <!-- ********************* VariantCondition ****************************** -->
  <!-- -->
  <xsd:complexType name="VariantConditionType">
    <xsd:annotation>
      <xsd:documentation>
      VariantCondition. This contains a logical expression which determines whether
      the Instance it is attached to is 'loaded', i.e. appears in the configuration.

      SubElements:

      A single element derived from LogicalExpression.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AttribOwnerBase">
        <xsd:sequence>
          <xsd:element ref="plm:LogicalExpression"/>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="VariantCondition" type="plm:VariantConditionType"/>
  <!-- -->
  <!-- ***************************** Unit ****************************** -->
  <!-- -->
  <xsd:simpleType name="UnitPrefixType">
    <xsd:annotation>
      <xsd:documentation>
      Enum for SI unit prefixes, ranging from yotta (10**24) to yocto (10**-24)
      </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:NMTOKEN">
      <xsd:enumeration value="yotta"/>
      <xsd:enumeration value="zetta"/>
      <xsd:enumeration value="exa"/>
      <xsd:enumeration value="peta"/>
      <xsd:enumeration value="tera"/>
      <xsd:enumeration value="giga"/>
      <xsd:enumeration value="mega"/>
      <xsd:enumeration value="kilo"/>
      <xsd:enumeration value="hecto"/>
      <xsd:enumeration value="deka"/>
      <xsd:enumeration value="deci"/>
      <xsd:enumeration value="centi"/>
      <xsd:enumeration value="milli"/>
      <xsd:enumeration value="micro"/>
      <xsd:enumeration value="nano"/>
      <xsd:enumeration value="pico"/>
      <xsd:enumeration value="femto"/>
      <xsd:enumeration value="atto"/>
      <xsd:enumeration value="zepto"/>
      <xsd:enumeration value="yocto"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:complexType name="UnitComponentType">
    <xsd:annotation>
      <xsd:documentation>
      Component of a standard SI unit of measurement
			
      Attributes:
      
      prefix:      multiplier prefix, e.g. "kilo", "micro"
      exponent:    power to which unit is raised, e.g. seconds**-2
      </xsd:documentation>
    </xsd:annotation>
    <xsd:attribute name="exponent" type="xsd:double" default="1"/>
    <xsd:attribute name="prefix" type="plm:UnitPrefixType" use="optional"/>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="GeneralUnitComponentType">
    <xsd:annotation>
      <xsd:documentation>
      Component of a unit of measurement, other than a standard SI unit.
      
      The name of the unit can be any string, to allow for the numerous units
      in use. However the following strings should be used for the corresponding 
      common units:
      
      SI units (other than those given explicitly in the Unit element):

      "gram", "hertz", "newton", "pascal", "joule", "watt", "coulomb",
      "volt", "farad", "ohm", "siemens", "weber", "tesla", "henry", 
      "degreeCelsius", "lumen", "lux", "becquerel", "gray", "sievert".

      "are", "hectare", "litre" (note European spelling).

      Common non-SI units:
      
      "minute", "hour", "day".
      
      "inch", "foot", "yard", "mile", "nautical mile".
      "acre".
      
      "pint", "quart", "gallon", 
      "imperial pint", "imperial quart", "imperial gallon".

      "ounce", "pound".
			
      Attributes:
      
      name:        name of unit, e.g. "inch"
      prefix:      multiplier prefix, e.g. "kilo", "micro"
      exponent:    power to which unit is raised, e.g. cm**-2
      </xsd:documentation>
    </xsd:annotation>
    <xsd:attribute name="name" type="xsd:string" use="required"/>
    <xsd:attribute name="exponent" type="xsd:double" default="1"/>
    <xsd:attribute name="prefix" type="plm:UnitPrefixType" use="optional"/>
  </xsd:complexType>
  <!-- -->
  <xsd:complexType name="UnitType">
    <xsd:annotation>
      <xsd:documentation>
      Unit - a unit of measurement, e.g. gallons, or kilogram/metre**2.
		
      This defines the unit as a combination of powers of other units.
      The standard SI units are represented explicitly, other units are 
      given by a named element.

      SubElements:

      Metre:         a UnitComponent element giving the length exponent.
      ...etc...
      
      GeneralUnit:   powers of specified units.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AttribOwnerBase">
        <xsd:choice maxOccurs="unbounded">
          <xsd:element name="Metre" type="plm:UnitComponentType"/>
          <xsd:element name="Kilogram" type="plm:UnitComponentType"/>
          <xsd:element name="Second" type="plm:UnitComponentType"/>
          <xsd:element name="Ampere" type="plm:UnitComponentType"/>
          <xsd:element name="Mole" type="plm:UnitComponentType"/>
          <xsd:element name="Candela" type="plm:UnitComponentType"/>
          <xsd:element name="Kelvin" type="plm:UnitComponentType"/>
          <xsd:element name="GeneralUnit" type="plm:GeneralUnitComponentType"/>
        </xsd:choice>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="Unit" type="plm:UnitType" substitutionGroup="plm:AttribOwner"/>
  <!-- -->
  <!-- *************************** Owner ****************************** -->
  <!-- -->
  <xsd:complexType name="OwnerBase">
    <xsd:annotation>
      <xsd:documentation>
      Base class for entities which can 'own' objects (people, organisations, users, 
      sites, etc).
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AttribOwnerBase"/>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="Owner" type="plm:OwnerBase" substitutionGroup="plm:AttribOwner"/>
  <!-- -->
  <!-- ************************ Person ***************************************** -->
  <!-- -->
  <xsd:complexType name="PersonType">
    <xsd:annotation>
      <xsd:documentation>
      An individual Person.

      Attributes:

      firstName:    first name.
      middleNames:  middle names and/or initials.
      lastName:     last (family) name.
      userId:       user Id.
      addressRef:   optional reference to an Address element.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:OwnerBase">
        <xsd:attribute name="firstName" type="xsd:string" use="optional"/>
        <xsd:attribute name="middleNames" type="xsd:string" use="optional"/>
        <xsd:attribute name="lastName" type="xsd:string" use="optional"/>
        <xsd:attribute name="userId" type="xsd:string" use="optional"/>
        <xsd:attribute name="addressRef" type="plm:anyURIType" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="Person" type="plm:PersonType" substitutionGroup="plm:Owner"/>
  <!-- -->
  <!-- ************************ User ***************************************** -->
  <!-- -->
  <xsd:complexType name="UserType">
    <xsd:annotation>
      <xsd:documentation>
      A User, i.e. a user account on a computer system.

      Attributes:

      userId:        User Id.
      personRef:     optional reference to a Person element.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:OwnerBase">
        <xsd:attribute name="userId" type="xsd:string" use="required"/>
        <xsd:attribute name="personRef" type="plm:anyURIType" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="User" type="plm:UserType" substitutionGroup="plm:Owner"/>
  <!-- -->
  <!-- ************************ Organisation  *********************************** -->
  <!-- -->
  <xsd:complexType name="OrganisationType">
    <xsd:annotation>
      <xsd:documentation>
      An organisation, i.e. a group of people or users. Organisations are hierarchical.
      People/Users are associated with organisations by means of an OrganisationMember 
      element, which also specifies a Role.

      Attributes:

      (name:            Name, inherited from DescriptionBase)
      address:          Optional reference to Address.
      organisationRefs: Reference to sub-organisations.
      cageCode:         CAGE code (5 characters). This is a US govt company code.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:OwnerBase">
        <xsd:attribute name="organisationRefs" type="plm:uriReferenceListType" use="optional"/>
        <xsd:attribute name="addressRef" type="plm:anyURIType" use="optional"/>
        <xsd:attribute name="cageCode" type="xsd:string" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="Organisation" type="plm:OrganisationType" substitutionGroup="plm:Owner"/>
  <!-- -->
  <!-- ************************ Role ************************************ -->
  <!-- -->
  <xsd:complexType name="RoleType">
    <xsd:annotation>
      <xsd:documentation>
      A Role, e.g. "Designer", "Test Engineer", "Chairman", which a Person 
      plays in an organisation.
			
      Attributes:

      (name:         The name of the role, i.e. "Designer". Inherited from DescriptionBase)
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AttribOwnerBase"/>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="Role" type="plm:RoleType" substitutionGroup="plm:AttribOwner"/>
  <!-- -->
  <!-- ************************ OrganisationMember *********************** -->
  <!-- -->
  <xsd:complexType name="OrganisationMemberType">
    <xsd:annotation>
      <xsd:documentation>
      This element is used to associate a Person/User with an Organisation, and to 
      assign an optional Role to that Person/User within that Organisation. A person
      may have more than one Role in an Organisation.
      
      Attributes:

      memberRef:        Reference to a Person or User.
      organisationRef:  The Organisation.
      roleRef:          The Role.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:OwnerBase">
        <xsd:attribute name="memberRef" type="plm:anyURIType" use="required"/>
        <xsd:attribute name="organisationRef" type="plm:anyURIType" use="required"/>
        <xsd:attribute name="roleRef" type="plm:anyURIType" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="OrganisationMember" type="plm:OrganisationMemberType" substitutionGroup="plm:AttribOwner"/>
  <!-- -->
  <!-- ************************ ResourcePool **************************** -->
  <!-- -->
  <xsd:complexType name="ResourcePoolType">
    <xsd:annotation>
      <xsd:documentation>
      This is a class of people/users within an organisation, e.g. all people in 
      Company A with role 'programmer'. As such it references an organisation and 
      a role. It can be used as a resource without specifying a particular person.

      Attributes:

      organisationRef:  The Organisation.
      roleRef:          The Role.	
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AttribOwnerBase">
        <xsd:attribute name="organisationRef" type="plm:anyURIType" use="optional"/>
        <xsd:attribute name="roleRef" type="plm:anyURIType" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="ResourcePool" type="plm:ResourcePoolType" substitutionGroup="plm:AttribOwner"/>
  <!-- -->
  <!-- ************************ Address *********************** -->
  <!-- -->
  <xsd:complexType name="AddressType">
    <xsd:annotation>
      <xsd:documentation>
      An address for a Person or Organisation.

      Attributes:

      internalLocation:   Room, mailbox, etc.
      streetNumber:
      street:             Name of street, road, lane, etc.
      town:               Village, Town, City, etc.
      region:             Region, County, State, etc.
      country:            Country.
      postalCode:         PostCode, ZIP, etc.
      emailAddress:
      telephone:
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AttribOwnerBase">
        <xsd:attribute name="internalLocation" type="xsd:string" use="optional"/>
        <xsd:attribute name="streetNumber" type="xsd:string" use="optional"/>
        <xsd:attribute name="street" type="xsd:string" use="optional"/>
        <xsd:attribute name="town" type="xsd:string" use="optional"/>
        <xsd:attribute name="region" type="xsd:string" use="optional"/>
        <xsd:attribute name="postalCode" type="xsd:string" use="optional"/>
        <xsd:attribute name="country" type="xsd:string" use="optional"/>
        <xsd:attribute name="emailAddress" type="xsd:string" use="optional"/>
        <xsd:attribute name="telephone" type="xsd:string" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="Address" type="plm:AddressType" substitutionGroup="plm:AttribOwner"/>
  <!-- -->
  <!-- ************************ Site  *********************************** -->
  <!-- -->
  <xsd:complexType name="SiteType">
    <xsd:annotation>
      <xsd:documentation>
      A Site in the sense of a particular software installation, database,
      or location.
      
      Attributes:
      
      (name:          Name of the Site, inherited from DescriptionBase)
      siteId:         Identifying Id of the Site
      addressRef:     Reference to Address element.
      ownerRef:       Reference to owning Organisation.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:OwnerBase">
        <xsd:attribute name="siteId" type="xsd:string" use="optional"/>
        <xsd:attribute name="addressRef" type="plm:anyURIType" use="optional"/>
        <xsd:attribute name="ownerRef" type="plm:anyURIType" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="Site" type="plm:SiteType" substitutionGroup="plm:Owner"/>
  <!-- -->
  <!-- *********************** Access Control **************************** -->
  <!-- -->
  <xsd:simpleType name="AccessIntentEnum">
    <xsd:annotation>
      <xsd:documentation>
      Simple Access Control enum.

      reference:  read-only
      modifiable: read-write
      noAccess:   may not be accessed at all.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="xsd:NMTOKEN">
      <xsd:enumeration value="reference"/>
      <xsd:enumeration value="modifiable"/>
      <xsd:enumeration value="noAccess"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- -->
  <xsd:complexType name="AccessIntentType">
    <xsd:annotation>
      <xsd:documentation>
      Simple access control element. Specifies a set of owners, and read/write access.
      
      Attributes:
 
      intent:      reference, modifiable or noAccess.
      ownerRefs    Reference to one or more owners. These should be elements 
                   derived from plm:OwnerBase, e.g. Person, Organisation, Site, etc.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AccessControlBase">
        <xsd:attribute name="ownerRefs" type="plm:uriReferenceListType" use="optional"/>
        <xsd:attribute name="intent" type="plm:AccessIntentEnum" default="modifiable"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="AccessIntent" type="plm:AccessIntentType" substitutionGroup="plm:AccessControl"/>
  <!-- -->
  <!-- *********************** StatusInfo ******************************** -->
  <!-- -->
  <xsd:complexType name="StatusInfoType">
    <xsd:annotation>
      <xsd:documentation>
      Simple status information.
      
      Attributes:
      
      dateCreated:       Date and time created.  
      dateModified:      Date and time last modified.
      lastModifiedBy:    Person or User who last modified this element.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:StatusBase">
        <xsd:attribute name="dateCreated" type="xsd:dateTime" use="optional"/>
        <xsd:attribute name="dateModified" type="xsd:dateTime" use="optional"/>
        <xsd:attribute name="lastModifiedBy" type="plm:anyURIType" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="StatusInfo" type="plm:StatusInfoType" substitutionGroup="plm:Status"/>
  <!-- -->
  <!-- *********************** Checkout ******************************** -->
  <!-- -->
  <xsd:complexType name="CheckoutType">
    <xsd:annotation>
      <xsd:documentation>
      Checkout information.
      
      Attributes:
      
      by:           Person etc. holding the checkout. Derived from OwnerBase.
      date:         Date and time checked out.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:CheckoutStatusBase">
        <xsd:attribute name="date" type="xsd:dateTime" use="optional"/>
        <xsd:attribute name="by" type="plm:anyURIType" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="Checkout" type="plm:CheckoutType" substitutionGroup="plm:CheckoutStatus"/>
  <!-- -->
  <!-- ************************* Associated Files/Datasets ********************** -->
  <!-- -->
  <xsd:complexType name="AssociatedDataSetType">
    <xsd:annotation>
      <xsd:documentation>
      Attribute used to associate a DataSet with a PLM XML element.

      Attributes:
      
      dataSetRef: uri reference to DataSet
      role:       role/purpose of DataSet. No specified values.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AttributeBase">
        <xsd:attribute name="dataSetRef" type="plm:anyURIType" use="required"/>
        <xsd:attribute name="role" type="xsd:string" use="required"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="AssociatedDataSet" type="plm:AssociatedDataSetType" substitutionGroup="plm:Attribute"/>
  <!-- -->
  <xsd:complexType name="ExternalFileType">
    <xsd:annotation>
      <xsd:documentation>
      Represents an external file.

      Attributes:
      
      locationRef: uri of the file
      format:      format of the file. This should determine which applications
                   can read the file. There is no fixed set of values for this, but
                   will often correspond to the file extension, e.g. "doc", "txt".
                   If the format is the same as a Representation format, e.g. "JT",
                   then the same format string should be used.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:ManagedBase">
        <xsd:attribute name="locationRef" type="plm:anyURIType" use="required"/>
        <xsd:attribute name="format" type="xsd:string" use="required"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="ExternalFile" type="plm:ExternalFileType" substitutionGroup="plm:Managed"/>
  <!-- -->
  <xsd:complexType name="DataSetType">
    <xsd:annotation>
      <xsd:documentation>
      Represents a DataSet (collection of files)

      Attributes:
      
      (name:       name of the DataSet; inherited from AttribOwnerBase)
      version:     version number.
      type:        type of DataSet. No specified values.
      memberRefs:  uri references to the members of the DataSet. These should be
                   plm:ExternalFile elements.
      releaseStatusRefs: Reference to one or more ReleaseStatus elements, which give release 
                   dates and effectivities.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:ManagedBase">
        <xsd:attribute name="version" type="xsd:nonNegativeInteger" use="optional"/>
        <xsd:attribute name="type" type="xsd:string" use="optional"/>
        <xsd:attribute name="memberRefs" type="plm:uriReferenceListType" use="optional"/>
        <xsd:attribute name="releaseStatusRefs" type="plm:uriReferenceListType" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="DataSet" type="plm:DataSetType" substitutionGroup="plm:Managed"/>
  <!-- -->
  <!-- ********************* ReleaseStatus ******************************* -->
  <!-- -->
  <xsd:complexType name="ReleaseStatusType">
    <xsd:annotation>
      <xsd:documentation>
      ReleaseStatus. Specifies date of release, and effectivities.

      Attributes:
      
      dateReleased:    Date and time released.
      effectivityRefs: Reference to Effectivity elements.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AttribOwnerBase">
        <xsd:attribute name="dateReleased" type="xsd:dateTime" use="optional"/>
        <xsd:attribute name="effectivityRefs" type="plm:uriReferenceListType" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="ReleaseStatus" type="plm:ReleaseStatusType" substitutionGroup="plm:AttribOwner"/>
  <!-- -->
  <!-- -->
  <!-- ************************* Drawing ****************************** -->
  <!-- -->
  <xsd:complexType name="DrawingType">
    <xsd:annotation>
      <xsd:documentation>
      This is the revision-independent Drawing element. A Drawing is a 2D representation
      of one or more ProductRevisions/ProductRevisionViews.
      
      Use the 'catalogueId' attribute on the Structure class as a persistent Id for the Drawing.
      
      Attributes:
      
      title          Title of the Drawing.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:StructureBase">
        <xsd:attribute name="title" type="xsd:string" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="Drawing" type="plm:DrawingType" substitutionGroup="plm:Structure"/>
  <!-- -->
  <!-- ************************* DrawingRevision *********************** -->
  <!-- -->
  <xsd:complexType name="DrawingRevisionType">
    <xsd:annotation>
      <xsd:documentation>
      This is a revision of a Drawing.
      
      Attributes:
      
      externalFileRefs:  URI references to the Drawing files. These should be ExternalFile 
                         elements.
      drawnRefs:         URI references to ProductRevisions or ProductRevisionViews
                         drawn in this Drawing revision.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:StructureRevisionBase">
        <xsd:attribute name="externalFileRefs" type="plm:uriReferenceListType" use="optional"/>
        <xsd:attribute name="drawnRefs" type="plm:uriReferenceListType" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="DrawingRevision" type="plm:DrawingRevisionType" substitutionGroup="plm:StructureRevision"/>
  <!-- -->
  <!-- ************************* ProductFamily ***************************** -->
  <!-- -->
  <xsd:complexType name="ProductFamilyType">
    <xsd:annotation>
      <xsd:documentation>
      This element connects a ProductRevision or ProductRevisionView to a 'template'
      ProductRevision/ProductRevisionView which represents a Product Family of which 
      it is a member. For example a template ProductRevision might represent the 'Bolt'
      family and a member ProductRevision might be a 2cm Bolt.
      
      The member may be specified by a collection of parameter values in the 'Parameters' 
      UserData sub-element. The exact way in which these parameters are interpreted will
      depend on the CAD system which defined the Template.
      
      Attributes:
      
      memberRef:         URI reference to member ProductRevision/ProductRevisionView
      templateRef:       URI reference to template ProductRevision/ProductRevisionView
      
      SubElements:
      
      Parameters         UserData element containing defining parameters for the member
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:ManagedBase">
        <xsd:sequence>
          <xsd:element name="Parameters" type="plm:UserDataType" minOccurs="0"/>
        </xsd:sequence>
        <xsd:attribute name="memberRef" type="plm:anyURIType" use="required"/>
        <xsd:attribute name="templateRef" type="plm:anyURIType" use="required"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="ProductFamily" type="plm:ProductFamilyType" substitutionGroup="plm:Managed"/>
  <!-- -->
  <!-- ************************* ProductDependency ***************************** -->
  <!-- -->
  <xsd:complexType name="ProductDependencyType">
    <xsd:annotation>
      <xsd:documentation>
      This element represents a dependency between one ProductRevision, ProductRevisionView
      or Occurrence, and another. The slave depends in some way on the master. 
      
      The nature of the dependency may be specific to the CAD system which defined it, and
      is specified by the 'type' attribute, and the 'Parameters' UserData sub-element.
      
      Attributes:
      
      type            The type of dependency.
      slaveRef        URI reference to the dependent ProductRevision, ProductRevisionView or
                         Occurrence.
      masterRef       URI reference to the master ProductRevision, ProductRevisionView or
                         Occurrence.
      </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:ConnectionBase">
        <xsd:sequence>
          <xsd:element name="Parameters" type="plm:UserDataType" minOccurs="0"/>
        </xsd:sequence>
        <xsd:attribute name="type" type="xsd:string" use="optional"/>
        <xsd:attribute name="slaveRef" type="plm:anyURIType" use="required"/>
        <xsd:attribute name="masterRef" type="plm:anyURIType" use="required"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="ProductDependency" type="plm:ProductDependencyType" substitutionGroup="plm:Connection"/>
  <!-- -->
  <!-- ************************* ValueWithUnit ****************************** -->
  <!-- -->
  <xsd:complexType name="ValueWithUnitType">
    <xsd:annotation>
      <xsd:documentation>
      This represents a numerical value with a unit, e.g. "3.1 miles".
      
      Attributes:
      
      name:       (inherited from DescriptionBase) name, e.g. "mileage"
      value:      the value
      unitRef:    reference to a Unit element. If this omitted, the value is unitless.
	   </xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="plm:AttribOwnerBase">
        <xsd:attribute name="value" type="xsd:double" use="required"/>
        <xsd:attribute name="unitRef" type="plm:anyURIType" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <xsd:element name="ValueWithUnit" type="plm:ValueWithUnitType" substitutionGroup="plm:AttribOwner"/>
  <!-- -->
</xsd:schema>
