<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://www.opengis.net/gml" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:gml="http://www.opengis.net/gml" xmlns:smil20="http://www.w3.org/2001/SMIL20/" elementFormDefault="qualified" version="3.0.1">
  <xsd:annotation>
    <xsd:appinfo source="urn:opengis:specification:gml:schema-defaultStyle:v3.0.1">defaultStyle.xsd</xsd:appinfo>
    <xsd:documentation>
      <name>defaultStyle.xsd</name>
      <version>3.0</version>
      <scope/>
      <description>Default Style schema for GML 3.0</description>
      <copyright>Copyright (c) 2001-2002 OGC, All Rights Reserved.</copyright>
      <conformance>reference to ISO Specifications</conformance>
    </xsd:documentation>
  </xsd:annotation>
  <!-- ==============================================================
       includes and imports
	============================================================== -->
  <xsd:include schemaLocation="measures.xsd"/>
  <xsd:import namespace="http://www.w3.org/2001/SMIL20/" schemaLocation="../smil/smil20.xsd"/>
  <!-- ==============================================================
      the property
	============================================================== -->
  <xsd:element name="defaultStyle" type="gml:DefaultStylePropertyType" substitutionGroup="gml:_property">
    <xsd:annotation>
      <xsd:documentation>Top-level property. Used in application schemas to "attach" the styling information to GML data. The link between the data and the style should be established through this property only.</xsd:documentation>
    </xsd:annotation>
  </xsd:element>
  <!-- =========================================================== -->
  <xsd:complexType name="DefaultStylePropertyType">
    <xsd:annotation>
      <xsd:documentation>[complexType of] Top-level property. Used in application schemas to "attach" the styling information to GML data. The link between the data and the style should be established through this property only.</xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element ref="gml:_Style" minOccurs="0"/>
    </xsd:sequence>
    <xsd:attribute name="about" type="anyURI" use="optional"/>
    <xsd:attributeGroup ref="gml:AssociationAttributeGroup"/>
  </xsd:complexType>
  <!-- ==============================================================
       the style
	============================================================== -->
  <xsd:element name="_Style" type="gml:AbstractStyleType" abstract="true" substitutionGroup="gml:_GML">
    <xsd:annotation>
      <xsd:documentation>The value of the top-level property. It is an abstract element. Used as the head element of the substitution group for extensibility purposes.</xsd:documentation>
    </xsd:annotation>
  </xsd:element>
  <!-- =========================================================== -->
  <xsd:complexType name="AbstractStyleType" abstract="true">
    <xsd:annotation>
      <xsd:documentation>[complexType of] The value of the top-level property. It is an abstract element. Used as the head element of the substitution group for extensibility purposes.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="gml:AbstractGMLType"/>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- =========================================================== -->
  <xsd:element name="Style" type="gml:StyleType" substitutionGroup="gml:_Style">
    <xsd:annotation>
      <xsd:documentation>Predefined concrete value of the top-level property. Encapsulates all other styling information.</xsd:documentation>
    </xsd:annotation>
  </xsd:element>
  <!-- =========================================================== -->
  <xsd:complexType name="StyleType">
    <xsd:annotation>
      <xsd:documentation>[complexType of] Predefined concrete value of the top-level property. Encapsulates all other styling information.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="gml:AbstractStyleType">
        <xsd:sequence>
          <xsd:element ref="gml:FeatureStyle" minOccurs="0" maxOccurs="unbounded"/>
          <xsd:element ref="gml:GraphStyle" minOccurs="0"/>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- ==============================================================
       base style descriptor type (for geometry, topology, label, graph)
	============================================================== -->
  <xsd:complexType name="BaseStyleDescriptorType">
    <xsd:annotation>
      <xsd:documentation>Base complex type for geometry, topology, label and graph styles.</xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="spatialResolution" type="gml:ScaleType" minOccurs="0"/>
      <xsd:element name="styleVariation" type="gml:StyleVariationType" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element ref="smil20:animate" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element ref="smil20:animateMotion" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element ref="smil20:animateColor" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element ref="smil20:set" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
  </xsd:complexType>
  <!-- ==============================================================
       style descriptors
	============================================================== -->
  <xsd:element name="FeatureStyle" type="gml:FeatureStyleType">
    <xsd:annotation>
      <xsd:documentation>The style descriptor for features.</xsd:documentation>
    </xsd:annotation>
  </xsd:element>
  <!-- =========================================================== -->
  <xsd:complexType name="FeatureStyleType">
    <xsd:annotation>
      <xsd:documentation>[complexType of] The style descriptor for features.</xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="featureConstraint" type="string" minOccurs="0"/>
      <xsd:element ref="gml:GeometryStyle" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element ref="gml:TopologyStyle" minOccurs="0" maxOccurs="unbounded"/>
      <xsd:element ref="gml:LabelStyle" minOccurs="0"/>
    </xsd:sequence>
    <xsd:attribute name="featureType" type="string" use="optional"/>
    <xsd:attribute name="baseType" type="string" use="optional"/>
  </xsd:complexType>
  <!-- =========================================================== -->
  <xsd:element name="GeometryStyle" type="gml:GeometryStyleType">
    <xsd:annotation>
      <xsd:documentation>The style descriptor for geometries of a feature.</xsd:documentation>
    </xsd:annotation>
  </xsd:element>
  <!-- =========================================================== -->
  <xsd:complexType name="GeometryStyleType">
    <xsd:annotation>
      <xsd:documentation>[complexType of] The style descriptor for geometries of a feature.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="gml:BaseStyleDescriptorType">
        <xsd:sequence>
          <xsd:choice>
            <xsd:element ref="gml:symbol"/>
            <xsd:element name="style" type="string"/>
          </xsd:choice>
          <xsd:element ref="gml:LabelStyle" minOccurs="0"/>
        </xsd:sequence>
        <xsd:attribute name="geometryProperty" type="string"/>
        <xsd:attribute name="geometryType" type="string"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- =========================================================== -->
  <xsd:element name="TopologyStyle" type="gml:TopologyStyleType">
    <xsd:annotation>
      <xsd:documentation>The style descriptor for topologies of a feature. Describes individual topology elements styles.</xsd:documentation>
    </xsd:annotation>
  </xsd:element>
  <!-- =========================================================== -->
  <xsd:complexType name="TopologyStyleType">
    <xsd:annotation>
      <xsd:documentation>[complexType of] The style descriptor for topologies of a feature. Describes individual topology elements styles.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="gml:BaseStyleDescriptorType">
        <xsd:sequence>
          <xsd:choice>
            <xsd:element ref="gml:symbol"/>
            <xsd:element name="style" type="string"/>
          </xsd:choice>
          <xsd:element ref="gml:LabelStyle" minOccurs="0"/>
        </xsd:sequence>
        <xsd:attribute name="topologyProperty" type="string"/>
        <xsd:attribute name="topologyType" type="string"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- =========================================================== -->
  <xsd:element name="LabelStyle" type="gml:LabelStyleType">
    <xsd:annotation>
      <xsd:documentation>The style descriptor for labels of a feature, geometry or topology.</xsd:documentation>
    </xsd:annotation>
  </xsd:element>
  <!-- =========================================================== -->
  <xsd:complexType name="LabelStyleType">
    <xsd:annotation>
      <xsd:documentation>[complexType of] The style descriptor for labels of a feature, geometry or topology.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="gml:BaseStyleDescriptorType">
        <xsd:sequence>
          <xsd:element name="style" type="string"/>
          <xsd:element name="label" type="gml:LabelType"/>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- =========================================================== -->
  <xsd:element name="GraphStyle" type="gml:GraphStyleType">
    <xsd:annotation>
      <xsd:documentation>The style descriptor for a graph consisting of a number of features. Describes graph-specific style attributes.</xsd:documentation>
    </xsd:annotation>
  </xsd:element>
  <!-- =========================================================== -->
  <xsd:complexType name="GraphStyleType">
    <xsd:annotation>
      <xsd:documentation>[complexType of] The style descriptor for a graph consisting of a number of features. Describes graph-specific style attributes.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="gml:BaseStyleDescriptorType">
        <xsd:sequence>
          <xsd:element name="planar" type="boolean" minOccurs="0"/>
          <xsd:element name="directed" type="boolean" minOccurs="0"/>
          <xsd:element name="grid" type="boolean" minOccurs="0"/>
          <xsd:element name="minDistance" type="double" minOccurs="0"/>
          <xsd:element name="minAngle" type="double" minOccurs="0"/>
          <xsd:element name="graphType" type="gml:GraphTypeType" minOccurs="0"/>
          <xsd:element name="drawingType" type="gml:DrawingTypeType" minOccurs="0"/>
          <xsd:element name="lineType" type="gml:LineTypeType" minOccurs="0"/>
          <xsd:element name="aestheticCriteria" type="gml:AesheticCriteriaType" minOccurs="0" maxOccurs="unbounded"/>
        </xsd:sequence>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- =========================================================== -->
  <xsd:element name="symbol" type="gml:SymbolType">
    <xsd:annotation>
      <xsd:documentation>The symbol property. Extends the gml:AssociationType to allow for remote referencing of symbols.</xsd:documentation>
    </xsd:annotation>
  </xsd:element>
  <!-- =========================================================== -->
  <xsd:complexType name="SymbolType">
    <xsd:annotation>
      <xsd:documentation>[complexType of] The symbol property. Extends the gml:AssociationType to allow for remote referencing of symbols.</xsd:documentation>
    </xsd:annotation>
    <xsd:complexContent>
      <xsd:extension base="gml:AssociationType">
        <xsd:attribute name="symbolType" type="gml:SymbolTypeEnumeration" use="required"/>
        <xsd:attribute ref="gml:transform" use="optional"/>
      </xsd:extension>
    </xsd:complexContent>
  </xsd:complexType>
  <!-- =========================================================== -->
  <xsd:simpleType name="SymbolTypeEnumeration">
    <xsd:annotation>
      <xsd:documentation>Used to specify the type of the symbol used.</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="string">
      <xsd:enumeration value="svg"/>
      <xsd:enumeration value="other"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- =========================================================== -->
  <xsd:complexType name="LabelType" mixed="true">
    <xsd:annotation>
      <xsd:documentation>Label is mixed -- composed of text and XPath expressions used to extract the useful information from the feature.</xsd:documentation>
    </xsd:annotation>
    <xsd:sequence>
      <xsd:element name="LabelExpression" type="string" minOccurs="0" maxOccurs="unbounded"/>
    </xsd:sequence>
    <xsd:attribute ref="gml:transform" use="optional"/>
  </xsd:complexType>
  <!-- =========================================================== -->
  <xsd:attribute name="transform" type="string">
    <xsd:annotation>
      <xsd:documentation>Defines the geometric transformation of entities. There is no particular grammar defined for this value.</xsd:documentation>
    </xsd:annotation>
  </xsd:attribute>
  <!-- =========================================================== -->
  <xsd:complexType name="StyleVariationType">
    <xsd:annotation>
      <xsd:documentation>Used to vary individual graphic parameters and attributes of the style, symbol or text.</xsd:documentation>
    </xsd:annotation>
    <xsd:simpleContent>
      <xsd:extension base="string">
        <xsd:attribute name="styleProperty" type="string" use="required"/>
        <xsd:attribute name="featurePropertyRange" type="string" use="optional"/>
      </xsd:extension>
    </xsd:simpleContent>
  </xsd:complexType>
  <!-- ==============================================================
       simple types
	============================================================== -->
  <xsd:simpleType name="GraphTypeType">
    <xsd:annotation>
      <xsd:documentation>Graph-specific styling property.</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="string">
      <xsd:enumeration value="TREE"/>
      <xsd:enumeration value="BICONNECTED"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- =========================================================== -->
  <xsd:simpleType name="DrawingTypeType">
    <xsd:annotation>
      <xsd:documentation>Graph-specific styling property.</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="string">
      <xsd:enumeration value="POLYLINE"/>
      <xsd:enumeration value="ORTHOGONAL"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- =========================================================== -->
  <xsd:simpleType name="LineTypeType">
    <xsd:annotation>
      <xsd:documentation>Graph-specific styling property.</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="string">
      <xsd:enumeration value="STRAIGHT"/>
      <xsd:enumeration value="BENT"/>
    </xsd:restriction>
  </xsd:simpleType>
  <!-- =========================================================== -->
  <xsd:simpleType name="AesheticCriteriaType">
    <xsd:annotation>
      <xsd:documentation>Graph-specific styling property.</xsd:documentation>
    </xsd:annotation>
    <xsd:restriction base="string">
      <xsd:enumeration value="MIN_CROSSINGS"/>
      <xsd:enumeration value="MIN_AREA"/>
      <xsd:enumeration value="MIN_BENDS"/>
      <xsd:enumeration value="MAX_BENDS"/>
      <xsd:enumeration value="UNIFORM_BENDS"/>
      <xsd:enumeration value="MIN_SLOPES"/>
      <xsd:enumeration value="MIN_EDGE_LENGTH"/>
      <xsd:enumeration value="MAX_EDGE_LENGTH"/>
      <xsd:enumeration value="UNIFORM_EDGE_LENGTH"/>
      <xsd:enumeration value="MAX_ANGULAR_RESOLUTION"/>
      <xsd:enumeration value="MIN_ASPECT_RATIO"/>
      <xsd:enumeration value="MAX_SYMMETRIES"/>
    </xsd:restriction>
  </xsd:simpleType>
</xsd:schema>
