Commit 072f26cf authored by Claus Nagel's avatar Claus Nagel
Browse files

No commit message

No commit message
parents
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="http://www.opengis.net/gml" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:gml="http://www.opengis.net/gml" elementFormDefault="qualified" version="3.1.1">
<annotation>
<appinfo source="urn:opengis:specification:gml:schema-xsd:temporalTopology:3.1.1"/>
<documentation xml:lang="en">The temporal topology schema for ISO19136 provides constructs for handling topological complexes and
temporal feature relationships.
Temporal geometric characteristics of features are represented as instants and periods.
While, temporal context of features that does not relate to the position of time is described as connectivity relationships
among instants and periods. These relationships are called temporal topology as they do not change in time,
as long as the direction of time does not change.
It is used effectively in the case of describing a family tree expressing evolution of species, an ecological cycle,
a lineage of lands or buildings, or a history of separation and merger of administrative boundaries.
This schema reflects a partial yet consistent implementation of the model described in ISO 19108:2002.
Copyright (c) 2002-2005 OGC, All Rights Reserved.
For conditions, see OGC Software Notice http://www.opengeospatial.org/about/?page=ipr</documentation>
</annotation>
<!-- ===================================== -->
<include schemaLocation="temporal.xsd"/>
<!-- ===================================== -->
<!-- ================================================================== -->
<!-- == TimeTopologyComplex == -->
<!-- ================================================================== -->
<element name="TimeTopologyComplex" type="gml:TimeTopologyComplexType" substitutionGroup="gml:_TimeComplex">
<annotation>
<documentation xml:lang="en">This element represents temporal topology complex. It shall be the connected acyclic directed graph composed of time nodes and time edges.</documentation>
</annotation>
</element>
<!-- ================================================================== -->
<complexType name="TimeTopologyComplexType">
<annotation>
<documentation xml:lang="en">A temporal topology complex.</documentation>
</annotation>
<complexContent>
<extension base="gml:AbstractTimeComplexType">
<sequence>
<element name="primitive" type="gml:TimeTopologyPrimitivePropertyType" maxOccurs="unbounded"/>
</sequence>
</extension>
</complexContent>
</complexType>
<!-- ================================================================== -->
<complexType name="TimeTopologyComplexPropertyType">
<annotation>
<documentation>A time topology complex property can either be any time topology complex element
encapsulated in an element of this type or an XLink reference to a remote time topology complex element
(where remote includes elements located elsewhere in the same document).
Note that either the reference or the contained element must be given, but not both or none.</documentation>
</annotation>
<sequence minOccurs="0">
<element ref="gml:TimeTopologyComplex"/>
</sequence>
<attributeGroup ref="gml:AssociationAttributeGroup"/>
</complexType>
<!-- ================================================================== -->
<!-- == TimeTopologyPrimitive == -->
<!-- ================================================================== -->
<element name="_TimeTopologyPrimitive" type="gml:AbstractTimeTopologyPrimitiveType" abstract="true" substitutionGroup="gml:_TimePrimitive">
<annotation>
<documentation xml:lang="en">This abstract element acts as the head of the substitution group for temporal topology primitives.</documentation>
</annotation>
</element>
<!-- ================================================================== -->
<complexType name="AbstractTimeTopologyPrimitiveType" abstract="true">
<annotation>
<documentation xml:lang="en">The element "complex" carries a reference to the complex containing this primitive.</documentation>
</annotation>
<complexContent>
<extension base="gml:AbstractTimePrimitiveType">
<sequence>
<element name="complex" type="gml:ReferenceType" minOccurs="0"/>
</sequence>
</extension>
</complexContent>
</complexType>
<!-- ================================================================== -->
<complexType name="TimeTopologyPrimitivePropertyType">
<annotation>
<documentation>A time topology primitive property can either hold any time topology complex element
eor carry an XLink reference to a remote time topology complex element
(where remote includes elements located elsewhere in the same document).
Note that either the reference or the contained element must be given, but not both or none.</documentation>
</annotation>
<sequence minOccurs="0">
<element ref="gml:_TimeTopologyPrimitive"/>
</sequence>
<attributeGroup ref="gml:AssociationAttributeGroup"/>
</complexType>
<!-- ================================================================== -->
<!-- ======= TimeNode ======= -->
<!-- ================================================================== -->
<element name="TimeNode" type="gml:TimeNodeType" substitutionGroup="gml:_TimeTopologyPrimitive">
<annotation>
<documentation xml:lang="en">"TimeNode" is a zero dimensional temporal topology primitive,
expresses a position in topological time, and is a start and an end of time edge, which represents states of time.
Time node may be isolated. However, it cannot describe the ordering relationships with other primitives.
An isolated node may not be an element of any temporal topology complex.</documentation>
</annotation>
</element>
<!-- ================================================================== -->
<complexType name="TimeNodeType">
<annotation>
<documentation xml:lang="en">Type declaration of the element "TimeNode".</documentation>
</annotation>
<complexContent>
<extension base="gml:AbstractTimeTopologyPrimitiveType">
<sequence>
<element name="previousEdge" type="gml:TimeEdgePropertyType" minOccurs="0" maxOccurs="unbounded"/>
<element name="nextEdge" type="gml:TimeEdgePropertyType" minOccurs="0" maxOccurs="unbounded"/>
<element name="position" type="gml:TimeInstantPropertyType" minOccurs="0"/>
</sequence>
</extension>
</complexContent>
</complexType>
<!-- ================================================================== -->
<complexType name="TimeNodePropertyType">
<annotation>
<documentation>A time node property can either be any time node element encapsulated in an element of this type
or an XLink reference to a remote time node element (where remote includes elements located elsewhere in the same document).
Note that either the reference or the contained element must be given, but not both or none.</documentation>
</annotation>
<sequence minOccurs="0">
<element ref="gml:TimeNode"/>
</sequence>
<attributeGroup ref="gml:AssociationAttributeGroup"/>
</complexType>
<!-- ================================================================== -->
<!-- ======= TimeEdge ======= -->
<!-- ================================================================== -->
<element name="TimeEdge" type="gml:TimeEdgeType" substitutionGroup="gml:_TimeTopologyPrimitive">
<annotation>
<documentation xml:lang="en">TimeEdge is one dimensional temporal topology primitive,
expresses a state in topological time. It has an orientation from its start toward the end,
and its boundaries shall associate with two different time nodes.</documentation>
</annotation>
</element>
<!-- ================================================================== -->
<complexType name="TimeEdgeType">
<annotation>
<documentation xml:lang="en">Type declaration of the element "TimeEdge".</documentation>
</annotation>
<complexContent>
<extension base="gml:AbstractTimeTopologyPrimitiveType">
<sequence>
<element name="start" type="gml:TimeNodePropertyType"/>
<element name="end" type="gml:TimeNodePropertyType"/>
<element name="extent" type="gml:TimePeriodPropertyType" minOccurs="0"/>
</sequence>
</extension>
</complexContent>
</complexType>
<!-- ================================================================== -->
<complexType name="TimeEdgePropertyType">
<annotation>
<documentation>A time edge property can either be any time edge element encapsulated in an element of this type
or an XLink reference to a remote time edge element (where remote includes elements located elsewhere in the same document).
Note that either the reference or the contained element must be given, but not both or none.</documentation>
</annotation>
<sequence minOccurs="0">
<element ref="gml:TimeEdge"/>
</sequence>
<attributeGroup ref="gml:AssociationAttributeGroup"/>
</complexType>
<!-- ================================================================== -->
<!-- === Succession === -->
<!-- ================================================================== -->
<simpleType name="SuccessionType">
<annotation>
<documentation>Feature succession is a semantic relationship derived from evaluation of observer, and
Feature Substitution, Feature Division and Feature Fusion are defined as associations between
previous features and next features in the temporal context.
Successions shall be represented in either following two ways.
* define a temporal topological complex element as a feature element
* define an association same as temporal topological complex between features.</documentation>
</annotation>
<restriction base="string">
<enumeration value="substitution"/>
<enumeration value="division"/>
<enumeration value="fusion"/>
<enumeration value="initiation"/>
</restriction>
</simpleType>
<!-- ================================================================== -->
</schema>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="http://www.opengis.net/gml" elementFormDefault="qualified" version="3.1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:gml="http://www.opengis.net/gml" xmlns:sch="http://www.ascc.net/xml/schematron" xmlns="http://www.w3.org/2001/XMLSchema">
<annotation>
<appinfo source="urn:opengis:specification:gml:schema-xsd:topology:3.1.1">topology.xsd</appinfo>
<documentation>
Copyright (c) 2002-2005 OGC, All Rights Reserved.
For conditions, see OGC Software Notice http://www.opengeospatial.org/about/?page=ipr
</documentation>
</annotation>
<include schemaLocation="geometryComplexes.xsd"/>
<!-- ==============================================================
abstract supertype for topology objects
=============================================================== -->
<!-- ========================================================== -->
<element name="_Topology" type="gml:AbstractTopologyType" abstract="true" substitutionGroup="gml:_GML"/>
<!-- ========================================================== -->
<complexType name="AbstractTopologyType" abstract="true">
<complexContent>
<extension base="gml:AbstractGMLType"/>
</complexContent>
</complexType>
<!-- ========================================================== -->
<element name="_TopoPrimitive" type="gml:AbstractTopoPrimitiveType" abstract="true" substitutionGroup="gml:_Topology">
<annotation>
<documentation>Substitution group branch for Topo Primitives, used by TopoPrimitiveArrayAssociationType</documentation>
</annotation>
</element>
<!-- ========================================================== -->
<complexType name="AbstractTopoPrimitiveType" abstract="true">
<complexContent>
<extension base="gml:AbstractTopologyType">
<sequence>
<element ref="gml:isolated" minOccurs="0" maxOccurs="unbounded"/>
<element ref="gml:container" minOccurs="0"/>
</sequence>
</extension>
</complexContent>
</complexType>
<!-- ========================================================== -->
<element name="isolated" type="gml:IsolatedPropertyType">
<annotation>
<appinfo>
<sch:pattern name="refAndContent co-occurence prohibited">
<sch:rule context="gml:isolated">
<sch:extends rule="hrefOrContent"/>
</sch:rule>
</sch:pattern>
</appinfo>
</annotation>
</element>
<!-- ========================================================== -->
<complexType name="IsolatedPropertyType">
<choice minOccurs="0">
<element ref="gml:Node"/>
<element ref="gml:Edge"/>
</choice>
<attributeGroup ref="gml:AssociationAttributeGroup"/>
</complexType>
<!-- ========================================================== -->
<element name="container" type="gml:ContainerPropertyType">
<annotation>
<appinfo>
<sch:pattern name="refAndContent co-occurence prohibited">
<sch:rule context="gml:containerProperty">
<sch:extends rule="hrefOrContent"/>
</sch:rule>
</sch:pattern>
</appinfo>
</annotation>
</element>
<!-- ========================================================== -->
<complexType name="ContainerPropertyType">
<sequence minOccurs="0">
<choice>
<element ref="gml:Face"/>
<element ref="gml:TopoSolid"/>
</choice>
</sequence>
<attributeGroup ref="gml:AssociationAttributeGroup"/>
</complexType>
<!-- =========================================================== -->
<!-- primitive topology objects -->
<!-- ========================================================== -->
<element name="Node" type="gml:NodeType" substitutionGroup="gml:_TopoPrimitive"/>
<!-- =========================================================== -->
<complexType name="NodeType">
<annotation>
<documentation>Its optional co-boundary is a set of connected directedEdges. The orientation of one of these dirEdges is "+" if the Node is the "to" node of the Edge, and "-" if it is the "from" node.</documentation>
</annotation>
<complexContent>
<extension base="gml:AbstractTopoPrimitiveType">
<sequence>
<element ref="gml:directedEdge" minOccurs="0" maxOccurs="unbounded"/>
<element ref="gml:pointProperty" minOccurs="0"/>
<!-- <element name="geometry" type="gml:PointPropertyType" minOccurs="0"/> -->
</sequence>
</extension>
</complexContent>
</complexType>
<!-- ===== Property for topology association - by Value or by Reference ===== -->
<element name="directedNode" type="gml:DirectedNodePropertyType">
<annotation>
<appinfo>
<sch:pattern name="refAndContent co-occurence prohibited">
<sch:rule context="gml:directedNode">
<sch:extends rule="hrefOrContent"/>
</sch:rule>
</sch:pattern>
</appinfo>
</annotation>
</element>
<!-- =========================================================== -->
<complexType name="DirectedNodePropertyType">
<sequence minOccurs="0">
<element ref="gml:Node"/>
</sequence>
<attribute name="orientation" type="gml:SignType" default="+"/>
<attributeGroup ref="gml:AssociationAttributeGroup"/>
</complexType>
<!-- ========================================================== -->
<!-- primitive topology objects (1-dimensional) -->
<!-- ========================================================== -->
<element name="Edge" type="gml:EdgeType" substitutionGroup="gml:_TopoPrimitive"/>
<!-- ========================================================== -->
<complexType name="EdgeType">
<annotation>
<documentation>There is precisely one positively directed and one negatively directed node in the boundary of every edge. The negatively and positively directed nodes correspond to the start and end nodes respectively. The optional coboundary of an edge is a circular sequence of directed faces which are incident on this edge in document order. Faces which use a particular boundary edge in its positive orientation appear with positive orientation on the coboundary of the same edge. In the 2D case, the orientation of the face on the left of the edge is "+"; the orientation of the face on the right on its right is "-". An edge may optionally be realised by a 1-dimensional (curve) geometric primitive.</documentation>
</annotation>
<complexContent>
<extension base="gml:AbstractTopoPrimitiveType">
<sequence>
<element ref="gml:directedNode" minOccurs="2" maxOccurs="2"/>
<element ref="gml:directedFace" minOccurs="0" maxOccurs="unbounded"/>
<element ref="gml:curveProperty" minOccurs="0"/>
</sequence>
</extension>
</complexContent>
</complexType>
<!-- ===== Property for topology association - by Value or by Reference ===== -->
<element name="directedEdge" type="gml:DirectedEdgePropertyType">
<annotation>
<appinfo>
<sch:pattern name="refAndContent co-occurence prohibited">
<sch:rule context="gml:directedEdge">
<sch:extends rule="hrefOrContent"/>
</sch:rule>
</sch:pattern>
</appinfo>
</annotation>
</element>
<!-- =========================================================== -->
<complexType name="DirectedEdgePropertyType">
<sequence minOccurs="0">
<element ref="gml:Edge"/>
</sequence>
<attribute name="orientation" type="gml:SignType" default="+"/>
<attributeGroup ref="gml:AssociationAttributeGroup"/>
</complexType>
<!-- ========================================================== -->
<!-- primitive topology objects (2-dimensional) -->
<!-- ========================================================== -->
<element name="Face" type="gml:FaceType" substitutionGroup="gml:_TopoPrimitive"/>
<!-- ========================================================== -->
<complexType name="FaceType">
<annotation>
<documentation>. The topological boundary of a face consists of a set of directed edges. Note that all edges associated with a Face, including dangling and interior edges, appear in the boundary. Dangling and interior edges are each referenced by pairs of directedEdges with opposing orientations. The optional coboundary of a face is a pair of directed solids which are bounded by this face. If present, there is precisely one positively directed and one negatively directed solid in the coboundary of every face. The positively directed solid corresponds to the solid which lies in the direction of the positively directed normal to the face in any geometric realisation. A face may optionally be realised by a 2-dimensional (surface) geometric primitive.</documentation>
</annotation>
<complexContent>
<extension base="gml:AbstractTopoPrimitiveType">
<sequence>
<element ref="gml:directedEdge" maxOccurs="unbounded"/>
<element ref="gml:directedTopoSolid" minOccurs="0" maxOccurs="2"/>
<element ref="gml:surfaceProperty" minOccurs="0"/>
</sequence>
</extension>
</complexContent>
</complexType>
<!-- ===== Property for topology association - by Value or by Reference ===== -->
<element name="directedFace" type="gml:DirectedFacePropertyType">
<annotation>
<appinfo>
<sch:pattern name="refAndContent co-occurence prohibited">
<sch:rule context="gml:directedFace">
<sch:extends rule="hrefOrContent"/>
</sch:rule>
</sch:pattern>
</appinfo>
</annotation>
</element>
<!-- =========================================================== -->
<complexType name="DirectedFacePropertyType">
<sequence minOccurs="0">
<element ref="gml:Face"/>
</sequence>
<attribute name="orientation" type="gml:SignType" default="+"/>
<attributeGroup ref="gml:AssociationAttributeGroup"/>
</complexType>
<!-- ========================================================== -->
<!-- primitive topology objects (3-dimensional) -->
<!-- ========================================================== -->
<element name="TopoSolid" type="gml:TopoSolidType" substitutionGroup="gml:_TopoPrimitive"/>
<!-- ============================================================= -->
<complexType name="TopoSolidType">
<annotation>
<documentation>The topological boundary of a TopoSolid consists of a set of directed faces. Note that all faces associated with the TopoSolid, including dangling faces, appear in the boundary. The coboundary of a TopoSolid is empty and hence requires no representation.</documentation>
</annotation>
<complexContent>
<extension base="gml:AbstractTopoPrimitiveType">
<sequence>
<element ref="gml:directedFace" maxOccurs="unbounded"/>
</sequence>
</extension>
</complexContent>
</complexType>
<!-- ========================================================== -->
<!-- ===== Property for topology association - by Value or by Reference ===== -->
<element name="directedTopoSolid" type="gml:DirectedTopoSolidPropertyType">
<annotation>
<appinfo>
<sch:pattern name="refAndContent co-occurence prohibited">
<sch:rule context="gml:directedTopoSolid">
<sch:extends rule="hrefOrContent"/>
</sch:rule>
</sch:pattern>
</appinfo>
</annotation>
</element>
<!-- ============================================================= -->
<complexType name="DirectedTopoSolidPropertyType">
<sequence minOccurs="0">
<element ref="gml:TopoSolid"/>
</sequence>
<attribute name="orientation" type="gml:SignType" default="+"/>
<attributeGroup ref="gml:AssociationAttributeGroup"/>
</complexType>
<!-- ========================================================== -->
<element name="TopoPoint" type="gml:TopoPointType"/>
<!-- ========================================================== -->
<complexType name="TopoPointType">
<annotation>
<documentation>The intended use of TopoPoint is to appear within a point feature to express the structural and possibly geometric relationships of this point to other features via shared node definitions. Note the orientation assigned to the directedNode has no meaning in this context. It is preserved for symmetry with the types and elements which follow.</documentation>
</annotation>
<complexContent>
<extension base="gml:AbstractTopologyType">
<sequence>
<element ref="gml:directedNode"/>
</sequence>
</extension>
</complexContent>
</complexType>
<!-- ========================================================== -->
<!-- ============================================================= -->
<!-- ===== Property for topology association - by Value ===== -->
<element name="topoPointProperty" type="gml:TopoPointPropertyType"/>
<!-- ============================================================= -->
<complexType name="TopoPointPropertyType">
<sequence>
<element ref="gml:TopoPoint"/>
</sequence>
</complexType>
<!-- ========================================================== -->
<!-- ========================================================== -->
<element name="TopoCurve" type="gml:TopoCurveType"/>
<!-- ============================================================= -->
<complexType name="TopoCurveType">
<annotation>
<documentation>The end Node of each directedEdge of a TopoCurveType
is the start Node of the next directedEdge of the TopoCurveType in document order. The TopoCurve type and element represent a homogeneous topological expression, a list of directed edges, which if realised are isomorphic to a geometric curve primitive. The intended use of TopoCurve is to appear within a line feature instance to express the structural and geometric relationships of this line to other features via the shared edge definitions.</documentation>
</annotation>
<complexContent>
<extension base="gml:AbstractTopologyType">
<sequence>
<element ref="gml:directedEdge" maxOccurs="unbounded"/>
</sequence>
</extension>
</complexContent>
</complexType>
<!-- ========================================================== -->
<!-- ===== Property for topology association - by Value ===== -->
<element name="topoCurveProperty" type="gml:TopoCurvePropertyType"/>
<!-- ============================================================= -->
<complexType name="TopoCurvePropertyType">
<sequence>
<element ref="gml:TopoCurve"/>
</sequence>
</complexType>
<!-- ========================================================== -->
<!-- ========================================================== -->
<element name="TopoSurface" type="gml:TopoSurfaceType"/>
<!-- ============================================================= -->
<complexType name="TopoSurfaceType">
<annotation>
<documentation>The TopoSurface type and element represent a homogeneous topological expression, a set of directed faces, which if realised are isomorphic to a geometric surface primitive. The intended use of TopoSurface is to appear within a surface feature instance to express the structural and possibly geometric relationships of this surface to other features via the shared face definitions.</documentation>
</annotation>
<complexContent>
<extension base="gml:AbstractTopologyType">
<sequence>
<element ref="gml:directedFace" maxOccurs="unbounded"/>
</sequence>
</extension>
</complexContent>
</complexType>
<!-- ========================================================== -->
<!-- ===== Property for topology association - by Value ===== -->
<element name="topoSurfaceProperty" type="gml:TopoSurfacePropertyType"/>
<!-- ============================================================= -->
<complexType name="TopoSurfacePropertyType">
<sequence>
<element ref="gml:TopoSurface"/>
</sequence>
</complexType>
<!-- ========================================================== -->
<element name="TopoVolume" type="gml:TopoVolumeType"/>
<!-- ============================================================= -->
<complexType name="TopoVolumeType">
<annotation>
<documentation>The TopoVolume type and element represent a homogeneous topological expression, a set of directed TopoSolids, which if realised are isomorphic to a geometric solid primitive. The intended use of TopoVolume is to appear within a 3D solid feature instance to express the structural and geometric relationships of this solid to other features via the shared TopoSolid definitions. . Note the orientation assigned to the directedSolid has no meaning in three dimensions. It is preserved for symmetry with the preceding types and elements.</documentation>
</annotation>
<complexContent>
<extension base="gml:AbstractTopologyType">
<sequence>
<element ref="gml:directedTopoSolid" maxOccurs="unbounded"/>
</sequence>
</extension>
</complexContent>
</complexType>
<!-- ========================================================== -->
<!-- ===== Property for topology association - by Value ===== -->
<element name="topoVolumeProperty" type="gml:TopoVolumePropertyType"/>
<!-- ============================================================= -->
<complexType name="TopoVolumePropertyType">
<sequence>
<element ref="gml:TopoVolume"/>
</sequence>
</complexType>
<!-- ========================================================== -->
<!-- ========================================================== -->
<element name="TopoComplex" type="gml:TopoComplexType" substitutionGroup="gml:_Topology"/>
<!-- ========================================================== -->
<complexType name="TopoComplexType">
<annotation>
<documentation>This type represents a TP_Complex capable of holding topological primitives.</documentation>
</annotation>
<complexContent>
<extension base="gml:AbstractTopologyType">
<sequence>
<element ref="gml:maximalComplex"/>
<element ref="gml:superComplex" minOccurs="0" maxOccurs="unbounded"/>
<element ref="gml:subComplex" minOccurs="0" maxOccurs="unbounded"/>
<element ref="gml:topoPrimitiveMember" minOccurs="0" maxOccurs="unbounded"/>
<element ref="gml:topoPrimitiveMembers" minOccurs="0"/>
</sequence>
<attribute name="isMaximal" type="boolean" default="false"/>
</extension>
</complexContent>
</complexType>
<!-- ===== Property for topology association - by Value or Reference ===== -->
<element name="topoComplexProperty" type="gml:TopoComplexMemberType"/>
<!-- ========================================================== -->
<element name="subComplex" type="gml:TopoComplexMemberType">
<annotation>
<appinfo>
<sch:pattern name="refAndContent co-occurence prohibited">
<sch:rule context="gml:subComplex">
<sch:extends rule="hrefOrContent"/>
</sch:rule>
</sch:pattern>
</appinfo>
</annotation>
</element>
<!-- ========================================================== -->
<element name="superComplex" type="gml:TopoComplexMemberType">
<annotation>
<appinfo>
<sch:pattern name="refAndContent co-occurence prohibited">
<sch:rule context="gml:superComplex">
<sch:extends rule="hrefOrContent"/>
</sch:rule>
</sch:pattern>
</appinfo>
</annotation>
</element>
<!-- ========================================================== -->
<element name="maximalComplex" type="gml:TopoComplexMemberType">
<annotation>
<appinfo>
<sch:pattern name="refAndContent co-occurence prohibited">
<sch:rule context="gml:subComplex">
<sch:extends rule="hrefOrContent"/>
</sch:rule>
</sch:pattern>
</appinfo>
<documentation>Need schamatron test here that isMaximal attribute value is true</documentation>
</annotation>
</element>
<!-- ============================================================= -->
<complexType name="TopoComplexMemberType">
<annotation>
<documentation>This Property can be used to embed a TopoComplex in a feature collection.</documentation>
</annotation>
<sequence>
<element ref="gml:TopoComplex" minOccurs="0"/>
</sequence>
<attributeGroup ref="gml:AssociationAttributeGroup"/>
</complexType>
<!-- ========================================================== -->
<!-- ===== Property for topology association - by Value or Reference ===== -->
<element name="topoPrimitiveMember" type="gml:TopoPrimitiveMemberType">
<annotation>
<appinfo>
<sch:pattern name="refAndContent co-occurence prohibited">
<sch:rule context="gml:topoPrimitiveMember">
<sch:extends rule="hrefOrContent"/>
</sch:rule>
</sch:pattern>
</appinfo>
</annotation>
</element>
<!-- ============================================================= -->
<complexType name="TopoPrimitiveMemberType">
<annotation>
<documentation>This type supports embedding topological primitives in a TopoComplex.</documentation>
</annotation>
<sequence>
<element ref="gml:_TopoPrimitive" minOccurs="0"/>
</sequence>
<attributeGroup ref="gml:AssociationAttributeGroup"/>
</complexType>
<!-- ========================================================== -->
<!-- ===== Property for topology association - by Value ===== -->
<element name="topoPrimitiveMembers" type="gml:TopoPrimitiveArrayAssociationType">
<annotation>
<appinfo>
<sch:pattern name="refAndContent co-occurence prohibited">
<sch:rule context="gml:topoPrimitiveMember">
<sch:extends rule="hrefOrContent"/>
</sch:rule>
</sch:pattern>
</appinfo>
</annotation>
</element>
<!-- ========================================================== -->
<complexType name="TopoPrimitiveArrayAssociationType">
<annotation>
<documentation>This type supports embedding an array of topological primitives in a TopoComplex</documentation>
</annotation>
<!-- <complexContent>
<restriction base="gml:ArrayAssociationType"> -->
<sequence>
<choice minOccurs="0" maxOccurs="unbounded">
<element ref="gml:_TopoPrimitive"/>
</choice>
</sequence>
<!-- </restriction>
</complexContent> -->
</complexType>
<!-- ========================================================== -->
</schema>
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="http://www.opengis.net/gml" xmlns:gml="http://www.opengis.net/gml" xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" version="3.1.1" xml:lang="en">
<annotation>
<appinfo source="urn:opengis:specification:gml:schema-units:3.1.1"/>
<documentation>Builds on gmlBase.xsd to encode units of measure (or uom), including definitions of units of measure and dictionaries of such definitions. GML 3.0 candidate schema, primary editor: Arliss Whiteside. Last updated 2005-06-22.
Copyright (c) 2002-2005 OGC, All Rights Reserved.
For conditions, see OGC Software Notice http://www.opengeospatial.org/about/?page=ipr
Parts of this schema are based on Subclause 6.5.7 of ISO/CD 19103 Geographic information - Conceptual schema language, on Subclause A.5.2.2.3 of ISO/CD 19118 Geographic information - Encoding, and on most of OpenGIS Recommendation Paper OGC 02-007r4 Units of Measure Use and Definition Recommendations.</documentation>
</annotation>
<!-- ==============================================================
includes and imports
============================================================== -->
<include schemaLocation="dictionary.xsd"/>
<!-- ==============================================================
elements and types
============================================================== -->
<element name="unitOfMeasure" type="gml:UnitOfMeasureType"/>
<!-- =========================================================== -->
<complexType name="UnitOfMeasureType">
<annotation>
<documentation>Reference to a unit of measure definition that applies to all the numerical values described by the element containing this element. Notice that a complexType which needs to include the uom attribute can do so by extending this complexType. Alternately, this complexType can be used as a pattern for a new complexType.</documentation>
</annotation>
<sequence/>
<attribute name="uom" type="anyURI" use="required">
<annotation>
<documentation>Reference to a unit of measure definition, usually within the same XML document but possibly outside the XML document which contains this reference. For a reference within the same XML document, the "#" symbol should be used, followed by a text abbreviation of the unit name. However, the "#" symbol may be optional, and still may be interpreted as a reference.</documentation>
</annotation>
</attribute>
</complexType>
<!-- =========================================================== -->
<element name="UnitDefinition" type="gml:UnitDefinitionType" substitutionGroup="gml:Definition"/>
<!-- =========================================================== -->
<complexType name="UnitDefinitionType">
<annotation>
<documentation>Definition of a unit of measure (or uom). The definition includes a quantityType property, which indicates the phenomenon to which the units apply, and a catalogSymbol, which gives the short symbol used for this unit. This element is used when the relationship of this unit to other units or units systems is unknown.</documentation>
</annotation>
<complexContent>
<extension base="gml:DefinitionType">
<sequence>
<element ref="gml:quantityType"/>
<element ref="gml:catalogSymbol" minOccurs="0"/>
</sequence>
</extension>
</complexContent>
</complexType>
<!-- =========================================================== -->
<element name="BaseUnit" type="gml:BaseUnitType" substitutionGroup="gml:UnitDefinition"/>
<!-- =========================================================== -->
<complexType name="BaseUnitType">
<annotation>
<documentation>Definition of a unit of measure which is a base unit from the system of units. A base unit cannot be derived by combination of other base units within this system. Sometimes known as "fundamental unit".</documentation>
</annotation>
<complexContent>
<extension base="gml:UnitDefinitionType">
<sequence>
<element name="unitsSystem" type="gml:ReferenceType"/>
</sequence>
</extension>
</complexContent>
</complexType>
<!-- =========================================================== -->
<element name="DerivedUnit" type="gml:DerivedUnitType" substitutionGroup="gml:UnitDefinition"/>
<!-- ============================================================ -->
<complexType name="DerivedUnitType">
<annotation>
<documentation>Definition of a unit of measure which is defined through algebraic combination of more primitive units, which are usually base units from a particular system of units. Derived units based directly on base units are usually preferred for quantities other than the base units or fundamental quantities within a system. If a derived unit is not the preferred unit, the ConventionalUnit element should be used instead.</documentation>
</annotation>
<complexContent>
<extension base="gml:UnitDefinitionType">
<sequence>
<element ref="gml:derivationUnitTerm" maxOccurs="unbounded"/>
</sequence>
</extension>
</complexContent>
</complexType>
<!-- =========================================================== -->
<element name="ConventionalUnit" type="gml:ConventionalUnitType" substitutionGroup="gml:UnitDefinition"/>
<!-- =========================================================== -->
<complexType name="ConventionalUnitType">
<annotation>
<documentation>Definition of a unit of measure which is related to a preferred unit for this quantity type through a conversion formula. A method for deriving this unit by algebraic combination of more primitive units, may also be provided.</documentation>
</annotation>
<complexContent>
<extension base="gml:UnitDefinitionType">
<sequence>
<choice>
<element ref="gml:conversionToPreferredUnit"/>
<element ref="gml:roughConversionToPreferredUnit"/>
</choice>
<element ref="gml:derivationUnitTerm" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</extension>
</complexContent>
</complexType>
<!-- =========================================================== -->
<element name="quantityType" type="gml:StringOrRefType">
<annotation>
<documentation>Informal description of the phenomenon or type of quantity that is measured or observed. For example, "length", "angle", "time", "pressure", or "temperature". When the quantity is the result of an observation or measurement, this term is known as Observable Type or Measurand.</documentation>
</annotation>
</element>
<!-- =========================================================== -->
<element name="catalogSymbol" type="gml:CodeType">
<annotation>
<documentation>For global understanding of a unit of measure, it is often possible to reference an item in a catalog of units, using a symbol in that catalog. The "codeSpace" attribute in "CodeType" identifies a namespace for the catalog symbol value, and might reference the catalog. The "string" value in "CodeType" contains the value of a symbol that is unique within this catalog namespace. This symbol often appears explicitly in the catalog, but it could be a combination of symbols using a specified algebra of units. For example, the symbol "cm" might indicate that it is the "m" symbol combined with the "c" prefix.</documentation>
</annotation>
</element>
<!-- =========================================================== -->
<element name="derivationUnitTerm" type="gml:DerivationUnitTermType"/>
<!-- =========================================================== -->
<complexType name="DerivationUnitTermType">
<annotation>
<documentation>Definition of one unit term for a derived unit of measure. This unit term references another unit of measure (uom) and provides an integer exponent applied to that unit in defining the compound unit. The exponent can be positive or negative, but not zero.</documentation>
</annotation>
<complexContent>
<extension base="gml:UnitOfMeasureType">
<attribute name="exponent" type="integer"/>
</extension>
</complexContent>
</complexType>
<!-- =========================================================== -->
<element name="conversionToPreferredUnit" type="gml:ConversionToPreferredUnitType">
<annotation>
<documentation>This element is included when this unit has an accurate conversion to the preferred unit for this quantity type.</documentation>
</annotation>
</element>
<!-- =========================================================== -->
<element name="roughConversionToPreferredUnit" type="gml:ConversionToPreferredUnitType">
<annotation>
<documentation>This element is included when the correct definition of this unit is unknown, but this unit has a rough or inaccurate conversion to the preferred unit for this quantity type.</documentation>
</annotation>
</element>
<!-- =========================================================== -->
<complexType name="ConversionToPreferredUnitType">
<annotation>
<documentation>Relation of a unit to the preferred unit for this quantity type, specified by an arithmetic conversion (scaling and/or offset). A preferred unit is either a base unit or a derived unit selected for all units of one quantity type. The mandatory attribute "uom" shall reference the preferred unit that this conversion applies to. The conversion is specified by one of two alternative elements: "factor" or "formula".</documentation>
</annotation>
<complexContent>
<extension base="gml:UnitOfMeasureType">
<choice>
<element name="factor" type="double">
<annotation>
<documentation>Specification of the scale factor by which a value using this unit of measure can be multiplied to obtain the corresponding value using the preferred unit of measure.</documentation>
</annotation>
</element>
<element name="formula" type="gml:FormulaType">
<annotation>
<documentation>Specification of the formula by which a value using this unit of measure can be converted to obtain the corresponding value using the preferred unit of measure.</documentation>
</annotation>
</element>
</choice>
</extension>
</complexContent>
</complexType>
<!-- =========================================================== -->
<complexType name="FormulaType">
<annotation>
<documentation>Paremeters of a simple formula by which a value using this unit of measure can be converted to the corresponding value using the preferred unit of measure. The formula element contains elements a, b, c and d, whose values use the XML Schema type "double". These values are used in the formula y = (a + bx) / (c + dx), where x is a value using this unit, and y is the corresponding value using the preferred unit. The elements a and d are optional, and if values are not provided, those parameters are considered to be zero. If values are not provided for both a and d, the formula is equivalent to a fraction with numerator and denominator parameters.</documentation>
</annotation>
<sequence>
<element name="a" type="double" minOccurs="0"/>
<element name="b" type="double"/>
<element name="c" type="double"/>
<element name="d" type="double" minOccurs="0"/>
</sequence>
</complexType>
<!-- =========================================================== -->
</schema>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<schema targetNamespace="http://www.opengis.net/gml" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:gml="http://www.opengis.net/gml" xmlns:sch="http://www.ascc.net/xml/schematron" xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified" version="3.1.1">
<annotation>
<appinfo source="urn:opengis:specification:gml:schema-xsd:valueObjects:3.1.1">valueObjects.xsd</appinfo>
<documentation>GML conformant schema for Values in which the
* scalar Value types and lists have their values recorded in simpleContent elements
* complex Value types are built recursively
Copyright (c) 2002-2005 OGC, All Rights Reserved.
For conditions, see OGC Software Notice http://www.opengeospatial.org/about/?page=ipr</documentation>
</annotation>
<!-- ====================================================================== -->
<!-- geometry and temporal included so that _Geometry and _TimeObject can be added to Value choice group -->
<include schemaLocation="geometryBasic0d1d.xsd"/>
<include schemaLocation="temporal.xsd"/>
<!-- ====================================================================== -->
<group name="Value">
<annotation>
<documentation>Utility choice group which unifies generic Values defined in this schema document with
Geometry and Temporal objects and the Measures described above,
so that any of these may be used within aggregate Values.</documentation>
</annotation>
<choice>
<!-- <element ref="gml:_Value"/> -->
<group ref="gml:ValueObject"/>
<element ref="gml:_Object"/>
<!-- <element ref="gml:_Geometry"/>
<element ref="gml:_TimeObject"/> -->
<element ref="gml:Null"/>
</choice>
</group>
<!-- ====================================================================== -->
<group name="ValueObject">
<choice>
<group ref="gml:ScalarValue"/>
<group ref="gml:ScalarValueList"/>
<group ref="gml:ValueExtent"/>
<element ref="gml:CompositeValue"/>
</choice>
</group>
<!-- ======================================================================
<element name="_Value" abstract="true" substitutionGroup="gml:_Object">
<annotation>
<documentation>Abstract element which acts as the head of a substitution group which contains _ScalarValue, _ScalarValueList and CompositeValue and (transitively) the elements in their substitution groups. This element may be used in an application schema as a variable, so that in an XML instance document any member of its substitution group may occur.</documentation>
</annotation>
</element> -->
<!-- ====================================================================== -->
<!-- ================== Scalar Values =========================
<element name="_ScalarValue" abstract="true" substitutionGroup="gml:_Value">
<annotation>
<documentation>Abstract element which acts as the head of a substitution group which contains Boolean, Category, Count and Quantity, and (transitively) the elements in their substitution groups. This element may be used in an application schema as a variable, so that in an XML instance document any member of its substitution group may occur.</documentation>
</annotation>
</element> -->
<group name="ScalarValue">
<choice>
<element ref="gml:Boolean"/>
<element ref="gml:Category"/>
<element ref="gml:Quantity"/>
<element ref="gml:Count"/>
</choice>
</group>
<!-- ======================================================================
<element name="_ScalarValueList" abstract="true" substitutionGroup="gml:_Value">
<annotation>
<documentation>Abstract element which acts as the head of a substitution group which contains the compact encodings BooleanList, CategoryList, CountList and QuantityList, and (transitively) the elements in their substitution groups. This element may be used in an application schema as a variable, so that in an XML instance document any member of its substitution group may occur.</documentation>
</annotation>
</element> -->
<group name="ScalarValueList">
<choice>
<element ref="gml:BooleanList"/>
<element ref="gml:CategoryList"/>
<element ref="gml:QuantityList"/>
<element ref="gml:CountList"/>
</choice>
</group>
<!-- ====================================================================== -->
<!-- ======================= Boolean ========================
<element name="Boolean" type="boolean" substitutionGroup="gml:_ScalarValue"> -->
<element name="Boolean" type="boolean">
<annotation>
<documentation>A value from two-valued logic, using the XML Schema boolean type. An instance may take the values {true, false, 1, 0}.</documentation>
</annotation>
</element>
<!--
<element name="BooleanList" type="gml:booleanOrNullList" substitutionGroup="gml:_ScalarValueList"> -->
<element name="BooleanList" type="gml:booleanOrNullList">
<annotation>
<documentation>XML List based on XML Schema boolean type. An element of this type contains a space-separated list of boolean values {0,1,true,false}</documentation>
</annotation>
</element>
<!-- ====================================================================== -->
<!-- ======================= Category ==========================
<element name="Category" type="gml:CodeType" substitutionGroup="gml:_ScalarValue"> -->
<element name="Category" type="gml:CodeType">
<annotation>
<documentation>A term representing a classification. It has an optional XML attribute codeSpace, whose value is a URI which identifies a dictionary, codelist or authority for the term.</documentation>
</annotation>
</element>
<!--
<element name="CategoryList" type="gml:CodeOrNullListType" substitutionGroup="gml:_ScalarValueList"> -->
<element name="CategoryList" type="gml:CodeOrNullListType">
<annotation>
<documentation>A space-separated list of terms or nulls. A single XML attribute codeSpace may be provided, which authorises all the terms in the list.</documentation>
</annotation>
</element>
<!-- ====================================================================== -->
<!-- =========================== Quantity ============================
<element name="Quantity" type="gml:MeasureType" substitutionGroup="gml:_ScalarValue"> -->
<element name="Quantity" type="gml:MeasureType">
<annotation>
<documentation>A numeric value with a scale. The content of the element is an amount using the XML Schema type double which permits decimal or scientific notation. An XML attribute uom (unit of measure) is required, whose value is a URI which identifies the definition of the scale or units by which the numeric value must be multiplied.</documentation>
</annotation>
</element>
<!--
<element name="QuantityList" type="gml:MeasureOrNullListType" substitutionGroup="gml:_ScalarValueList"> -->
<element name="QuantityList" type="gml:MeasureOrNullListType">
<annotation>
<documentation>A space separated list of amounts or nulls. The amounts use the XML Schema type double. A single XML attribute uom (unit of measure) is required, whose value is a URI which identifies the definition of the scale or units by which all the amounts in the list must be multiplied.</documentation>
</annotation>
</element>
<!-- ====================================================================== -->
<!-- ========================== Count ==========================
<element name="Count" type="integer" substitutionGroup="gml:_ScalarValue"> -->
<element name="Count" type="integer">
<annotation>
<documentation>An integer representing a frequency of occurrence.</documentation>
</annotation>
</element>
<!--
<element name="CountList" type="gml:integerOrNullList" substitutionGroup="gml:_ScalarValueList"> -->
<element name="CountList" type="gml:integerOrNullList">
<annotation>
<documentation>A space-separated list of integers or nulls.</documentation>
</annotation>
</element>
<!-- ====================================================================== -->
<!-- aggregate Value types -->
<!-- ====================================================================== -->
<!-- ===================== ValueCollection ========================== -->
<complexType name="CompositeValueType">
<annotation>
<documentation>Aggregate value built from other Values using the Composite pattern. It contains zero or an arbitrary number of valueComponent elements, and zero or one valueComponents elements. It may be used for strongly coupled aggregates (vectors, tensors) or for arbitrary collections of values.</documentation>
</annotation>
<complexContent>
<extension base="gml:AbstractGMLType">
<sequence>
<element ref="gml:valueComponent" minOccurs="0" maxOccurs="unbounded"/>
<element ref="gml:valueComponents" minOccurs="0"/>
</sequence>
</extension>
</complexContent>
</complexType>
<!-- <element name="CompositeValue" type="gml:CompositeValueType" substitutionGroup="gml:_Value"> -->
<element name="CompositeValue" type="gml:CompositeValueType">
<annotation>
<documentation>Aggregate value built using the Composite pattern.</documentation>
</annotation>
</element>
<!-- ====================================================================== -->
<!-- ========================= ValueArray ========================== -->
<complexType name="ValueArrayType">
<annotation>
<documentation>A Value Array is used for homogeneous arrays of primitive and aggregate values. The member values may be scalars, composites, arrays or lists. ValueArray has the same content model as CompositeValue, but the member values must be homogeneous. The element declaration contains a Schematron constraint which expresses this restriction precisely. Since the members are homogeneous, the referenceSystem (uom, codeSpace) may be specified on the ValueArray itself and implicitly inherited by all the members if desired. Note that a_ScalarValueList is preferred for arrays of Scalar Values since this is a more efficient encoding.</documentation>
</annotation>
<complexContent>
<extension base="gml:CompositeValueType">
<attributeGroup ref="gml:referenceSystem"/>
</extension>
</complexContent>
</complexType>
<!-- -->
<element name="ValueArray" type="gml:ValueArrayType" substitutionGroup="gml:CompositeValue">
<annotation>
<appinfo>
<sch:pattern name="Check either codeSpace or uom not both">
<sch:rule context="gml:ValueArray">
<sch:report test="@codeSpace and @uom">ValueArray may not carry both a reference to a codeSpace and a uom</sch:report>
</sch:rule>
</sch:pattern>
<sch:pattern name="Check components are homogeneous">
<sch:rule context="gml:ValueArray">
<sch:assert test="count(gml:valueComponent/*) = count(gml:valueComponent/*[name() = name(../../gml:valueComponent[1]/*[1])])">All components of <sch:name/> must be of the same type</sch:assert>
<sch:assert test="count(gml:valueComponents/*) = count(gml:valueComponents/*[name() = name(../*[1])])">All components of <sch:name/> must be of the same type</sch:assert>
</sch:rule>
</sch:pattern>
</appinfo>
<documentation>A Value Array is used for homogeneous arrays of primitive and aggregate values. _ScalarValueList is preferred for arrays of Scalar Values since this is more efficient. Since "choice" is not available for attribute groups, an external constraint (e.g. Schematron) would be required to enforce the selection of only one of these through schema validation</documentation>
</annotation>
</element>
<!-- attribute group required for ValueArray -->
<attributeGroup name="referenceSystem">
<attribute name="codeSpace" type="anyURI" use="optional"/>
<attribute name="uom" type="anyURI" use="optional"/>
</attributeGroup>
<!-- ====================================================================== -->
<!-- ====================== Typed ValueExtents ============================ -->
<group name="ValueExtent">
<choice>
<element ref="gml:CategoryExtent"/>
<element ref="gml:QuantityExtent"/>
<element ref="gml:CountExtent"/>
</choice>
</group>
<!-- ======================================================================
<element name="QuantityExtent" type="gml:QuantityExtentType" substitutionGroup="gml:_Value"> -->
<element name="QuantityExtent" type="gml:QuantityExtentType">
<annotation>
<documentation>Utility element to store a 2-point range of numeric values. If one member is a null, then this is a single ended interval.</documentation>
</annotation>
</element>
<!-- -->
<complexType name="QuantityExtentType">
<annotation>
<documentation>Restriction of list type to store a 2-point range of numeric values. If one member is a null, then this is a single ended interval.</documentation>
</annotation>
<simpleContent>
<restriction base="gml:MeasureOrNullListType">
<length value="2"/>
</restriction>
</simpleContent>
</complexType>
<!-- ======================================================================
<element name="CategoryExtent" type="gml:CategoryExtentType" substitutionGroup="gml:_Value"> -->
<element name="CategoryExtent" type="gml:CategoryExtentType">
<annotation>
<documentation>Utility element to store a 2-point range of ordinal values. If one member is a null, then this is a single ended interval.</documentation>
</annotation>
</element>
<!-- -->
<complexType name="CategoryExtentType">
<annotation>
<documentation>Restriction of list type to store a 2-point range of ordinal values. If one member is a null, then this is a single ended interval.</documentation>
</annotation>
<simpleContent>
<restriction base="gml:CodeOrNullListType">
<length value="2"/>
</restriction>
</simpleContent>
</complexType>
<!-- ======================================================================
<element name="CountExtent" type="gml:CountExtentType" substitutionGroup="gml:_Value"> -->
<element name="CountExtent" type="gml:CountExtentType">
<annotation>
<documentation>Utility element to store a 2-point range of frequency values. If one member is a null, then this is a single ended interval.</documentation>
</annotation>
</element>
<!-- -->
<simpleType name="CountExtentType">
<annotation>
<documentation>Restriction of list type to store a 2-point range of frequency values. If one member is a null, then this is a single ended interval.</documentation>
</annotation>
<restriction base="gml:integerOrNullList">
<length value="2"/>
</restriction>
</simpleType>
<!-- ====================================================================== -->
<!-- ===================== pieces needed for compositing ==================== -->
<element name="valueProperty" type="gml:ValuePropertyType">
<annotation>
<documentation>Element which refers to, or contains, a Value</documentation>
</annotation>
</element>
<!-- ====================================================================== -->
<element name="valueComponent" type="gml:ValuePropertyType">
<annotation>
<documentation>Element which refers to, or contains, a Value. This version is used in CompositeValues.</documentation>
</annotation>
</element>
<!-- ====================================================================== -->
<complexType name="ValuePropertyType">
<annotation>
<documentation>GML property which refers to, or contains, a Value</documentation>
</annotation>
<sequence minOccurs="0">
<group ref="gml:Value"/>
</sequence>
<attributeGroup ref="gml:AssociationAttributeGroup"/>
</complexType>
<!-- ====================================================================== -->
<!-- ====================================================================== -->
<element name="valueComponents" type="gml:ValueArrayPropertyType">
<annotation>
<documentation>Element which refers to, or contains, a set of homogeneously typed Values.</documentation>
</annotation>
</element>
<!-- ====================================================================== -->
<complexType name="ValueArrayPropertyType">
<annotation>
<documentation>GML property which refers to, or contains, a set of homogeneously typed Values.</documentation>
</annotation>
<sequence>
<group ref="gml:Value" maxOccurs="unbounded"/>
</sequence>
</complexType>
<!-- ====================== utility typed valueProperty types =================== -->
<complexType name="ScalarValuePropertyType">
<annotation>
<documentation>Property whose content is a scalar value.</documentation>
</annotation>
<complexContent>
<restriction base="gml:ValuePropertyType">
<sequence minOccurs="0">
<!-- <element ref="gml:_ScalarValue"/> -->
<group ref="gml:ScalarValue"/>
</sequence>
</restriction>
</complexContent>
</complexType>
<complexType name="BooleanPropertyType">
<annotation>
<documentation>Property whose content is a Boolean value.</documentation>
</annotation>
<complexContent>
<restriction base="gml:ValuePropertyType">
<sequence minOccurs="0">
<element ref="gml:Boolean"/>
</sequence>
</restriction>
</complexContent>
</complexType>
<complexType name="CategoryPropertyType">
<annotation>
<documentation>Property whose content is a Category.</documentation>
</annotation>
<complexContent>
<restriction base="gml:ValuePropertyType">
<sequence minOccurs="0">
<element ref="gml:Category"/>
</sequence>
</restriction>
</complexContent>
</complexType>
<complexType name="QuantityPropertyType">
<annotation>
<documentation>Property whose content is a Quantity.</documentation>
</annotation>
<complexContent>
<restriction base="gml:ValuePropertyType">
<sequence minOccurs="0">
<element ref="gml:Quantity"/>
</sequence>
</restriction>
</complexContent>
</complexType>
<complexType name="CountPropertyType">
<annotation>
<documentation>Property whose content is a Count.</documentation>
</annotation>
<complexContent>
<restriction base="gml:ValuePropertyType">
<sequence minOccurs="0">
<element ref="gml:Count"/>
</sequence>
</restriction>
</complexContent>
</complexType>
<!-- ====================================================================== -->
</schema>
<?xml version="1.0" encoding="UTF-8"?>
<!--
=================== OpenGIS ============================
This schema is here because there are errors in publicly available smil schemas at w3c site.
One is acknowledged by w3c - it is typographical error described in SMIL errata document at:
http://www.w3.org/2001/07/REC-SMIL20-20010731-errata
under:
E30: Correction in the SMIL 2.0 utility Schema, section B.3.48 (revised 29 03 2002)
Others (at least one) are assumed after failed validation using Visual Studio .NET.
These smil schemas are reorganized to include in minimum number of files all and only definitions required by
defaultStyle.xsd. It was done to enable the validation of GML3.0 schemas.
When w3c fixes the public schemas these will be discarded
comment: Milan Trninic, Galdos Systems Inc., May 2002
=================== OpenGIS ============================
-->
<!--
XML Schema for the SMIL 2.0 Language
This is SMIL 2.0
Copyright: 1998-2001 W3C (MIT, INRIA, Keio), All Rights Reserved.
See http://www.w3.org/Consortium/Legal/.
Public URI: http://www.w3.org/2001/SMIL20/smil20-language.xsd
Author: Aaron Michael Cohen (Intel)
Revision: 2001/07/15
Note: <any> wildcard element content is missing from most of the SMIL 2.0 elements because of a conflict
between substitutionGroups and wildcard content.
-->
<schema targetNamespace="http://www.w3.org/2001/SMIL20/Language" xmlns:smil20lang="http://www.w3.org/2001/SMIL20/Language" xmlns:smil20="http://www.w3.org/2001/SMIL20/" xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<!-- import the smil20 namespaces -->
<import namespace="http://www.w3.org/2001/SMIL20/" schemaLocation="smil20.xsd"/>
<element name="animate" type="smil20lang:animateType"/>
<complexType name="animateType">
<complexContent>
<extension base="smil20:animatePrototype">
<choice minOccurs="0" maxOccurs="unbounded">
<any namespace="##other" processContents="lax"/>
</choice>
<attributeGroup ref="smil20lang:CoreAttrs"/>
<attributeGroup ref="smil20lang:TimingAttrs"/>
<attributeGroup ref="smil20:animTargetAttrs"/>
<attributeGroup ref="smil20:animModeAttrs"/>
<attributeGroup ref="smil20:skipContentAttrs"/>
<anyAttribute namespace="##any" processContents="strict"/>
</extension>
</complexContent>
</complexType>
<attributeGroup name="CoreAttrs">
<attributeGroup ref="smil20:structureModuleAttrs"/>
<attributeGroup ref="smil20:alternateContentAttrs"/>
</attributeGroup>
<attributeGroup name="TimingAttrs">
<attributeGroup ref="smil20lang:BasicTimingAttrs"/>
<attributeGroup ref="smil20:syncBehaviorAttrs"/>
<attributeGroup ref="smil20:syncBehaviorDefaultAttrs"/>
<attributeGroup ref="smil20:restartTimingAttrs"/>
<attributeGroup ref="smil20:restartDefaultAttrs"/>
<attributeGroup ref="smil20:fillTimingAttrs"/>
<attributeGroup ref="smil20:fillDefaultAttrs"/>
</attributeGroup>
<attributeGroup name="BasicTimingAttrs">
<attributeGroup ref="smil20:beginEndTimingAttrs"/>
<attributeGroup ref="smil20:durTimingAttrs"/>
<attributeGroup ref="smil20:repeatTimingAttrs"/>
<attributeGroup ref="smil20:deprecatedRepeatTiming"/>
<attributeGroup ref="smil20:minMaxTimingAttrs"/>
</attributeGroup>
<element name="animateMotion" type="smil20lang:animateMotionType"/>
<complexType name="animateMotionType">
<complexContent>
<extension base="smil20:animateMotionPrototype">
<choice minOccurs="0" maxOccurs="unbounded">
<any namespace="##other" processContents="lax"/>
</choice>
<attributeGroup ref="smil20lang:CoreAttrs"/>
<attributeGroup ref="smil20lang:TimingAttrs"/>
<attributeGroup ref="smil20:animTargetAttrs"/>
<attributeGroup ref="smil20:animModeAttrs"/>
<attributeGroup ref="smil20:skipContentAttrs"/>
<anyAttribute namespace="##any" processContents="strict"/>
</extension>
</complexContent>
</complexType>
<element name="animateColor" type="smil20lang:animateColorType"/>
<complexType name="animateColorType">
<complexContent>
<extension base="smil20:animateColorPrototype">
<choice minOccurs="0" maxOccurs="unbounded">
<any namespace="##other" processContents="lax"/>
</choice>
<attributeGroup ref="smil20lang:CoreAttrs"/>
<attributeGroup ref="smil20lang:TimingAttrs"/>
<attributeGroup ref="smil20:animTargetAttrs"/>
<attributeGroup ref="smil20:animModeAttrs"/>
<attributeGroup ref="smil20:skipContentAttrs"/>
<anyAttribute namespace="##any" processContents="strict"/>
</extension>
</complexContent>
</complexType>
<element name="set" type="smil20lang:setType"/>
<complexType name="setType">
<complexContent>
<extension base="smil20:setPrototype">
<choice minOccurs="0" maxOccurs="unbounded">
<any namespace="##other" processContents="lax"/>
</choice>
<attributeGroup ref="smil20lang:CoreAttrs"/>
<attributeGroup ref="smil20lang:TimingAttrs"/>
<attributeGroup ref="smil20:animTargetAttrs"/>
<attributeGroup ref="smil20:skipContentAttrs"/>
<anyAttribute namespace="##any" processContents="strict"/>
</extension>
</complexContent>
</complexType>
</schema>
<?xml version="1.0" encoding="UTF-8"?>
<!--
=================== OpenGIS ============================
This schema is here because there are errors in publicly available smil schemas at w3c site.
One is acknowledged by w3c - it is typographical error described in SMIL errata document at:
http://www.w3.org/2001/07/REC-SMIL20-20010731-errata
under:
E30: Correction in the SMIL 2.0 utility Schema, section B.3.48 (revised 29 03 2002)
Others (at least one) are assumed after failed validation using Visual Studio .NET.
These smil schemas are reorganized to include in minimum number of files all and only definitions required by
defaultStyle.xsd. It was done to enable the validation of GML3.0 schemas.
When w3c fixes the public schemas these will be discarded
comment: Milan Trninic, Galdos Systems Inc., May 2002
comment#2: Milan Trninic, Galdos Systems Inc., Dec 2002
In order to validate with xerces, changed the "x:" prefix to "xml:" in the namespace declaration and reference to "lang" attribute
=================== OpenGIS ============================
-->
<!--
XML Schema for the SMIL 2.0 modules
This is SMIL 2.0
Copyright: 1998-2001 W3C (MIT, INRIA, Keio), All Rights Reserved.
See http://www.w3.org/Consortium/Legal/.
Public URI: http://www.w3.org/2001/SMIL20/smil20.xsd
Author: Aaron Michael Cohen (Intel)
Revision: 2001/07/31
-->
<schema targetNamespace="http://www.w3.org/2001/SMIL20/" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:smil20="http://www.w3.org/2001/SMIL20/" xmlns:smil20lang="http://www.w3.org/2001/SMIL20/Language" elementFormDefault="qualified">
<import namespace="http://www.w3.org/2001/SMIL20/Language" schemaLocation="smil20-language.xsd"/>
<!-- =============================================================
struct.xsd
============================================================== -->
<import namespace="http://www.w3.org/XML/1998/namespace" schemaLocation="xml-mod.xsd"/>
<attributeGroup name="structureModuleAttrs">
<attribute name="id" type="ID" use="optional"/>
<attribute name="class" type="string" use="optional"/>
<attribute ref="xml:lang" use="optional"/>
</attributeGroup>
<!-- =============================================================
content.xsd
============================================================== -->
<attributeGroup name="skipContentAttrs">
<attribute name="skip-content" type="boolean" use="optional" default="true"/>
</attributeGroup>
<!-- =============================================================
media.xsd
============================================================== -->
<attributeGroup name="alternateContentAttrs">
<attribute name="alt" type="string" use="optional"/>
<attribute name="longdesc" type="anyURI" use="optional"/>
</attributeGroup>
<!-- =============================================================
utility.xsd
============================================================== -->
<simpleType name="nonNegativeDecimalType">
<restriction base="decimal">
<minInclusive value="0.0"/>
</restriction>
</simpleType>
<!-- =============================================================
animate.xsd
============================================================== -->
<element name="animate" type="smil20lang:animateType" substitutionGroup="smil20lang:animate"/>
<complexType name="animatePrototype">
<attributeGroup ref="smil20:animNamedTargetAttrs"/>
<attributeGroup ref="smil20:animAddAccumAttrs"/>
<attributeGroup ref="smil20:animValuesAttrs"/>
</complexType>
<attributeGroup name="animNamedTargetAttrs">
<attribute name="attributeName" type="string" use="required"/>
<attribute name="attributeType" use="optional" default="auto">
<simpleType>
<restriction base="string">
<enumeration value="XML"/>
<enumeration value="CSS"/>
<enumeration value="auto"/>
</restriction>
</simpleType>
</attribute>
</attributeGroup>
<attributeGroup name="animAddAccumAttrs">
<attribute name="additive" use="optional" default="replace">
<simpleType>
<restriction base="string">
<enumeration value="replace"/>
<enumeration value="sum"/>
</restriction>
</simpleType>
</attribute>
<attribute name="accumulate" use="optional" default="none">
<simpleType>
<restriction base="string">
<enumeration value="none"/>
<enumeration value="sum"/>
</restriction>
</simpleType>
</attribute>
</attributeGroup>
<attributeGroup name="animValuesAttrs">
<attributeGroup ref="smil20:animSetValuesAttrs"/>
<attribute name="from" type="string" use="optional"/>
<attribute name="by" type="string" use="optional"/>
<attribute name="values" type="string" use="optional"/>
</attributeGroup>
<attributeGroup name="animSetValuesAttrs">
<attribute name="to" type="string" use="optional"/>
</attributeGroup>
<attributeGroup name="animTargetAttrs">
<attribute name="targetElement" type="IDREF" use="optional"/>
</attributeGroup>
<attributeGroup name="animModeAttrs">
<attribute name="calcMode" use="optional" default="linear">
<simpleType>
<restriction base="string">
<enumeration value="discrete"/>
<enumeration value="linear"/>
<enumeration value="paced"/>
</restriction>
</simpleType>
</attribute>
</attributeGroup>
<element name="animateMotion" type="smil20lang:animateMotionType" substitutionGroup="smil20lang:animateMotion"/>
<complexType name="animateMotionPrototype">
<attributeGroup ref="smil20:animAddAccumAttrs"/>
<attributeGroup ref="smil20:animValuesAttrs"/>
<attribute name="origin" type="string" use="optional"/>
</complexType>
<element name="animateColor" type="smil20lang:animateColorType" substitutionGroup="smil20lang:animateColor"/>
<complexType name="animateColorPrototype">
<attributeGroup ref="smil20:animNamedTargetAttrs"/>
<attributeGroup ref="smil20:animAddAccumAttrs"/>
<attributeGroup ref="smil20:animValuesAttrs"/>
</complexType>
<element name="set" type="smil20lang:setType" substitutionGroup="smil20lang:set"/>
<complexType name="setPrototype">
<attributeGroup ref="smil20:animNamedTargetAttrs"/>
<attributeGroup ref="smil20:animSetValuesAttrs"/>
</complexType>
<!-- =============================================================
timing.xsd
============================================================== -->
<attributeGroup name="syncBehaviorAttrs">
<attribute name="syncBehavior" type="smil20:syncBehaviorType" default="default"/>
<attribute name="syncTolerance" type="string" use="optional"/>
</attributeGroup>
<simpleType name="syncBehaviorType">
<restriction base="string">
<enumeration value="canSlip"/>
<enumeration value="locked"/>
<enumeration value="independent"/>
<enumeration value="default"/>
</restriction>
</simpleType>
<attributeGroup name="syncBehaviorDefaultAttrs">
<attribute name="syncBehaviorDefault" type="smil20:syncBehaviorDefaultType" default="inherit"/>
<attribute name="syncToleranceDefault" type="string" default="inherit"/>
</attributeGroup>
<simpleType name="syncBehaviorDefaultType">
<restriction base="string">
<enumeration value="canSlip"/>
<enumeration value="locked"/>
<enumeration value="independent"/>
<enumeration value="inherit"/>
</restriction>
</simpleType>
<attributeGroup name="restartTimingAttrs">
<attribute name="restart" type="smil20:restartTimingType" default="default"/>
</attributeGroup>
<simpleType name="restartTimingType">
<restriction base="string">
<enumeration value="never"/>
<enumeration value="always"/>
<enumeration value="whenNotActive"/>
<enumeration value="default"/>
</restriction>
</simpleType>
<attributeGroup name="restartDefaultAttrs">
<attribute name="restartDefault" type="smil20:restartDefaultType" default="inherit"/>
</attributeGroup>
<simpleType name="restartDefaultType">
<restriction base="string">
<enumeration value="never"/>
<enumeration value="always"/>
<enumeration value="whenNotActive"/>
<enumeration value="inherit"/>
</restriction>
</simpleType>
<attributeGroup name="fillTimingAttrs">
<attribute name="fill" type="smil20:fillTimingAttrsType" default="default"/>
</attributeGroup>
<simpleType name="fillTimingAttrsType">
<restriction base="string">
<enumeration value="remove"/>
<enumeration value="freeze"/>
<enumeration value="hold"/>
<enumeration value="auto"/>
<enumeration value="default"/>
<enumeration value="transition"/>
</restriction>
</simpleType>
<attributeGroup name="fillDefaultAttrs">
<attribute name="fillDefault" type="smil20:fillDefaultType" default="inherit"/>
</attributeGroup>
<simpleType name="fillDefaultType">
<restriction base="string">
<enumeration value="remove"/>
<enumeration value="freeze"/>
<enumeration value="hold"/>
<enumeration value="auto"/>
<enumeration value="inherit"/>
<enumeration value="transition"/>
</restriction>
</simpleType>
<attributeGroup name="beginEndTimingAttrs">
<attribute name="begin" type="string"/>
<attribute name="end" type="string"/>
</attributeGroup>
<attributeGroup name="durTimingAttrs">
<attribute name="dur" type="string"/>
</attributeGroup>
<attributeGroup name="repeatTimingAttrs">
<attribute name="repeatDur" type="string"/>
<attribute name="repeatCount" type="smil20:nonNegativeDecimalType"/>
</attributeGroup>
<attributeGroup name="deprecatedRepeatTiming">
<attribute name="repeat" type="nonNegativeInteger"/>
</attributeGroup>
<attributeGroup name="minMaxTimingAttrs">
<attribute name="min" type="string"/>
<attribute name="max" type="string"/>
</attributeGroup>
</schema>
<?xml version="1.0" encoding="UTF-8"?>
<!--
=================== OpenGIS ============================
This schema is required by SMIL schemas.
There are errors in publicly available smil schemas at w3c site.
One is acknowledged by w3c - it is typographical error described in SMIL errata document at:
http://www.w3.org/2001/07/REC-SMIL20-20010731-errata
under:
E30: Correction in the SMIL 2.0 utility Schema, section B.3.48 (revised 29 03 2002)
Others (at least one) are assumed after failed validation using Visual Studio .NET.
These smil schemas are reorganized to include in minimum number of files all and only definitions required by
defaultStyle.xsd. It was done to enable the validation of GML3.0 schemas.
When w3c fixes the public schemas these will be discarded
comment: Milan Trninic, Galdos Systems Inc., May 2002
comment#2: Milan Trninic, Galdos Systems Inc., Dec 2002
In order to validate with xerces, changed the "x:" prefix to "xml:" in the namespace declaration and references to "lang" and "space" attributes
=================== OpenGIS ============================
-->
<schema targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns="http://www.w3.org/2001/XMLSchema">
<attribute name="lang" type="language">
<annotation>
<documentation>In due course, we should install the relevant ISO 2- and 3-letter
codes as the enumerated possible values . . .</documentation>
</annotation>
</attribute>
<attribute name="space" default="preserve">
<simpleType>
<restriction base="NCName">
<enumeration value="default"/>
<enumeration value="preserve"/>
</restriction>
</simpleType>
</attribute>
<attributeGroup name="specialAttrs">
<attribute ref="xml:lang"/>
<attribute ref="xml:space"/>
</attributeGroup>
</schema>
<?xml version="1.0" encoding="UTF-8"?>
<!-- File: xlinks.xsd -->
<schema targetNamespace="http://www.w3.org/1999/xlink" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xsd="http://www.w3.org/2001/XMLSchema" version="2.0">
<annotation>
<appinfo source="urn:opengis:specification:gml:schema-xlinks:v3.0c2">xlinks.xsd v3.0b2 2001-07</appinfo>
<documentation>
GML 3.0 candidate xlinks schema. Copyright (c) 2001 OGC, All Rights Reserved.
</documentation>
</annotation>
<!-- ==============================================================
global declarations
=============================================================== -->
<!-- locator attribute -->
<attribute name="href" type="anyURI"/>
<!-- semantic attributes -->
<attribute name="role" type="anyURI"/>
<attribute name="arcrole" type="anyURI"/>
<attribute name="title" type="string"/>
<!-- behavior attributes -->
<attribute name="show">
<annotation>
<documentation>
The 'show' attribute is used to communicate the desired presentation
of the ending resource on traversal from the starting resource; it's
value should be treated as follows:
new - load ending resource in a new window, frame, pane, or other
presentation context
replace - load the resource in the same window, frame, pane, or
other presentation context
embed - load ending resource in place of the presentation of the
starting resource
other - behavior is unconstrained; examine other markup in the
link for hints
none - behavior is unconstrained
</documentation>
</annotation>
<simpleType>
<restriction base="string">
<enumeration value="new"/>
<enumeration value="replace"/>
<enumeration value="embed"/>
<enumeration value="other"/>
<enumeration value="none"/>
</restriction>
</simpleType>
</attribute>
<attribute name="actuate">
<annotation>
<documentation>
The 'actuate' attribute is used to communicate the desired timing
of traversal from the starting resource to the ending resource;
it's value should be treated as follows:
onLoad - traverse to the ending resource immediately on loading
the starting resource
onRequest - traverse from the starting resource to the ending
resource only on a post-loading event triggered for
this purpose
other - behavior is unconstrained; examine other markup in link
for hints
none - behavior is unconstrained
</documentation>
</annotation>
<simpleType>
<restriction base="string">
<enumeration value="onLoad"/>
<enumeration value="onRequest"/>
<enumeration value="other"/>
<enumeration value="none"/>
</restriction>
</simpleType>
</attribute>
<!-- traversal attributes -->
<attribute name="label" type="string"/>
<attribute name="from" type="string"/>
<attribute name="to" type="string"/>
<!-- ==============================================================
Attributes grouped by XLink type, as specified in the W3C
Proposed Recommendation (dated 2000-12-20)
============================================================== -->
<attributeGroup name="simpleLink">
<attribute name="type" type="string" fixed="simple" form="qualified"/>
<attribute ref="xlink:href" use="optional"/>
<attribute ref="xlink:role" use="optional"/>
<attribute ref="xlink:arcrole" use="optional"/>
<attribute ref="xlink:title" use="optional"/>
<attribute ref="xlink:show" use="optional"/>
<attribute ref="xlink:actuate" use="optional"/>
</attributeGroup>
<attributeGroup name="extendedLink">
<attribute name="type" type="string" fixed="extended" form="qualified"/>
<attribute ref="xlink:role" use="optional"/>
<attribute ref="xlink:title" use="optional"/>
</attributeGroup>
<attributeGroup name="locatorLink">
<attribute name="type" type="string" fixed="locator" form="qualified"/>
<attribute ref="xlink:href" use="required"/>
<attribute ref="xlink:role" use="optional"/>
<attribute ref="xlink:title" use="optional"/>
<attribute ref="xlink:label" use="optional"/>
</attributeGroup>
<attributeGroup name="arcLink">
<attribute name="type" type="string" fixed="arc" form="qualified"/>
<attribute ref="xlink:arcrole" use="optional"/>
<attribute ref="xlink:title" use="optional"/>
<attribute ref="xlink:show" use="optional"/>
<attribute ref="xlink:actuate" use="optional"/>
<attribute ref="xlink:from" use="optional"/>
<attribute ref="xlink:to" use="optional"/>
</attributeGroup>
<attributeGroup name="resourceLink">
<attribute name="type" type="string" fixed="resource" form="qualified"/>
<attribute ref="xlink:role" use="optional"/>
<attribute ref="xlink:title" use="optional"/>
<attribute ref="xlink:label" use="optional"/>
</attributeGroup>
<attributeGroup name="titleLink">
<attribute name="type" type="string" fixed="title" form="qualified"/>
</attributeGroup>
<attributeGroup name="emptyLink">
<attribute name="type" type="string" fixed="none" form="qualified"/>
</attributeGroup>
</schema>
<?xml version="1.0" encoding="UTF-8"?>
<!--Modified by Ram Kumar (MSI) on 24 July 2002-->
<xs:schema targetNamespace="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="urn:oasis:names:tc:ciq:xsdschema:xAL:2.0" elementFormDefault="qualified">
<xs:annotation>
<xs:documentation>xAL: eXtensible Address Language
This is an XML document type definition (DTD) for
defining addresses.
Original Date of Creation: 1 March 2001
Copyright(c) 2000, OASIS. All Rights Reserved [http://www.oasis-open.org]
Contact: Customer Information Quality Technical Committee, OASIS
http://www.oasis-open.org/committees/ciq
VERSION: 2.0 [MAJOR RELEASE] Date of Creation: 01 May 2002
Last Update: 24 July 2002
Previous Version: 1.3</xs:documentation>
</xs:annotation>
<xs:annotation>
<xs:documentation>Common Attributes:Type - If not documented then it means, possible values of Type not limited to: Official, Unique, Abbreviation, OldName, Synonym
Code:Address element codes are used by groups like postal groups like ECCMA, ADIS, UN/PROLIST for postal services</xs:documentation>
</xs:annotation>
<xs:attributeGroup name="grPostal">
<xs:attribute name="Code">
<xs:annotation>
<xs:documentation>Used by postal services to encode the name of the element.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:attributeGroup>
<xs:element name="xAL">
<xs:annotation>
<xs:documentation>Root element for a list of addresses</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="AddressDetails" maxOccurs="unbounded"/>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="Version">
<xs:annotation>
<xs:documentation>Specific to DTD to specify the version number of DTD</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="AddressDetails" type="AddressDetails">
<xs:annotation>
<xs:documentation>This container defines the details of the address. Can define multiple addresses including tracking address history</xs:documentation>
</xs:annotation>
</xs:element>
<xs:complexType name="AddressDetails">
<xs:sequence>
<xs:element name="PostalServiceElements" minOccurs="0">
<xs:annotation>
<xs:documentation>Postal authorities use specific postal service data to expedient delivery of mail</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="AddressIdentifier" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>A unique identifier of an address assigned by postal authorities. Example: DPID in Australia</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="IdentifierType">
<xs:annotation>
<xs:documentation>Type of identifier. eg. DPID as in Australia</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Type"/>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="EndorsementLineCode" minOccurs="0">
<xs:annotation>
<xs:documentation>Directly affects postal service distribution</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="Type">
<xs:annotation>
<xs:documentation>Specific to postal service</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="KeyLineCode" minOccurs="0">
<xs:annotation>
<xs:documentation>Required for some postal services</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="Type">
<xs:annotation>
<xs:documentation>Specific to postal service</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="Barcode" minOccurs="0">
<xs:annotation>
<xs:documentation>Required for some postal services</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="Type">
<xs:annotation>
<xs:documentation>Specific to postal service</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="SortingCode" minOccurs="0">
<xs:annotation>
<xs:documentation>Used for sorting addresses. Values may for example be CEDEX 16 (France)</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:attribute name="Type">
<xs:annotation>
<xs:documentation>Specific to postal service</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup ref="grPostal"/>
</xs:complexType>
</xs:element>
<xs:element name="AddressLatitude" minOccurs="0">
<xs:annotation>
<xs:documentation>Latitude of delivery address</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="Type">
<xs:annotation>
<xs:documentation>Specific to postal service</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="AddressLatitudeDirection" minOccurs="0">
<xs:annotation>
<xs:documentation>Latitude direction of delivery address;N = North and S = South</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:annotation>
<xs:documentation>Specific to postal service</xs:documentation>
</xs:annotation>
<xs:attribute name="Type"/>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="AddressLongitude" minOccurs="0">
<xs:annotation>
<xs:documentation>Longtitude of delivery address</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="Type">
<xs:annotation>
<xs:documentation>Specific to postal service</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="AddressLongitudeDirection" minOccurs="0">
<xs:annotation>
<xs:documentation>Longtitude direction of delivery address;N=North and S=South</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="Type">
<xs:annotation>
<xs:documentation>Specific to postal service</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="SupplementaryPostalServiceData" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>any postal service elements not covered by the container can be represented using this element</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="Type">
<xs:annotation>
<xs:documentation>Specific to postal service</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="Type">
<xs:annotation>
<xs:documentation>USPS, ECMA, UN/PROLIST, etc</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:choice minOccurs="0">
<xs:annotation>
<xs:documentation>Use the most suitable option. Country contains the most detailed information while Locality is missing Country and AdminArea</xs:documentation>
</xs:annotation>
<xs:element name="Address">
<xs:annotation>
<xs:documentation>Address as one line of free text</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="Type">
<xs:annotation>
<xs:documentation>Postal, residential, corporate, etc</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="AddressLines" type="AddressLinesType">
<xs:annotation>
<xs:documentation>Container for Address lines</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Country">
<xs:annotation>
<xs:documentation>Specification of a country</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="AddressLine" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="CountryNameCode" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>A country code according to the specified scheme</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="Scheme">
<xs:annotation>
<xs:documentation>Country code scheme possible values, but not limited to: iso.3166-2, iso.3166-3 for two and three character country codes.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element ref="CountryName" minOccurs="0" maxOccurs="unbounded"/>
<xs:choice minOccurs="0">
<xs:element ref="AdministrativeArea"/>
<xs:element ref="Locality"/>
<xs:element ref="Thoroughfare"/>
</xs:choice>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element ref="AdministrativeArea"/>
<xs:element ref="Locality"/>
<xs:element ref="Thoroughfare"/>
</xs:choice>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="AddressType">
<xs:annotation>
<xs:documentation>Type of address. Example: Postal, residential,business, primary, secondary, etc</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="CurrentStatus">
<xs:annotation>
<xs:documentation>Moved, Living, Investment, Deceased, etc..</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ValidFromDate">
<xs:annotation>
<xs:documentation>Start Date of the validity of address</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ValidToDate">
<xs:annotation>
<xs:documentation>End date of the validity of address</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Usage">
<xs:annotation>
<xs:documentation>Communication, Contact, etc.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup ref="grPostal"/>
<xs:attribute name="AddressDetailsKey">
<xs:annotation>
<xs:documentation>Key identifier for the element for not reinforced references from other elements. Not required to be unique for the document to be valid, but application may get confused if not unique. Extend this schema adding unique contraint if needed.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
<xs:complexType name="AddressLinesType">
<xs:sequence>
<xs:element ref="AddressLine" maxOccurs="unbounded"/>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
<xs:complexType name="BuildingNameType" mixed="true">
<xs:attribute name="Type"/>
<xs:attribute name="TypeOccurrence">
<xs:annotation>
<xs:documentation>Occurrence of the building name before/after the type. eg. EGIS BUILDING where name appears before type</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="Before"/>
<xs:enumeration value="After"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
<xs:complexType name="DependentLocalityType">
<xs:sequence>
<xs:element ref="AddressLine" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="DependentLocalityName" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Name of the dependent locality</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="Type"/>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="DependentLocalityNumber" minOccurs="0">
<xs:annotation>
<xs:documentation>Number of the dependent locality. Some areas are numbered. Eg. SECTOR 5 in a Suburb as in India or SOI SUKUMVIT 10 as in Thailand</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="NameNumberOccurrence">
<xs:annotation>
<xs:documentation>Eg. SECTOR occurs before 5 in SECTOR 5</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="Before"/>
<xs:enumeration value="After"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:choice minOccurs="0">
<xs:element ref="PostBox"/>
<xs:element name="LargeMailUser" type="LargeMailUserType">
<xs:annotation>
<xs:documentation>Specification of a large mail user address. Examples of large mail users are postal companies, companies in France with a cedex number, hospitals and airports with their own post code. Large mail user addresses do not have a street name with premise name or premise number in countries like Netherlands. But they have a POBox and street also in countries like France</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="PostOffice"/>
<xs:element name="PostalRoute" type="PostalRouteType">
<xs:annotation>
<xs:documentation> A Postal van is specific for a route as in Is`rael, Rural route</xs:documentation>
</xs:annotation>
</xs:element>
</xs:choice>
<xs:element ref="Thoroughfare" minOccurs="0"/>
<xs:element ref="Premise" minOccurs="0"/>
<xs:element name="DependentLocality" type="DependentLocalityType" minOccurs="0">
<xs:annotation>
<xs:documentation>Dependent localities are Districts within cities/towns, locality divisions, postal
divisions of cities, suburbs, etc. DependentLocality is a recursive element, but no nesting deeper than two exists (Locality-DependentLocality-DependentLocality).</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="PostalCode" minOccurs="0"/>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="Type">
<xs:annotation>
<xs:documentation>City or IndustrialEstate, etc</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="UsageType">
<xs:annotation>
<xs:documentation>Postal or Political - Sometimes locations must be distinguished between postal system, and physical locations as defined by a political system</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Connector">
<xs:annotation>
<xs:documentation>"VIA" as in Hill Top VIA Parish where Parish is a locality and Hill Top is a dependent locality</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Indicator">
<xs:annotation>
<xs:documentation>Eg. Erode (Dist) where (Dist) is the Indicator</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
<xs:complexType name="FirmType">
<xs:sequence>
<xs:element ref="AddressLine" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="FirmName" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Name of the firm</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="Type"/>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element ref="Department" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="MailStop" type="MailStopType" minOccurs="0">
<xs:annotation>
<xs:documentation>A MailStop is where the the mail is delivered to within a premise/subpremise/firm or a facility.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="PostalCode" minOccurs="0"/>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="Type"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
<xs:complexType name="LargeMailUserType">
<xs:sequence>
<xs:element ref="AddressLine" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="LargeMailUserName" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Name of the large mail user. eg. Smith Ford International airport</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="Type" type="xs:string">
<xs:annotation>
<xs:documentation>Airport, Hospital, etc</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Code" type="xs:string"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="LargeMailUserIdentifier" minOccurs="0">
<xs:annotation>
<xs:documentation>Specification of the identification number of a large mail user. An example are the Cedex codes in France.</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="Type" type="xs:string">
<xs:annotation>
<xs:documentation>CEDEX Code</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Indicator">
<xs:annotation>
<xs:documentation>eg. Building 429 in which Building is the Indicator</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="BuildingName" type="BuildingNameType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Name of the building</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="Department" minOccurs="0"/>
<xs:element ref="PostBox" minOccurs="0"/>
<xs:element ref="Thoroughfare" minOccurs="0"/>
<xs:element ref="PostalCode" minOccurs="0"/>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="Type" type="xs:string"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
<xs:complexType name="MailStopType">
<xs:sequence>
<xs:element ref="AddressLine" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="MailStopName" minOccurs="0">
<xs:annotation>
<xs:documentation>Name of the the Mail Stop. eg. MSP, MS, etc</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="Type"/>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="MailStopNumber" minOccurs="0">
<xs:annotation>
<xs:documentation>Number of the Mail stop. eg. 123 in MS 123</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="NameNumberSeparator">
<xs:annotation>
<xs:documentation>"-" in MS-123</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="Type"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
<xs:complexType name="PostalRouteType">
<xs:sequence>
<xs:element ref="AddressLine" minOccurs="0" maxOccurs="unbounded"/>
<xs:choice>
<xs:element name="PostalRouteName" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation> Name of the Postal Route</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="Type"/>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="PostalRouteNumber">
<xs:annotation>
<xs:documentation> Number of the Postal Route</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
</xs:choice>
<xs:element ref="PostBox" minOccurs="0"/>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="Type"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
<xs:complexType name="SubPremiseType">
<xs:sequence>
<xs:element ref="AddressLine" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="SubPremiseName" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation> Name of the SubPremise</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="Type"/>
<xs:attribute name="TypeOccurrence">
<xs:annotation>
<xs:documentation>EGIS Building where EGIS occurs before Building</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="Before"/>
<xs:enumeration value="After"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:choice minOccurs="0">
<xs:element name="SubPremiseLocation">
<xs:annotation>
<xs:documentation> Name of the SubPremise Location. eg. LOBBY, BASEMENT, GROUND FLOOR, etc...</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attributeGroup ref="grPostal"/>
</xs:complexType>
</xs:element>
<xs:element name="SubPremiseNumber" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation> Specification of the identifier of a sub-premise. Examples of sub-premises are apartments and suites. sub-premises in a building are often uniquely identified by means of consecutive
identifiers. The identifier can be a number, a letter or any combination of the two. In the latter case, the identifier includes exactly one variable (range) part, which is either a
number or a single letter that is surrounded by fixed parts at the left (prefix) or the right (postfix).</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="Indicator">
<xs:annotation>
<xs:documentation>"TH" in 12TH which is a floor number, "NO." in NO.1, "#" in APT #12, etc.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IndicatorOccurrence">
<xs:annotation>
<xs:documentation>"No." occurs before 1 in No.1, or TH occurs after 12 in 12TH</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="Before"/>
<xs:enumeration value="After"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="NumberTypeOccurrence">
<xs:annotation>
<xs:documentation>12TH occurs "before" FLOOR (a type of subpremise) in 12TH FLOOR</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="Before"/>
<xs:enumeration value="After"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="PremiseNumberSeparator">
<xs:annotation>
<xs:documentation>"/" in 12/14 Archer Street where 12 is sub-premise number and 14 is premise number</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Type"/>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
</xs:choice>
<xs:element name="SubPremiseNumberPrefix" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation> Prefix of the sub premise number. eg. A in A-12</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="NumberPrefixSeparator">
<xs:annotation>
<xs:documentation>A-12 where 12 is number and A is prefix and "-" is the separator</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Type"/>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="SubPremiseNumberSuffix" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation> Suffix of the sub premise number. eg. A in 12A</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="NumberSuffixSeparator">
<xs:annotation>
<xs:documentation>12-A where 12 is number and A is suffix and "-" is the separator</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Type"/>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="BuildingName" type="BuildingNameType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Name of the building</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Firm" type="FirmType" minOccurs="0">
<xs:annotation>
<xs:documentation>Specification of a firm, company, organization, etc. It can be specified as part of an address that contains a street or a postbox. It is therefore different from a large mail user address, which contains no street.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="MailStop" type="MailStopType" minOccurs="0">
<xs:annotation>
<xs:documentation>A MailStop is where the the mail is delivered to within a premise/subpremise/firm or a facility.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="PostalCode" minOccurs="0"/>
<xs:element name="SubPremise" type="SubPremiseType" minOccurs="0">
<xs:annotation>
<xs:documentation>Specification of a single sub-premise. Examples of sub-premises are apartments and suites.
Each sub-premise should be uniquely identifiable. SubPremiseType: Specification of the name of a sub-premise type. Possible values not limited to: Suite, Appartment, Floor, Unknown
Multiple levels within a premise by recursively calling SubPremise Eg. Level 4, Suite 2, Block C</xs:documentation>
</xs:annotation>
</xs:element>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="Type"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
<xs:complexType name="ThoroughfareLeadingTypeType" mixed="true">
<xs:attribute name="Type"/>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
<xs:complexType name="ThoroughfareNameType" mixed="true">
<xs:attribute name="Type"/>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
<xs:complexType name="ThoroughfarePostDirectionType" mixed="true">
<xs:attribute name="Type"/>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
<xs:complexType name="ThoroughfarePreDirectionType" mixed="true">
<xs:attribute name="Type"/>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
<xs:complexType name="ThoroughfareTrailingTypeType" mixed="true">
<xs:attribute name="Type"/>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
<xs:element name="AddressLine">
<xs:annotation>
<xs:documentation>Free format address representation. An address can have more than one line. The order of the AddressLine elements must be preserved.</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="Type">
<xs:annotation>
<xs:documentation>Defines the type of address line. eg. Street, Address Line 1, etc.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="Locality">
<xs:annotation>
<xs:documentation>Locality is one level lower than adminisstrative area. Eg.: cities, reservations and any other built-up areas.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="AddressLine" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="LocalityName" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Name of the locality</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="Type"/>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:choice minOccurs="0">
<xs:element ref="PostBox"/>
<xs:element name="LargeMailUser" type="LargeMailUserType">
<xs:annotation>
<xs:documentation>Specification of a large mail user address. Examples of large mail users are postal companies, companies in France with a cedex number, hospitals and airports with their own post code. Large mail user addresses do not have a street name with premise name or premise number in countries like Netherlands. But they have a POBox and street also in countries like France</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="PostOffice"/>
<xs:element name="PostalRoute" type="PostalRouteType">
<xs:annotation>
<xs:documentation>A Postal van is specific for a route as in Is`rael, Rural route</xs:documentation>
</xs:annotation>
</xs:element>
</xs:choice>
<xs:element ref="Thoroughfare" minOccurs="0"/>
<xs:element ref="Premise" minOccurs="0"/>
<xs:element name="DependentLocality" type="DependentLocalityType" minOccurs="0">
<xs:annotation>
<xs:documentation>Dependent localities are Districts within cities/towns, locality divisions, postal
divisions of cities, suburbs, etc. DependentLocality is a recursive element, but no nesting deeper than two exists (Locality-DependentLocality-DependentLocality).</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="PostalCode" minOccurs="0"/>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="Type">
<xs:annotation>
<xs:documentation>Possible values not limited to: City, IndustrialEstate, etc</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="UsageType">
<xs:annotation>
<xs:documentation>Postal or Political - Sometimes locations must be distinguished between postal system, and physical locations as defined by a political system</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Indicator">
<xs:annotation>
<xs:documentation>Erode (Dist) where (Dist) is the Indicator</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="Thoroughfare">
<xs:annotation>
<xs:documentation>Specification of a thoroughfare. A thoroughfare could be a rd, street, canal, river, etc. Note dependentlocality in a street. For example, in some countries, a large street will
have many subdivisions with numbers. Normally the subdivision name is the same as the road name, but with a number to identifiy it. Eg. SOI SUKUMVIT 3, SUKUMVIT RD, BANGKOK</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="AddressLine" minOccurs="0" maxOccurs="unbounded"/>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="ThoroughfareNumber"/>
<xs:element name="ThoroughfareNumberRange">
<xs:annotation>
<xs:documentation>A container to represent a range of numbers (from x thru y)for a thoroughfare. eg. 1-2 Albert Av</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="AddressLine" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="ThoroughfareNumberFrom">
<xs:annotation>
<xs:documentation>Starting number in the range</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:sequence>
<xs:element ref="AddressLine" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="ThoroughfareNumberPrefix" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="ThoroughfareNumber" maxOccurs="unbounded"/>
<xs:element ref="ThoroughfareNumberSuffix" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="ThoroughfareNumberTo">
<xs:annotation>
<xs:documentation>Ending number in the range</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:sequence>
<xs:element ref="AddressLine" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="ThoroughfareNumberPrefix" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="ThoroughfareNumber" maxOccurs="unbounded"/>
<xs:element ref="ThoroughfareNumberSuffix" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="RangeType">
<xs:annotation>
<xs:documentation>Thoroughfare number ranges are odd or even</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="Odd"/>
<xs:enumeration value="Even"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="Indicator">
<xs:annotation>
<xs:documentation>"No." No.12-13</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Separator">
<xs:annotation>
<xs:documentation>"-" in 12-14 or "Thru" in 12 Thru 14 etc.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IndicatorOccurrence">
<xs:annotation>
<xs:documentation>No.12-14 where "No." is before actual street number</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="Before"/>
<xs:enumeration value="After"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="NumberRangeOccurrence">
<xs:annotation>
<xs:documentation>23-25 Archer St, where number appears before name</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="BeforeName"/>
<xs:enumeration value="AfterName"/>
<xs:enumeration value="BeforeType"/>
<xs:enumeration value="AfterType"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="Type"/>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
</xs:choice>
<xs:element ref="ThoroughfareNumberPrefix" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="ThoroughfareNumberSuffix" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="ThoroughfarePreDirection" type="ThoroughfarePreDirectionType" minOccurs="0">
<xs:annotation>
<xs:documentation>North Baker Street, where North is the pre-direction. The direction appears before the name.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ThoroughfareLeadingType" type="ThoroughfareLeadingTypeType" minOccurs="0">
<xs:annotation>
<xs:documentation>Appears before the thoroughfare name. Ed. Spanish: Avenida Aurora, where Avenida is the leading type / French: Rue Moliere, where Rue is the leading type.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ThoroughfareName" type="ThoroughfareNameType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Specification of the name of a Thoroughfare (also dependant street name): street name, canal name, etc.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ThoroughfareTrailingType" type="ThoroughfareTrailingTypeType" minOccurs="0">
<xs:annotation>
<xs:documentation>Appears after the thoroughfare name. Ed. British: Baker Lane, where Lane is the trailing type.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ThoroughfarePostDirection" type="ThoroughfarePostDirectionType" minOccurs="0">
<xs:annotation>
<xs:documentation>221-bis Baker Street North, where North is the post-direction. The post-direction appears after the name.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="DependentThoroughfare" minOccurs="0">
<xs:annotation>
<xs:documentation>DependentThroughfare is related to a street; occurs in GB, IE, ES, PT</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="AddressLine" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="ThoroughfarePreDirection" type="ThoroughfarePreDirectionType" minOccurs="0">
<xs:annotation>
<xs:documentation>North Baker Street, where North is the pre-direction. The direction appears before the name.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ThoroughfareLeadingType" type="ThoroughfareLeadingTypeType" minOccurs="0">
<xs:annotation>
<xs:documentation>Appears before the thoroughfare name. Ed. Spanish: Avenida Aurora, where Avenida is the leading type / French: Rue Moliere, where Rue is the leading type.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ThoroughfareName" type="ThoroughfareNameType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Specification of the name of a Thoroughfare (also dependant street name): street name, canal name, etc.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ThoroughfareTrailingType" type="ThoroughfareTrailingTypeType" minOccurs="0">
<xs:annotation>
<xs:documentation>Appears after the thoroughfare name. Ed. British: Baker Lane, where Lane is the trailing type.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ThoroughfarePostDirection" type="ThoroughfarePostDirectionType" minOccurs="0">
<xs:annotation>
<xs:documentation>221-bis Baker Street North, where North is the post-direction. The post-direction appears after the name.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="Type"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:choice minOccurs="0">
<xs:element name="DependentLocality" type="DependentLocalityType">
<xs:annotation>
<xs:documentation>Dependent localities are Districts within cities/towns, locality divisions, postal
divisions of cities, suburbs, etc. DependentLocality is a recursive element, but no nesting deeper than two exists (Locality-DependentLocality-DependentLocality).</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="Premise"/>
<xs:element name="Firm" type="FirmType">
<xs:annotation>
<xs:documentation>Specification of a firm, company, organization, etc. It can be specified as part of an address that contains a street or a postbox. It is therefore different from
a large mail user address, which contains no street.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="PostalCode"/>
</xs:choice>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="Type"/>
<xs:attribute name="DependentThoroughfares">
<xs:annotation>
<xs:documentation>Does this thoroughfare have a a dependent thoroughfare? Corner of street X, etc</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="Yes"/>
<xs:enumeration value="No"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="DependentThoroughfaresIndicator">
<xs:annotation>
<xs:documentation>Corner of, Intersection of</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="DependentThoroughfaresConnector">
<xs:annotation>
<xs:documentation>Corner of Street1 AND Street 2 where AND is the Connector</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="DependentThoroughfaresType">
<xs:annotation>
<xs:documentation>STS in GEORGE and ADELAIDE STS, RDS IN A and B RDS, etc. Use only when both the street types are the same</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="AdministrativeArea">
<xs:annotation>
<xs:documentation>Examples of administrative areas are provinces counties, special regions (such as "Rijnmond"), etc.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="AddressLine" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="AdministrativeAreaName" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation> Name of the administrative area. eg. MI in USA, NSW in Australia</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="Type"/>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="SubAdministrativeArea" minOccurs="0">
<xs:annotation>
<xs:documentation> Specification of a sub-administrative area. An example of a sub-administrative areas is a county. There are two places where the name of an administrative
area can be specified and in this case, one becomes sub-administrative area.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="AddressLine" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="SubAdministrativeAreaName" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation> Name of the sub-administrative area</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="Type"/>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:choice minOccurs="0">
<xs:element ref="Locality"/>
<xs:element ref="PostOffice"/>
<xs:element ref="PostalCode"/>
</xs:choice>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="Type">
<xs:annotation>
<xs:documentation>Province or State or County or Kanton, etc</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="UsageType">
<xs:annotation>
<xs:documentation>Postal or Political - Sometimes locations must be distinguished between postal system, and physical locations as defined by a political system</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Indicator">
<xs:annotation>
<xs:documentation>Erode (Dist) where (Dist) is the Indicator</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:choice minOccurs="0">
<xs:element ref="Locality"/>
<xs:element ref="PostOffice"/>
<xs:element ref="PostalCode"/>
</xs:choice>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="Type">
<xs:annotation>
<xs:documentation>Province or State or County or Kanton, etc</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="UsageType">
<xs:annotation>
<xs:documentation>Postal or Political - Sometimes locations must be distinguished between postal system, and physical locations as defined by a political system</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Indicator">
<xs:annotation>
<xs:documentation>Erode (Dist) where (Dist) is the Indicator</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="PostOffice">
<xs:annotation>
<xs:documentation>Specification of a post office. Examples are a rural post office where post is delivered and a post office containing post office boxes.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="AddressLine" minOccurs="0" maxOccurs="unbounded"/>
<xs:choice>
<xs:element name="PostOfficeName" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Specification of the name of the post office. This can be a rural postoffice where post is delivered or a post office containing post office boxes.</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="Type"/>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="PostOfficeNumber" minOccurs="0">
<xs:annotation>
<xs:documentation>Specification of the number of the postoffice. Common in rural postoffices</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="Indicator">
<xs:annotation>
<xs:documentation>MS in MS 62, # in MS # 12, etc.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IndicatorOccurrence">
<xs:annotation>
<xs:documentation>MS occurs before 62 in MS 62</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="Before"/>
<xs:enumeration value="After"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
</xs:choice>
<xs:element name="PostalRoute" type="PostalRouteType" minOccurs="0">
<xs:annotation>
<xs:documentation>A Postal van is specific for a route as in Is`rael, Rural route</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="PostBox" minOccurs="0"/>
<xs:element ref="PostalCode" minOccurs="0"/>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="Type">
<xs:annotation>
<xs:documentation>Could be a Mobile Postoffice Van as in Isreal</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Indicator">
<xs:annotation>
<xs:documentation>eg. Kottivakkam (P.O) here (P.O) is the Indicator</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="PostalCode">
<xs:annotation>
<xs:documentation>PostalCode is the container element for either simple or complex (extended) postal codes. Type: Area Code, Postcode, etc.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="AddressLine" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="PostalCodeNumber" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Specification of a postcode. The postcode is formatted according to country-specific rules. Example: SW3 0A8-1A, 600074, 2067</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="Type">
<xs:annotation>
<xs:documentation>Old Postal Code, new code, etc</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="PostalCodeNumberExtension" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Examples are: 1234 (USA), 1G (UK), etc.</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="Type">
<xs:annotation>
<xs:documentation>Delivery Point Suffix, New Postal Code, etc..</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="NumberExtensionSeparator">
<xs:annotation>
<xs:documentation>The separator between postal code number and the extension. Eg. "-"</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="PostTown" minOccurs="0">
<xs:annotation>
<xs:documentation>A post town is not the same as a locality. A post town can encompass a collection of (small) localities. It can also be a subpart of a locality. An actual post town in Norway is "Bergen".</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="AddressLine" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="PostTownName" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Name of the post town</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="Type"/>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="PostTownSuffix" minOccurs="0">
<xs:annotation>
<xs:documentation>GENERAL PO in MIAMI GENERAL PO</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="Type">
<xs:annotation>
<xs:documentation>eg. village, town, suburb, etc</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="Type">
<xs:annotation>
<xs:documentation>Area Code, Postcode, Delivery code as in NZ, etc</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="PostBox">
<xs:annotation>
<xs:documentation>Specification of a postbox like mail delivery point. Only a single postbox number can be specified. Examples of postboxes are POBox, free mail numbers, etc.</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="AddressLine" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="PostBoxNumber">
<xs:annotation>
<xs:documentation>Specification of the number of a postbox</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="PostBoxNumberPrefix" minOccurs="0">
<xs:annotation>
<xs:documentation>Specification of the prefix of the post box number. eg. A in POBox:A-123</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="NumberPrefixSeparator">
<xs:annotation>
<xs:documentation>A-12 where 12 is number and A is prefix and "-" is the separator</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="PostBoxNumberSuffix" minOccurs="0">
<xs:annotation>
<xs:documentation>Specification of the suffix of the post box number. eg. A in POBox:123A</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="NumberSuffixSeparator">
<xs:annotation>
<xs:documentation>12-A where 12 is number and A is suffix and "-" is the separator</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="PostBoxNumberExtension" minOccurs="0">
<xs:annotation>
<xs:documentation>Some countries like USA have POBox as 12345-123</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="NumberExtensionSeparator">
<xs:annotation>
<xs:documentation>"-" is the NumberExtensionSeparator in POBOX:12345-123</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="Firm" type="FirmType" minOccurs="0">
<xs:annotation>
<xs:documentation>Specification of a firm, company, organization, etc. It can be specified as part of an address that contains a street or a postbox. It is therefore different from
a large mail user address, which contains no street.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="PostalCode" minOccurs="0"/>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="Type">
<xs:annotation>
<xs:documentation>Possible values are, not limited to: POBox and Freepost.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Indicator">
<xs:annotation>
<xs:documentation>LOCKED BAG NO:1234 where the Indicator is NO: and Type is LOCKED BAG</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="Department">
<xs:annotation>
<xs:documentation>Subdivision in the firm: School of Physics at Victoria University (School of Physics is the department)</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="AddressLine" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="DepartmentName" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Specification of the name of a department.</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="Type"/>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="MailStop" type="MailStopType" minOccurs="0">
<xs:annotation>
<xs:documentation>A MailStop is where the the mail is delivered to within a premise/subpremise/firm or a facility.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="PostalCode" minOccurs="0"/>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="Type">
<xs:annotation>
<xs:documentation>School in Physics School, Division in Radiology division of school of physics</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="Premise">
<xs:annotation>
<xs:documentation>Specification of a single premise, for example a house or a building. The premise as a whole has a unique premise (house) number or a premise name. There could be more than
one premise in a street referenced in an address. For example a building address near a major shopping centre or raiwlay station</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="AddressLine" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="PremiseName" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Specification of the name of the premise (house, building, park, farm, etc). A premise name is specified when the premise cannot be addressed using a street name plus premise (house) number.</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="Type"/>
<xs:attribute name="TypeOccurrence">
<xs:annotation>
<xs:documentation>EGIS Building where EGIS occurs before Building, DES JARDINS occurs after COMPLEXE DES JARDINS</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="Before"/>
<xs:enumeration value="After"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:choice minOccurs="0">
<xs:element name="PremiseLocation">
<xs:annotation>
<xs:documentation>LOBBY, BASEMENT, GROUND FLOOR, etc...</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:choice>
<xs:element ref="PremiseNumber" maxOccurs="unbounded"/>
<xs:element name="PremiseNumberRange">
<xs:annotation>
<xs:documentation>Specification for defining the premise number range. Some premises have number as Building C1-C7</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="PremiseNumberRangeFrom">
<xs:annotation>
<xs:documentation>Start number details of the premise number range</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="AddressLine" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="PremiseNumberPrefix" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="PremiseNumber" maxOccurs="unbounded"/>
<xs:element ref="PremiseNumberSuffix" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PremiseNumberRangeTo">
<xs:annotation>
<xs:documentation>End number details of the premise number range</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element ref="AddressLine" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="PremiseNumberPrefix" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="PremiseNumber" maxOccurs="unbounded"/>
<xs:element ref="PremiseNumberSuffix" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="RangeType">
<xs:annotation>
<xs:documentation>Eg. Odd or even number range</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Indicator">
<xs:annotation>
<xs:documentation>Eg. No. in Building No:C1-C5</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Separator">
<xs:annotation>
<xs:documentation>"-" in 12-14 or "Thru" in 12 Thru 14 etc.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Type"/>
<xs:attribute name="IndicatorOccurence">
<xs:annotation>
<xs:documentation>No.12-14 where "No." is before actual street number</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="Before"/>
<xs:enumeration value="After"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="NumberRangeOccurence">
<xs:annotation>
<xs:documentation>Building 23-25 where the number occurs after building name</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="BeforeName"/>
<xs:enumeration value="AfterName"/>
<xs:enumeration value="BeforeType"/>
<xs:enumeration value="AfterType"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:element>
</xs:choice>
</xs:choice>
<xs:element ref="PremiseNumberPrefix" minOccurs="0" maxOccurs="unbounded"/>
<xs:element ref="PremiseNumberSuffix" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="BuildingName" type="BuildingNameType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Specification of the name of a building.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:choice>
<xs:element name="SubPremise" type="SubPremiseType" minOccurs="0" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation>Specification of a single sub-premise. Examples of sub-premises are apartments and suites. Each sub-premise should be uniquely identifiable.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Firm" type="FirmType" minOccurs="0">
<xs:annotation>
<xs:documentation>Specification of a firm, company, organization, etc. It can be specified as part of an address that contains a street or a postbox. It is therefore different from a large mail user address, which contains no street.</xs:documentation>
</xs:annotation>
</xs:element>
</xs:choice>
<xs:element name="MailStop" type="MailStopType" minOccurs="0">
<xs:annotation>
<xs:documentation>A MailStop is where the the mail is delivered to within a premise/subpremise/firm or a facility.</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element ref="PostalCode" minOccurs="0"/>
<xs:element ref="Premise" minOccurs="0"/>
<xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="Type">
<xs:annotation>
<xs:documentation>COMPLEXE in COMPLEX DES JARDINS, A building, station, etc</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="PremiseDependency">
<xs:annotation>
<xs:documentation>STREET, PREMISE, SUBPREMISE, PARK, FARM, etc</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="PremiseDependencyType">
<xs:annotation>
<xs:documentation>NEAR, ADJACENT TO, etc</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="PremiseThoroughfareConnector">
<xs:annotation>
<xs:documentation>DES, DE, LA, LA, DU in RUE DU BOIS. These terms connect a premise/thoroughfare type and premise/thoroughfare name. Terms may appear with names AVE DU BOIS</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="ThoroughfareNumberPrefix">
<xs:annotation>
<xs:documentation>Prefix before the number. A in A12 Archer Street</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:annotation>
<xs:documentation>A-12 where 12 is number and A is prefix and "-" is the separator</xs:documentation>
</xs:annotation>
<xs:attribute name="NumberPrefixSeparator"/>
<xs:attribute name="Type"/>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="ThoroughfareNumberSuffix">
<xs:annotation>
<xs:documentation>Suffix after the number. A in 12A Archer Street</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="NumberSuffixSeparator">
<xs:annotation>
<xs:documentation>NEAR, ADJACENT TO, etc</xs:documentation>
<xs:documentation>12-A where 12 is number and A is suffix and "-" is the separator</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Type"/>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="ThoroughfareNumber">
<xs:annotation>
<xs:documentation>Eg.: 23 Archer street or 25/15 Zero Avenue, etc</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="NumberType">
<xs:annotation>
<xs:documentation>12 Archer Street is "Single" and 12-14 Archer Street is "Range"</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="Single"/>
<xs:enumeration value="Range"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="Type"/>
<xs:attribute name="Indicator">
<xs:annotation>
<xs:documentation>No. in Street No.12 or "#" in Street # 12, etc.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IndicatorOccurrence">
<xs:annotation>
<xs:documentation>No.12 where "No." is before actual street number</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="Before"/>
<xs:enumeration value="After"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="NumberOccurrence">
<xs:annotation>
<xs:documentation>23 Archer St, Archer Street 23, St Archer 23</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="BeforeName"/>
<xs:enumeration value="AfterName"/>
<xs:enumeration value="BeforeType"/>
<xs:enumeration value="AfterType"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="PremiseNumber">
<xs:annotation>
<xs:documentation>Specification of the identifier of the premise (house, building, etc). Premises in a street are often uniquely identified by means of consecutive identifiers. The identifier can be a number, a letter or any combination of the two.</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="NumberType">
<xs:annotation>
<xs:documentation>Building 12-14 is "Range" and Building 12 is "Single"</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="Single"/>
<xs:enumeration value="Range"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="Type"/>
<xs:attribute name="Indicator">
<xs:annotation>
<xs:documentation>No. in House No.12, # in #12, etc.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="IndicatorOccurrence">
<xs:annotation>
<xs:documentation>No. occurs before 12 No.12</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="Before"/>
<xs:enumeration value="After"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="NumberTypeOccurrence">
<xs:annotation>
<xs:documentation>12 in BUILDING 12 occurs "after" premise type BUILDING</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:NMTOKEN">
<xs:enumeration value="Before"/>
<xs:enumeration value="After"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="PremiseNumberPrefix">
<xs:annotation>
<xs:documentation>A in A12</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="NumberPrefixSeparator">
<xs:annotation>
<xs:documentation>A-12 where 12 is number and A is prefix and "-" is the separator</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Type"/>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="PremiseNumberSuffix">
<xs:annotation>
<xs:documentation>A in 12A</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="NumberSuffixSeparator">
<xs:annotation>
<xs:documentation>12-A where 12 is number and A is suffix and "-" is the separator</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="Type"/>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
<xs:element name="CountryName">
<xs:annotation>
<xs:documentation>Specification of the name of a country.</xs:documentation>
</xs:annotation>
<xs:complexType mixed="true">
<xs:attribute name="Type">
<xs:annotation>
<xs:documentation>Old name, new name, etc</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup ref="grPostal"/>
<xs:anyAttribute namespace="##other"/>
</xs:complexType>
</xs:element>
</xs:schema>
package org.citygml4j.ade_xjc;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintStream;
import java.math.BigInteger;
import java.security.NoSuchAlgorithmException;
import org.kohsuke.args4j.CmdLineException;
import org.kohsuke.args4j.CmdLineParser;
import org.kohsuke.args4j.Option;
import org.xml.sax.InputSource;
import com.sun.codemodel.JCodeModel;
import com.sun.tools.xjc.api.S2JJAXBModel;
import com.sun.tools.xjc.api.SchemaCompiler;
import com.sun.tools.xjc.api.XJC;
public class ADE_XJC {
private static final Logger LOG = Logger.getInstance();
// some dirs we will need
private File schema_dir = new File("schema");
// some files we will need
private File baseProfileFile = new File(schema_dir.getAbsoluteFile() + "/CityGML/citygml4j_profile.xsd");
private File bindingFile = new File(schema_dir.getAbsoluteFile() + "/CityGML/binding.xjb");
// args
@Option(name="-schema", usage="XML schema file of the ADE (required)", metaVar="<fileName>")
private File adeSchemaFile = null;
@Option(name="-package", usage="package for the ADE classes (optional, default=\"ade\")", metaVar="<packageName>")
private String packageName = "ade";
@Option(name="-binding", usage="JAXB binding file for ADE schema (optional)", metaVar="<fileName>")
private File adeBindingFile = null;
@Option(name="-output", usage="output folder (optional, default=\"src-gen\")", metaVar="<folderName>")
private File outputFolder = new File("src-gen");
@Option(name="-non-strict", usage="allow changes to schemas, bindings, etc. (optional)")
private boolean nonStrict = false;
@Option(name="-clean", usage="clean output folder")
private boolean clean;
@Option(name="-h", aliases={"-help"}, usage="print this help message and exit")
private boolean help;
@Option(name="-version", usage="print product version and exit")
private boolean version;
public static void main(String[] args) {
new ADE_XJC().doMain(args);
}
private void doMain(String[] args) {
CmdLineParser parser = new CmdLineParser(this);
parser.setUsageWidth(80);
try {
parser.parseArgument(args);
} catch (CmdLineException e) {
System.err.println(e.getMessage());
printUsage(parser, System.err);
System.exit(1);
}
if (help) {
printUsage(parser, System.out);
System.exit(0);
}
if (version) {
System.out.println("ade-xjc version \"0.1.0\"");
System.out.println("built for citygml4j version \"0.1.0\"");
System.exit(0);
}
if (adeSchemaFile == null) {
System.out.println("Option \"-schema\" is required");
printUsage(parser, System.out);
System.exit(1);
}
LOG.info("Starting ade-xjc compiler");
int status = 0;
try {
LOG.info("Setting up build environment");
if (clean)
Util.rmdir(outputFolder);
createBuildEnvironment();
LOG.info("Checking build environment");
checkBuildEnvironment();
if (packageName.startsWith("org.citygml4j")) {
LOG.error("The package " + packageName + " is not allowed for the ADE classes");
LOG.error("Choose a package which is not a subpackage of org.citygml4j. Exiting.");
System.exit(1);
}
LOG.info("Using ADE schema " + adeSchemaFile.getAbsolutePath());
if (adeBindingFile != null)
LOG.info("Using JAXB binding " + adeBindingFile.getAbsolutePath());
LOG.info("Generating JAXB classes. This may take some time...");
SchemaCompiler sc = XJC.createSchemaCompiler();
sc.setDefaultPackageName(packageName);
XJCErrorListener listener = new XJCErrorListener();
sc.setErrorListener(listener);
InputSource schema = new InputSource(baseProfileFile.getAbsolutePath());
schema.setSystemId(baseProfileFile.toURI().toString());
sc.parseSchema(schema);
InputSource binding = new InputSource(bindingFile.getAbsolutePath());
binding.setSystemId(bindingFile.toURI().toString());
sc.parseSchema(binding);
InputSource adeSchema = new InputSource(adeSchemaFile.getAbsolutePath());
adeSchema.setSystemId(adeSchemaFile.toURI().toString());
sc.parseSchema(adeSchema);
if (adeBindingFile != null) {
InputSource adeBinding = new InputSource(adeBindingFile.getAbsolutePath());
adeBinding.setSystemId(adeBindingFile.toURI().toString());
sc.parseSchema(adeBinding);
}
S2JJAXBModel model = sc.bind();
JCodeModel code = model.generateCode(null, listener);
code.build(outputFolder, (PrintStream)null);
File packageDir = new File(outputFolder.getAbsolutePath());
LOG.info("JAXB classes successfully written to " + packageDir.getAbsolutePath());
} catch (Exception e) {
if (e.getMessage() != null)
LOG.error(e.getMessage());
LOG.error("Unable to recover from previous error(s). Aborting.");
status = 1;
} finally {
cleanBuildEnvironment();
}
System.exit(status);
}
private void createBuildEnvironment() throws Exception {
boolean success = true;
if (success && !outputFolder.exists()) {
success = outputFolder.mkdirs();
if (!success)
throw new Exception("Could not create directory " + outputFolder.getAbsolutePath());
} else if (!outputFolder.isDirectory()) {
success = outputFolder.delete();
if (success)
success = outputFolder.mkdirs();
else
throw new Exception("Could not create directory " + outputFolder.getAbsolutePath());
}
}
private void checkBuildEnvironment() throws Exception, FileNotFoundException, NoSuchAlgorithmException {
if (!schema_dir.exists())
throw new FileNotFoundException("Could not open folder " + schema_dir.getAbsolutePath());
if (!nonStrict) {
LOG.info("Running in strict mode. Checking sanity of subfolder \"schema\"");
BigInteger md5 = new BigInteger("0");
File[] children = schema_dir.listFiles();
for (File file : children)
if (file.isDirectory())
md5 = Util.dir2md5(file, md5);
else
md5 = Util.file2md5(file.getAbsolutePath(), md5);
if (!md5.toString(16).equals("b51bc6a36f36e2bac8c8674f1cb69042"))
throw new Exception("Contents of subfolder \"schema\" have been altered. Please restore its original state.");
}
if (!adeSchemaFile.exists() || !adeSchemaFile.isFile() || !adeSchemaFile.canRead())
throw new Exception("Could not open ADE schema file " + adeSchemaFile.getAbsolutePath());
if (adeBindingFile != null && (!adeBindingFile.exists() || !adeBindingFile.isFile() || !adeBindingFile.canRead()))
throw new Exception("Could not open ADE binding file " + adeBindingFile.getAbsolutePath());
}
private void cleanBuildEnvironment() {
Util.rmdir(new File(outputFolder.getAbsolutePath() + "/org/citygml4j"));
if (!packageName.startsWith("org"))
Util.rmdir(new File(outputFolder.getAbsolutePath() + "/org"));
}
private void printUsage(CmdLineParser parser, PrintStream out) {
out.println("Usage: java -jar ade-xjc.jar [-options]");
out.println();
out.println("where options include:");
parser.printUsage(System.out);
out.println();
}
}
package org.citygml4j.ade_xjc;
import java.text.DecimalFormat;
import java.util.Calendar;
public class Logger {
private static Logger INSTANCE = new Logger();
private LogLevelType logLevel = LogLevelType.INFO;
private Calendar cal;
private DecimalFormat df = new DecimalFormat("00");
private Logger() {
// just to thwart instantiation
}
public static Logger getInstance() {
return INSTANCE;
}
public void setLogLevel(LogLevelType logLevel) {
this.logLevel = logLevel;
}
public String getPrefix(LogLevelType type) {
cal = Calendar.getInstance();
int h = cal.get(Calendar.HOUR_OF_DAY);
int m = cal.get(Calendar.MINUTE);
int s = cal.get(Calendar.SECOND);
StringBuffer prefix = new StringBuffer();
prefix.append("[");
prefix.append(df.format(h));
prefix.append(":");
prefix.append(df.format(m));
prefix.append(":");
prefix.append(df.format(s));
prefix.append(" ");
prefix.append(type.value);
prefix.append("] ");
return prefix.toString();
}
private void log(LogLevelType type, String msg) {
System.out.println(getPrefix(type) + msg);
}
public void debug(String msg) {
if (logLevel.ordinal() <= LogLevelType.DEBUBG.ordinal())
log(LogLevelType.DEBUBG, msg);
}
public void info(String msg) {
if (logLevel.ordinal() <= LogLevelType.INFO.ordinal())
log(LogLevelType.INFO, msg);
}
public void warn(String msg) {
if (logLevel.ordinal() <= LogLevelType.WARN.ordinal())
log(LogLevelType.WARN, msg);
}
public void error(String msg) {
if (logLevel.ordinal() <= LogLevelType.ERROR.ordinal())
log(LogLevelType.ERROR, msg);
}
public enum LogLevelType {
DEBUBG("DEBUG"),
INFO("INFO"),
WARN("WARN"),
ERROR("ERROR");
private final String value;
LogLevelType(String v) {
value = v;
}
public String value() {
return value;
}
};
}
package org.citygml4j.ade_xjc;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.math.BigInteger;
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
public class Util {
public static BigInteger dir2md5(File file, BigInteger md5) throws NoSuchAlgorithmException, FileNotFoundException {
md5 = string2md5(file.getName(), md5);
if (file.isDirectory()) {
File[] children = file.listFiles();
for (File next : children)
md5 = dir2md5(next, md5);
} else
md5 = file2md5(file.getAbsolutePath(), md5);
return md5;
}
public static BigInteger file2md5(String fileName, BigInteger md5) throws NoSuchAlgorithmException, FileNotFoundException {
MessageDigest digest = MessageDigest.getInstance("MD5");
InputStream is = new FileInputStream(new File(fileName));
byte[] buffer = new byte[8192];
int read = 0;
try {
while( (read = is.read(buffer)) > 0)
digest.update(buffer, 0, read);
byte[] md5sum = digest.digest();
return md5.xor(new BigInteger(1, md5sum));
} catch(IOException e) {
throw new RuntimeException("Unable to process file for MD5", e);
} finally {
try {
is.close();
}
catch(IOException e) {
throw new RuntimeException("Unable to close input stream for MD5 calculation", e);
}
}
}
private static BigInteger string2md5(String input, BigInteger md5) throws NoSuchAlgorithmException {
MessageDigest digest = MessageDigest.getInstance("MD5");
byte[] md5sum = digest.digest(input.getBytes());
return md5.xor(new BigInteger(1, md5sum));
}
public static void rmdir(File folder) {
if (!folder.exists())
return;
File[] children = folder.listFiles();
for (File file : children) {
if (file.isDirectory())
rmdir(file);
file.delete();
}
folder.delete();
}
}
package org.citygml4j.ade_xjc;
import org.xml.sax.SAXParseException;
import com.sun.tools.xjc.api.ErrorListener;
public class XJCErrorListener implements ErrorListener {
@Override
public void error(SAXParseException ex) {
ex.printStackTrace();
}
@Override
public void fatalError(SAXParseException ex) {
ex.printStackTrace();
}
@Override
public void info(SAXParseException ex) {
ex.printStackTrace();
}
@Override
public void warning(SAXParseException ex) {
ex.printStackTrace();
}
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment