<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2005 sp2 U (http://www.altova.com) by Arnold Rots (Smithsonian Observatory) -->
<!-- edited with XMLSPY v2004 rel. 4 U (http://www.xmlspy.com) by Arnold Rots (Smithsonian Observatory) -->
<!-- edited with XML Spy v4.4 U (http://www.xmlspy.com) by Arnold Rots (Smithsonian Astrophysical Observatory) -->
<!-- $Id: stc.xsd,v 2.6 2005/02/25 19:30:24 arots Exp arots $ -->
<!-- Schema definition for the SpaceTimeCoords -->
<!--Change Log:
$Log: stc.xsd,v $
Revision 2.6  2005/02/25 19:30:24  arots
IVOA version 1.20:
Distinguished LSRK and LSRD, LOCAL_GROUP_CENTER replaces SUPER_GALACTIC_CENTER
Subtle changes to force validation by Xerces-J2: slight obfuscation
Added TEB time scale, warning on use of ISOTime (> 0001-01-01 !)
Added reference spheroid to GEO_D, changed GEO to GEO_C
Added discussion of planetographic vs planetocentric systems,
right- and left-handed systems
Removed GEOGRAPHIC CoordFlavor (is really 3-D spherical); added POLAR

Revision 2.5  2005/01/05 14:22:11  arots
Release Version 1.10
Added Pixel Space; overhaul of inheritance and polymorphism

Revision 2.4  2004/07/23 21:17:50  arots
Modified ivoa schema locations; changed URN from nvo- to vo-

Revision 2.3  2004/07/16 22:37:53  arots
Release version v1.0.

Revision 2.2  2004/07/07 16:16:22  arots
Completed conversion to substitution groups.
This version is ready for review.

revision 2.1
date: 2004/05/23 03:32:59;  author: arots;  state: Exp;  lines: +798 -1
Fixed line breaks

revision 2.0
date: 2004/05/21 21:09:17;  author: arots;  state: Exp;  lines: +1 -679
Reworking with substitution groups and generalized CoordSys & Coords.

revision 1.10
date: 2004/03/31 21:20:30;  author: arots;  state: Exp;  lines: +362 -218
Proper units and improvements.

Revision 1.9  2003/08/06 19:31:04  arots
Added time reference direction to time frame.

Revision 1.8  2003/05/15 10:04:23  arots
Allow multiple intervals, add fill factor.

Revision 1.7  2003/05/08 20:28:19  arots
Added spectral coordinate.
Fixed intervals.
Rationalized coordinate frames.

Revision 1.6  2003/05/02 18:46:43  arots
Removed coord_sys_id attribute from time interval.

Revision 1.5  2003/04/30 16:55:58  arots
Added CoordSpec to Resource and Search - was needed.

Revision 1.4  2003/04/30 13:27:12  arots
Fixed up change log, changed schema locations.

Revision 1.3  2003/04/29 21:04:37  arots
Trivial.

Revision 1.2  2003/04/29 20:56:40  arots
Completed new astronTimeType and proper handling of units.

Revision 1.1  2003/04/28 16:25:34  arots
Initial revision
-->
<xs:schema xmlns:stc="http://www.ivoa.net/xml/STC/stc-v1.20.xsd" xmlns:crd="http://www.ivoa.net/xml/STC/STCcoords/v1.20" xmlns:reg="http://www.ivoa.net/xml/STC/STCregion/v1.20" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.ivoa.net/xml/STC/stc-v1.20.xsd" elementFormDefault="qualified">
	<xs:import namespace="http://www.ivoa.net/xml/STC/STCcoords/v1.20"
		schemaLocation="http://docs.g-vo.org/schemata/coords-v1.20.xsd"/>
	<xs:import namespace="http://www.ivoa.net/xml/STC/STCregion/v1.20" schemaLocation="http://vo.ari.uni-heidelberg.de/docs/schemata/region-v1.20.xsd"/>
	<!-- CoordSystem -->
	<!-- Reference frames -->
	<xs:complexType name="coordFrameType">
		<xs:annotation>
			<xs:documentation>A CoordFrame has to have at least a name</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="Name" type="xs:string" minOccurs="0"/>
		</xs:sequence>
	</xs:complexType>
	<xs:element name="CoordFrame" type="stc:coordFrameType" abstract="true">
		<xs:annotation>
			<xs:documentation>CoordFrame substitution group head element</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:simpleType name="coordEquinoxType">
		<xs:annotation>
			<xs:documentation>Coordinate equinox: B{year} or J{year} with at least one decimal; do not use in conjunction with ICRS</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:pattern value="[BJ]\-?\d?\d?\d?\d\d\d\d\.\d\d?\d?"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="spaceRefFrameType" abstract="true">
		<xs:annotation>
			<xs:documentation>Abstract space reference frame type</xs:documentation>
		</xs:annotation>
	</xs:complexType>
	<xs:complexType name="icrsType">
		<xs:annotation>
			<xs:documentation>ICRS type: no equinox</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="stc:spaceRefFrameType"/>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="fkType">
		<xs:annotation>
			<xs:documentation>FK[45] type: needs an equinox</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="stc:spaceRefFrameType">
				<xs:sequence>
					<xs:element name="Equinox" type="stc:coordEquinoxType" nillable="true"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="customSpaceRefFrameType">
		<xs:annotation>
			<xs:documentation>A custom space reference frame type defined through pole and X-axis directions</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="stc:spaceRefFrameType">
				<xs:sequence>
					<xs:annotation>
						<xs:documentation>Define coordinate reference frame from scratch; pole and X-axis need to be defined in a known coordinate system</xs:documentation>
					</xs:annotation>
					<xs:element name="Frame" type="xs:string"/>
					<xs:element name="Pole_Zaxis" type="crd:astroCoordsType"/>
					<xs:element name="Xaxis" type="crd:astroCoordsType"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:element name="SpaceRefFrame" type="stc:spaceRefFrameType" abstract="true">
		<xs:annotation>
			<xs:documentation>Head element for the Coordinate reference frame substitution group: optional equinox with either a standard reference system (ICRS, FK5, FK4) and optional standard pole (equatorial, ecliptic, galactic, etc.), or a custom frame with pole (positive Z-axis) and positive X-axis direction </xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="ICRS" type="stc:icrsType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>The ICRS reference frame</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="FK4" type="stc:fkType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>FK4; needs a Besselian epoch</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="FK5" type="stc:fkType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>FK5; needs a Julian epoch</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="ECLIPTIC" type="stc:fkType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>Ecliptic coordinates; needs an epoch</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="GALACTIC_I" type="stc:icrsType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>Galactic coordinates; first system</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="GALACTIC_II" type="stc:icrsType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>Galactic coordinates; second system</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="SUPER_GALACTIC" type="stc:icrsType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>SuperGalactic coordinates</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="AZ_EL" type="stc:icrsType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>Local Azimuth and Elevation coordinates</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="BODY" type="stc:icrsType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>Generic Body coordinates</xs:documentation>
		</xs:annotation>
	</xs:element>
	<!--Solar and earth-related coordinate frames; see Fraenz & Harper 2002, Plan & Sp Sci 50, 217-->
	<xs:element name="GEO_C" type="stc:icrsType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>The Geocentric (co-rotating) reference frame</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="GEO_D" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>The Geodetic reference frame; semi-major axis and inverse flattening may be provided to define the reference spheroid; the default is the IAU 1976 reference spheroid</xs:documentation>
		</xs:annotation>
		<xs:complexType>
			<xs:complexContent>
				<xs:extension base="stc:icrsType">
					<xs:attribute name="radius" type="xs:double" use="optional" default="6378140"/>
					<xs:attribute name="inv_flattening" type="xs:double" use="optional" default="298.257"/>
					<xs:attribute name="unit" type="crd:posUnitType" use="optional" default="m"/>
				</xs:extension>
			</xs:complexContent>
		</xs:complexType>
	</xs:element>
	<xs:element name="MAG" type="stc:icrsType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>The Geomagnetic reference frame</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="GSE" type="stc:icrsType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>The Geocentric Solar Ecliptic reference frame</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="GSM" type="stc:icrsType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>The Geocentric Solar Magnetic reference frame</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="SM" type="stc:icrsType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>The Solar Magnetic reference frame</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="HGC" type="stc:icrsType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>The Heliographic reference frame</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="HEE" type="stc:icrsType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>The Heliocentric Earth Ecliptic reference frame</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="HEEQ" type="stc:icrsType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>The Heliocentric Earth Equatorial reference frame</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="HCI" type="stc:icrsType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>The Heliocentric Inertial reference frame</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="HCD" type="stc:icrsType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>The Heliocentric of Date reference frame</xs:documentation>
		</xs:annotation>
	</xs:element>
	<!--Planetocentric (co-rotating) system coordinate frames; see Explanatory Supplement, Sec 7.4 or Fraenz & Harper 2002, Plan & Sp Sci 50, 217, Table 6-->
	<xs:element name="MERCURY_C" type="stc:icrsType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>The planetocentric reference frame anchored on Mercury</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="VENUS_C" type="stc:icrsType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>The planetocentric reference frame anchored on Venus</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="LUNA_C" type="stc:icrsType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>The lunacentric reference frame anchored on the moon</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="MARS_C" type="stc:icrsType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>The planetocentric reference frame anchored on Mars</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="JUPITER_C_III" type="stc:icrsType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>The planetocentric reference frame anchored on Jupiter</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="SATURN_C_III" type="stc:icrsType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>The planetocentric reference frame anchored on Saturn</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="URANUS_C_III" type="stc:icrsType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>The planetocentric reference frame anchored on Uranus</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="NEPTUNE_C_III" type="stc:icrsType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>The planetocentric reference frame anchored on Neptune</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="PLUTO_C" type="stc:icrsType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>The planetocentric reference frame anchored on Pluto</xs:documentation>
		</xs:annotation>
	</xs:element>
	<!--Planetographic (co-rotating) system coordinate frames; see Explanatory Supplement, Sec 7.4 or Fraenz & Harper 2002, Plan & Sp Sci 50, 217, Table 6-->
	<xs:element name="MERCURY_G" type="stc:icrsType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>The planetographic reference frame anchored on Mercury</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="VENUS_G" type="stc:icrsType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>The planetographic reference frame anchored on Venus</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="LUNA_G" type="stc:icrsType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>The lunagraphic reference frame anchored on the moon</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="MARS_G" type="stc:icrsType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>The planetographic reference frame anchored on Mars</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="JUPITER_G_III" type="stc:icrsType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>The planetographic reference frame anchored on Jupiter</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="SATURN_G_III" type="stc:icrsType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>The planetographic reference frame anchored on Saturn</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="URANUS_G_III" type="stc:icrsType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>The planetographic reference frame anchored on Uranus</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="NEPTUNE_G_III" type="stc:icrsType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>The planetographic reference frame anchored on Neptune</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="PLUTO_G" type="stc:icrsType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>The planetographic reference frame anchored on Pluto</xs:documentation>
		</xs:annotation>
	</xs:element>
	<!--Unknown space reference frame; the client is responsible for assigning a default-->
	<xs:element name="UNKNOWNFrame" type="stc:icrsType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>Unknown space reference frame; the client is responsible for assigning a default</xs:documentation>
		</xs:annotation>
	</xs:element>
	<!--The Custom frame-->
	<xs:element name="CustomSpaceRefFrame" type="stc:customSpaceRefFrameType" substitutionGroup="stc:SpaceRefFrame">
		<xs:annotation>
			<xs:documentation>Coordinate reference frame: a custom pole (positive Z-axis) and positive X-axis direction </xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:simpleType name="planetaryEphemType">
		<xs:annotation>
			<xs:documentation>If solar system positions are implied anywhere, the planetary ephemeris to be used needs to be provided - usually JPL-DE405 with ICRS and JPL-DE200 with FK5</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:enumeration value="JPL-DE200"/>
			<xs:enumeration value="JPL-DE405"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="referencePositionType" abstract="true">
		<xs:annotation>
			<xs:documentation>Abstract type for reference positions</xs:documentation>
		</xs:annotation>
	</xs:complexType>
	<xs:complexType name="stdRefPosType">
		<xs:annotation>
			<xs:documentation>Type for standard reference positions</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="stc:referencePositionType">
				<xs:sequence>
					<xs:element name="PlanetaryEphem" type="stc:planetaryEphemType" nillable="true" minOccurs="0"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="customRefPosType">
		<xs:annotation>
			<xs:documentation>Type for custom positions: specifies reference origin</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="stc:referencePositionType">
				<xs:sequence>
					<xs:element name="CoordOrigin" type="crd:astroCoordsType"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:element name="ReferencePosition" type="stc:referencePositionType" abstract="true">
		<xs:annotation>
			<xs:documentation>Head element from the ReferencePosition substitution group: either a "known place" such as geocenter or barycenter (RefPos), or a position defined in a known coordinate system (CoordOrigin)</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="TOPOCENTER" type="stc:stdRefPosType" substitutionGroup="stc:ReferencePosition">
		<xs:annotation>
			<xs:documentation>Location of the observer/telescope</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="BARYCENTER" type="stc:stdRefPosType" substitutionGroup="stc:ReferencePosition">
		<xs:annotation>
			<xs:documentation>Barycenter of the solar system</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="HELIOCENTER" type="stc:stdRefPosType" substitutionGroup="stc:ReferencePosition">
		<xs:annotation>
			<xs:documentation>Center of the sun</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="GEOCENTER" type="stc:stdRefPosType" substitutionGroup="stc:ReferencePosition">
		<xs:annotation>
			<xs:documentation>Center of the earth</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="LSR" type="stc:stdRefPosType" substitutionGroup="stc:ReferencePosition">
		<xs:annotation>
			<xs:documentation>(Kinematic) Local Standard of Rest (only used for Doppler velocities); equivalent to LSRK</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="LSRK" type="stc:stdRefPosType" substitutionGroup="stc:ReferencePosition">
		<xs:annotation>
			<xs:documentation>Kinematic Local Standard of Rest (only used for Doppler velocities); equivalent to LSR</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="LSRD" type="stc:stdRefPosType" substitutionGroup="stc:ReferencePosition">
		<xs:annotation>
			<xs:documentation>Dynamic Local Standard of Rest (only used for Doppler velocities)</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="GALACTIC_CENTER" type="stc:stdRefPosType" substitutionGroup="stc:ReferencePosition">
		<xs:annotation>
			<xs:documentation>Center of the Galaxy</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="LOCAL_GROUP_CENTER" type="stc:stdRefPosType" substitutionGroup="stc:ReferencePosition">
		<xs:annotation>
			<xs:documentation>Center of the Local Group</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="MOON" type="stc:stdRefPosType" substitutionGroup="stc:ReferencePosition">
		<xs:annotation>
			<xs:documentation>Center of the Moon</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="EMBARYCENTER" type="stc:stdRefPosType" substitutionGroup="stc:ReferencePosition">
		<xs:annotation>
			<xs:documentation>Barycenter of the Earth-Moon system</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="MERCURY" type="stc:stdRefPosType" substitutionGroup="stc:ReferencePosition">
		<xs:annotation>
			<xs:documentation>Center of Mercury</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="VENUS" type="stc:stdRefPosType" substitutionGroup="stc:ReferencePosition">
		<xs:annotation>
			<xs:documentation>Center of Venus</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="MARS" type="stc:stdRefPosType" substitutionGroup="stc:ReferencePosition">
		<xs:annotation>
			<xs:documentation>Center of Mars</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="JUPITER" type="stc:stdRefPosType" substitutionGroup="stc:ReferencePosition">
		<xs:annotation>
			<xs:documentation>Center of Jupiter</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="SATURN" type="stc:stdRefPosType" substitutionGroup="stc:ReferencePosition">
		<xs:annotation>
			<xs:documentation>Center of Saturn</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="URANUS" type="stc:stdRefPosType" substitutionGroup="stc:ReferencePosition">
		<xs:annotation>
			<xs:documentation>Center of Uranus</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="NEPTUNE" type="stc:stdRefPosType" substitutionGroup="stc:ReferencePosition">
		<xs:annotation>
			<xs:documentation>Center of Neptune</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="PLUTO" type="stc:stdRefPosType" substitutionGroup="stc:ReferencePosition">
		<xs:annotation>
			<xs:documentation>Center of Pluto</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="RELOCATABLE" type="stc:stdRefPosType" substitutionGroup="stc:ReferencePosition">
		<xs:annotation>
			<xs:documentation>A relocatable origin, especially useful for simulations</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="UNKNOWNRefPos" type="stc:stdRefPosType" substitutionGroup="stc:ReferencePosition">
		<xs:annotation>
			<xs:documentation>Unknown origin; the client is responsible for assigning a default</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="CustomRefPos" type="stc:customRefPosType" substitutionGroup="stc:ReferencePosition">
		<xs:annotation>
			<xs:documentation>Origin of the coordinate system, given as a position in another, known, coordinate system</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:complexType name="coordFlavorType">
		<xs:annotation>
			<xs:documentation>Provides the coordinate definitions: number of axes, SPHERICAL, CARTESIAN, or UNITSPHERE, presence of velocities</xs:documentation>
		</xs:annotation>
		<xs:attribute name="coord_naxes" default="2">
			<xs:simpleType>
				<xs:restriction base="xs:integer">
					<xs:minInclusive value="1"/>
					<xs:maxInclusive value="3"/>
				</xs:restriction>
			</xs:simpleType>
		</xs:attribute>
		<xs:attribute name="coord_vel" type="xs:boolean" default="false"/>
	</xs:complexType>
	<xs:element name="CoordFlavor" type="stc:coordFlavorType" abstract="true">
		<xs:annotation>
			<xs:documentation>Abstract head element for the CoordFlavor substitution group</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="SPHERICAL" type="stc:coordFlavorType" substitutionGroup="stc:CoordFlavor">
		<xs:annotation>
			<xs:documentation>Spherical 2-D (longitude, latitude) or 3-D (long, lat, radius/elevation) coordinates</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="CARTESIAN" type="stc:coordFlavorType" substitutionGroup="stc:CoordFlavor">
		<xs:annotation>
			<xs:documentation>Cartesian 1-, 2-, or 3-D coordinates</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="UNITSPHERE" type="stc:coordFlavorType" substitutionGroup="stc:CoordFlavor">
		<xs:annotation>
			<xs:documentation>3-D Unit sphere coordinates (direction cosines); in (long,lat), X is in the direction (0,0), Y (pi/2,0), Z (0,pi/2)</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="POLAR" type="stc:coordFlavorType" substitutionGroup="stc:CoordFlavor">
		<xs:annotation>
			<xs:documentation>2-D polar coordinates (radius, posangle)</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:complexType name="spaceFrameType">
		<xs:annotation>
			<xs:documentation>A spatial coordinate frame consists of a coordinate frame and a reference position</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="stc:coordFrameType">
				<xs:sequence>
					<xs:element ref="stc:SpaceRefFrame">
						<xs:annotation>
							<xs:documentation>Coordinate reference frame: optional equinox with either a standard reference system (ICRS, FK5, FK4) and optional standard pole (equatorial, ecliptic, galactic, etc.), or pole (positive Z-axis) and positive X-axis direction </xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element ref="stc:ReferencePosition">
						<xs:annotation>
							<xs:documentation>Origin of the coordinate reference frame: either a "known place" such as geocenter or barycenter, or a position defined in a known coordinate system</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="OffsetCenter" minOccurs="0">
						<xs:complexType>
							<xs:sequence>
								<xs:element ref="crd:CoordValue"/>
							</xs:sequence>
						</xs:complexType>
					</xs:element>
					<xs:element ref="stc:CoordFlavor">
						<xs:annotation>
							<xs:documentation>Provides the coordinate definitions: number of axes, SPHERICAL or CARTESIAN, presence of velocities, and the Doppler definitions (if needed)</xs:documentation>
						</xs:annotation>
					</xs:element>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="timeFrameType">
		<xs:annotation>
			<xs:documentation>The time reference frame consists of a timescale, a reference position, and optionally a reference direction (needed when transformations have been applied)</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="stc:coordFrameType">
				<xs:sequence>
					<xs:element name="TimeScale" type="crd:timeScaleType" default="TT">
						<xs:annotation>
							<xs:documentation>The time reference frame consists of a time scale, a time format, and a reference time, if needed</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element ref="stc:ReferencePosition">
						<xs:annotation>
							<xs:documentation>Origin of the coordinate reference frame: either a "known place" such as geocenter or barycenter, or a position defined in a known coordinate system</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="TimeRefDirection" type="crd:astroCoordsType" minOccurs="0">
						<xs:annotation>
							<xs:documentation>Some time transformations (e.g., change of RefPos) depend on an assumed directonal position of the source</xs:documentation>
						</xs:annotation>
					</xs:element>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="spectralFrameType">
		<xs:annotation>
			<xs:documentation>Contains the spectral frame reference position</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="stc:coordFrameType">
				<xs:sequence>
					<xs:element ref="stc:ReferencePosition">
						<xs:annotation>
							<xs:documentation>The reference frame for the Doppler velocities; note presence of LSR</xs:documentation>
						</xs:annotation>
					</xs:element>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:simpleType name="dopplerDefinitionType">
		<xs:annotation>
			<xs:documentation>The Doppler definition used: optical, radio, or pseudo-relativistic (i.e., how is a redshift converted to a velocity); the most common is optical, except when the reference is LSR (usually radio)</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string">
			<xs:enumeration value="OPTICAL"/>
			<xs:enumeration value="RADIO"/>
			<xs:enumeration value="RELATIVISTIC"/>
		</xs:restriction>
	</xs:simpleType>
	<xs:complexType name="redshiftFrameType">
		<xs:annotation>
			<xs:documentation>Contains the Doppler definitions, including whether the values are velocity or redshift (value_type)</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="stc:coordFrameType">
				<xs:sequence>
					<xs:element name="DopplerDefinition" type="stc:dopplerDefinitionType" nillable="true">
						<xs:annotation>
							<xs:documentation>The Doppler definition used: optical, radio, or pseudo-relativistic (i.e., how is a redshift converted to a velocity); the most common is optical, except when the reference is LSR (usually radio)</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element ref="stc:ReferencePosition">
						<xs:annotation>
							<xs:documentation>The reference frame for the Doppler velocities; note presence of LSR</xs:documentation>
						</xs:annotation>
					</xs:element>
				</xs:sequence>
				<xs:attribute name="value_type" use="optional" default="VELOCITY">
					<xs:simpleType>
						<xs:restriction base="xs:string">
							<xs:enumeration value="VELOCITY"/>
							<xs:enumeration value="REDSHIFT"/>
						</xs:restriction>
					</xs:simpleType>
				</xs:attribute>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<!--CoordSys definition-->
	<xs:complexType name="coordSysType">
		<xs:annotation>
			<xs:documentation>A CoordSys consists of at least one coordinate frames</xs:documentation>
		</xs:annotation>
		<xs:sequence maxOccurs="unbounded">
			<xs:element ref="stc:TimeFrame" minOccurs="0"/>
			<xs:element ref="stc:SpaceFrame" minOccurs="0"/>
			<xs:element ref="stc:SpectralFrame" minOccurs="0"/>
			<xs:element ref="stc:RedshiftFrame" minOccurs="0"/>
			<xs:sequence minOccurs="0" maxOccurs="unbounded">
				<xs:element ref="stc:CoordFrame"/>
			</xs:sequence>
		</xs:sequence>
		<xs:attribute name="ID" type="xs:ID" use="required"/>
	</xs:complexType>
	<xs:element name="CoordSys" type="stc:coordSysType">
		<xs:annotation>
			<xs:documentation>Head element (not abstract) of the CoordSys group</xs:documentation>
		</xs:annotation>
	</xs:element>
	<!-- AstroCoordSystem -->
	<xs:element name="TimeFrame" type="stc:timeFrameType">
		<xs:annotation>
			<xs:documentation>The time coordinate reference frame</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="SpaceFrame" type="stc:spaceFrameType">
		<xs:annotation>
			<xs:documentation>The spatial coordinate reference frame</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="SpectralFrame" type="stc:spectralFrameType">
		<xs:annotation>
			<xs:documentation>The reference frame for the spectral coordinate; note presence of LSR</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="RedshiftFrame" type="stc:redshiftFrameType">
		<xs:annotation>
			<xs:documentation>Contains the Doppler definitions, including whether the values are velocity or redshift (value_type)</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="PixelCoordFrame" type="stc:coordFrameType" substitutionGroup="stc:CoordFrame">
		<xs:annotation>
			<xs:documentation>Element for pixel Coordinate Frames</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="GenericCoordFrame" type="stc:coordFrameType" substitutionGroup="stc:CoordFrame">
		<xs:annotation>
			<xs:documentation>Element for generic Coordinate Frames</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:complexType name="astroCoordSystemType">
		<xs:annotation>
			<xs:documentation>The astroniomical coordinate system definition: spatial coordinate frame and reference position; time frame and reference position; the coordinate flavor; spectral frame and (optionally) Doppler frame; and the planetary ephemeris; an ID is required, since this is how coordinate elements are associated with their coordinate systems</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:restriction base="stc:coordSysType">
				<xs:sequence>
					<xs:element ref="stc:TimeFrame"/>
					<xs:element ref="stc:SpaceFrame"/>
					<xs:element ref="stc:SpectralFrame" minOccurs="0"/>
					<xs:element ref="stc:RedshiftFrame" minOccurs="0"/>
					<xs:sequence minOccurs="0" maxOccurs="unbounded">
						<xs:element ref="stc:GenericCoordFrame"/>
					</xs:sequence>
				</xs:sequence>
				<xs:attribute name="ID" type="xs:ID" use="required"/>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<xs:element name="AstroCoordSystem" type="stc:astroCoordSystemType" substitutionGroup="stc:CoordSys">
		<xs:annotation>
			<xs:documentation>The coordinate system definition: spatial coordinate frame and reference position; time frame and reference position; the coordinate flavor; and the planetary ephemeris; an ID is required, since this is how coordinate elements are associated with their coordinate systems</xs:documentation>
		</xs:annotation>
	</xs:element>
	<!--Pixel coordinate system-->
	<xs:complexType name="pixelCoordSystemType">
		<xs:annotation>
			<xs:documentation>The pixel coordinate system definition</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:restriction base="stc:coordSysType">
				<xs:sequence>
					<xs:sequence maxOccurs="unbounded">
						<xs:element ref="stc:PixelCoordFrame"/>
					</xs:sequence>
				</xs:sequence>
				<xs:attribute name="ID" type="xs:ID" use="required"/>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<xs:element name="PixelCoordSystem" type="stc:pixelCoordSystemType" substitutionGroup="stc:CoordSys">
		<xs:annotation>
			<xs:documentation>Pixel form of CoordSys</xs:documentation>
		</xs:annotation>
	</xs:element>
	<!--Types for CoordArea-->
	<xs:complexType name="coordIntervalType" abstract="true">
		<xs:annotation>
			<xs:documentation>Abstract coordinate interval type</xs:documentation>
		</xs:annotation>
		<xs:attribute name="lo_include" type="xs:boolean" default="true">
			<xs:annotation>
				<xs:documentation>Limit to be included?</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="hi_include" type="xs:boolean" default="true">
			<xs:annotation>
				<xs:documentation>Limit to be included?</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="fill_factor" type="xs:float" use="optional" default="1.0">
			<xs:annotation>
				<xs:documentation>Fraction of interval that is occupied by data</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="timeIntervalType">
		<xs:annotation>
			<xs:documentation>The time interval needs to contain a start time or a stop time or both; it needs to refer to a coordinate system; boundaries may or may not be inclusive</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="stc:coordIntervalType">
				<xs:sequence>
					<xs:element name="StartTime" type="crd:astronTimeType" minOccurs="0">
						<xs:annotation>
							<xs:documentation>astronTime may be expressed in ISO8601 or as a double relative to a reference time</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="StopTime" type="crd:astronTimeType" minOccurs="0">
						<xs:annotation>
							<xs:documentation>astronTime may be expressed in ISO8601 or as a double relative to a reference time</xs:documentation>
						</xs:annotation>
					</xs:element>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="coordScalarIntervalType">
		<xs:annotation>
			<xs:documentation>Scalar coordinate interval type</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="stc:coordIntervalType">
				<xs:sequence>
					<xs:element name="LoLimit" type="xs:double" minOccurs="0">
						<xs:annotation>
							<xs:documentation>Lower bound of interval</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="HiLimit" type="xs:double" minOccurs="0">
						<xs:annotation>
							<xs:documentation>Upper bound of interval</xs:documentation>
						</xs:annotation>
					</xs:element>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="coord2VecIntervalType">
		<xs:annotation>
			<xs:documentation>2-D coordinate interval type</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="stc:coordIntervalType">
				<xs:sequence>
					<xs:element name="LoLimit2Vec" type="crd:double2Type" minOccurs="0"/>
					<xs:element name="HiLimit2Vec" type="crd:double2Type" minOccurs="0"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="coord3VecIntervalType">
		<xs:annotation>
			<xs:documentation>3-D coordinate interval type</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="stc:coordIntervalType">
				<xs:sequence>
					<xs:element name="LoLimit3Vec" type="crd:double3Type" minOccurs="0"/>
					<xs:element name="HiLimit3Vec" type="crd:double3Type" minOccurs="0"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:element name="CoordInterval" type="stc:coordIntervalType" abstract="true">
		<xs:annotation>
			<xs:documentation>The spatial coordinate interval substitution group head element; such an element needs to contain a minimum or maximum scalar or vector value, or both; it needs to refer to a coordinate system; boundaries may or may not be inclusive; and it can have a fill factor</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="CoordScalarInterval" type="stc:coordScalarIntervalType" substitutionGroup="stc:CoordInterval">
		<xs:annotation>
			<xs:documentation>An interval in a scalar coordinate</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="Coord2VecInterval" type="stc:coord2VecIntervalType" substitutionGroup="stc:CoordInterval">
		<xs:annotation>
			<xs:documentation>An interval ("box") in a 2-D coordinate pair</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="Coord3VecInterval" type="stc:coord3VecIntervalType" substitutionGroup="stc:CoordInterval">
		<xs:annotation>
			<xs:documentation>An interval ("cube") in a 3-D coordinate triplet</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:complexType name="spatialIntervalType" abstract="true">
		<xs:annotation>
			<xs:documentation>Parent type for spatial intervals</xs:documentation>
		</xs:annotation>
	</xs:complexType>
	<xs:complexType name="sphereType">
		<xs:annotation>
			<xs:documentation>Defines a sphere</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="stc:spatialIntervalType">
				<xs:sequence>
					<xs:element name="Radius" type="xs:double"/>
					<xs:element name="Center" type="crd:double3Type"/>
				</xs:sequence>
				<xs:attribute name="unit" type="crd:posUnitType" use="required"/>
				<xs:attribute name="radius_unit" type="crd:posUnitType" use="optional" default="deg"/>
				<xs:attribute name="fill_factor" type="xs:float" use="optional" default="1.0"/>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="velocitySphereType">
		<xs:annotation>
			<xs:documentation>Defines a velocity sphere</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="stc:sphereType">
				<xs:annotation>
					<xs:documentation>A special kind of area is a circle or sphere (in two or three dimensions), defined by a center position and a radius; the radius requires a unit</xs:documentation>
				</xs:annotation>
				<xs:attribute name="vel_time_unit" type="crd:velTimeUnitType" use="required"/>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="positionIntervalType">
		<xs:annotation>
			<xs:documentation>Contains a spatial position CoordInterval</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="stc:spatialIntervalType">
				<xs:sequence>
					<xs:element ref="stc:CoordInterval"/>
				</xs:sequence>
				<xs:attribute name="unit" type="crd:posUnitType" use="required"/>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="velocityIntervalType">
		<xs:annotation>
			<xs:documentation>Contains a spatial velocity CoordInterval</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="stc:positionIntervalType">
				<xs:annotation>
					<xs:documentation>A special kind of area is a circle or sphere (in two or three dimensions), defined by a center position and a radius; the radius requires a unit</xs:documentation>
				</xs:annotation>
				<xs:attribute name="vel_time_unit" type="crd:velTimeUnitType" use="required"/>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="regionFileType">
		<xs:annotation>
			<xs:documentation>Points to a Region file</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="stc:spatialIntervalType">
				<xs:sequence>
					<xs:element name="File" type="xs:anyURI"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="regionType">
		<xs:annotation>
			<xs:documentation>Contains an abstract Region</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="stc:spatialIntervalType">
				<xs:sequence>
					<xs:element ref="reg:Region"/>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<!-- CoordArea -->
	<xs:element name="SpatialInterval" type="stc:spatialIntervalType" abstract="true">
		<xs:annotation>
			<xs:documentation>The spatial interval substitution group head element; a spatial coordinate interval (volume) is specified as a circle (cone) or sphere; a 1-D, 2-D, or 3-D interval; a Region; or a RegionFile</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="Sphere" type="stc:sphereType" substitutionGroup="stc:SpatialInterval">
		<xs:annotation>
			<xs:documentation>Defines a sphere (3-D) region for spatial coordinates; contains a center position and a radius</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="PositionInterval" type="stc:positionIntervalType" substitutionGroup="stc:SpatialInterval">
		<xs:annotation>
			<xs:documentation>Contains a CoordInterval element: a 1-D range, 2-D box, or 3-D cube</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="RegionFile" type="stc:regionFileType" substitutionGroup="stc:SpatialInterval">
		<xs:annotation>
			<xs:documentation>A region as defined in a FITS region file</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="Region" type="stc:regionType" substitutionGroup="stc:SpatialInterval">
		<xs:annotation>
			<xs:documentation>Contains a region as defined in the Region schema</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="VelInterval" type="stc:spatialIntervalType" abstract="true">
		<xs:annotation>
			<xs:documentation>Contains a Velocity CoordInterval element: a 1-D range, 2-D box, or 3-D cube; plus a time unit for velocity values</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="VelocitySphere" type="stc:velocitySphereType" substitutionGroup="stc:VelInterval">
		<xs:annotation>
			<xs:documentation>Defines a sphere (3-D) region for velocity coordinates; contains a center position and a radius</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="VelocityInterval" type="stc:velocityIntervalType" substitutionGroup="stc:VelInterval">
		<xs:annotation>
			<xs:documentation>Contains a CoordInterval element: a 1-D range, 2-D box, or 3-D cube</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:complexType name="spectralIntervalType">
		<xs:annotation>
			<xs:documentation>Contains a 1-D spectral interval</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="stc:coordScalarIntervalType">
				<xs:attribute name="unit" type="crd:spectralUnitType" use="required"/>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="redshiftIntervalType">
		<xs:annotation>
			<xs:documentation>Contains a 1-D redshift interval; position and time units are required if redshifts are expressed as Doppler velocities</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="stc:coordScalarIntervalType">
				<xs:attribute name="unit" type="crd:posUnitType" use="optional"/>
				<xs:attribute name="vel_time_unit" type="crd:velTimeUnitType" use="optional"/>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="coordAreaType">
		<xs:annotation>
			<xs:documentation>Generalized coordinate area type</xs:documentation>
		</xs:annotation>
		<xs:sequence maxOccurs="unbounded">
			<xs:element name="TimeInterval" type="stc:timeIntervalType" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element ref="stc:SpatialInterval" minOccurs="0"/>
			<xs:element ref="stc:VelInterval" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="SpectralInterval" type="stc:spectralIntervalType" minOccurs="0" maxOccurs="unbounded"/>
			<xs:element name="RedshiftInterval" type="stc:redshiftIntervalType" minOccurs="0" maxOccurs="unbounded"/>
			<xs:sequence minOccurs="0" maxOccurs="unbounded">
				<xs:element ref="stc:CoordInterval"/>
			</xs:sequence>
		</xs:sequence>
		<xs:attribute name="ID" type="xs:ID" use="required"/>
		<xs:attribute name="coord_system_id" type="xs:IDREF" use="required"/>
	</xs:complexType>
	<xs:complexType name="astroCoordAreaType">
		<xs:annotation>
			<xs:documentation>Astronomical area type</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:restriction base="stc:coordAreaType">
				<xs:sequence>
					<xs:element name="TimeInterval" type="stc:timeIntervalType" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element ref="stc:SpatialInterval" minOccurs="0"/>
					<xs:element ref="stc:VelInterval" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element name="SpectralInterval" type="stc:spectralIntervalType" minOccurs="0" maxOccurs="unbounded"/>
					<xs:element name="RedshiftInterval" type="stc:redshiftIntervalType" minOccurs="0" maxOccurs="unbounded"/>
					<xs:sequence minOccurs="0" maxOccurs="unbounded">
						<xs:element ref="stc:CoordScalarInterval"/>
					</xs:sequence>
				</xs:sequence>
				<xs:attribute name="ID" type="xs:ID" use="required"/>
				<xs:attribute name="coord_system_id" type="xs:IDREF" use="required"/>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="pixelCoordAreaType">
		<xs:annotation>
			<xs:documentation>Pixel area type</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:restriction base="stc:coordAreaType">
				<xs:sequence>
					<xs:sequence maxOccurs="unbounded">
						<xs:element ref="stc:CoordScalarInterval"/>
					</xs:sequence>
				</xs:sequence>
				<xs:attribute name="ID" type="xs:ID" use="required"/>
				<xs:attribute name="coord_system_id" type="xs:IDREF" use="required"/>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<xs:element name="CoordArea" type="stc:coordAreaType">
		<xs:annotation>
			<xs:documentation>General coordinate area description; head element but not abstract</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="AstroCoordArea" type="stc:astroCoordAreaType" substitutionGroup="stc:CoordArea">
		<xs:annotation>
			<xs:documentation>Astronomical coordinate volume</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="PixelCoordArea" type="stc:pixelCoordAreaType" substitutionGroup="stc:CoordArea">
		<xs:annotation>
			<xs:documentation>Pixel space bounds</xs:documentation>
		</xs:annotation>
	</xs:element>
	<!-- Toplevel: STCmetadata contains a choice of: ResourceProfile, SearchLocation, CatalogEntryLocation, and
ObservationLocation plus ObservatoryLocation elements -->
	<xs:complexType name="stcMetadataType" abstract="true">
		<xs:annotation>
			<xs:documentation>Abstract stcMetadata type</xs:documentation>
		</xs:annotation>
		<xs:attribute name="ID" type="xs:ID" use="optional"/>
	</xs:complexType>
	<xs:complexType name="stcDescriptionType">
		<xs:annotation>
			<xs:documentation>Generalized single stcMetadata type</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="stc:stcMetadataType">
				<xs:sequence>
					<xs:sequence maxOccurs="unbounded">
						<xs:element ref="stc:CoordSys"/>
					</xs:sequence>
					<xs:sequence minOccurs="0" maxOccurs="unbounded">
						<xs:element ref="crd:Coords"/>
					</xs:sequence>
					<xs:sequence minOccurs="0" maxOccurs="unbounded">
						<xs:element ref="stc:CoordArea"/>
					</xs:sequence>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="stcResourceProfileType">
		<xs:annotation>
			<xs:documentation>Type for STC Resource Profile</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:restriction base="stc:stcDescriptionType">
				<xs:sequence>
					<xs:sequence maxOccurs="unbounded">
						<xs:element ref="stc:AstroCoordSystem">
							<xs:annotation>
								<xs:documentation>The coordinate system definition: spatial coordinate frame and reference position; time frame and reference position; the coordinate flavor; and the planetary ephemeris; an ID is required, since this is how coordinate elements are associated with their coordinate systems</xs:documentation>
							</xs:annotation>
						</xs:element>
					</xs:sequence>
					<xs:element ref="crd:AstroCoords">
						<xs:annotation>
							<xs:documentation>CoordSpec contains information on time and spatial resolution, errors, and pixelsizes (if fixed); typical best numbers are expected</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element ref="stc:AstroCoordArea">
						<xs:annotation>
							<xs:documentation>The coverage area of the resource; the fill factor does not need to be 1.0</xs:documentation>
						</xs:annotation>
					</xs:element>
				</xs:sequence>
				<xs:attribute name="ID" type="xs:ID" use="optional"/>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="searchLocationType">
		<xs:annotation>
			<xs:documentation>Type for STC search location</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:restriction base="stc:stcDescriptionType">
				<xs:sequence>
					<xs:sequence maxOccurs="unbounded">
						<xs:element ref="stc:AstroCoordSystem"/>
					</xs:sequence>
					<xs:sequence minOccurs="0">
						<xs:element ref="crd:AstroCoords"/>
					</xs:sequence>
					<xs:element ref="stc:AstroCoordArea"/>
				</xs:sequence>
				<xs:attribute name="ID" type="xs:ID" use="optional"/>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="catalogEntryLocationType">
		<xs:annotation>
			<xs:documentation>Type for STC catalog entry description</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:restriction base="stc:stcDescriptionType">
				<xs:sequence>
					<xs:sequence maxOccurs="unbounded">
						<xs:element ref="stc:AstroCoordSystem"/>
					</xs:sequence>
					<xs:sequence maxOccurs="unbounded">
						<xs:element ref="crd:AstroCoords"/>
					</xs:sequence>
					<xs:sequence minOccurs="0" maxOccurs="unbounded">
						<xs:element ref="stc:AstroCoordArea"/>
					</xs:sequence>
				</xs:sequence>
				<xs:attribute name="ID" type="xs:ID" use="optional"/>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="obsDataLocationType">
		<xs:annotation>
			<xs:documentation>Type for observational STC metadata</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:extension base="stc:stcMetadataType">
				<xs:sequence>
					<xs:annotation>
						<xs:documentation>Describes the spatial and temporal volume covered by an observation</xs:documentation>
					</xs:annotation>
					<xs:element name="ObservatoryLocation" type="stc:observatoryLocationType">
						<xs:annotation>
							<xs:documentation>Specifies the location of the observatory during the observation</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="ObservationLocation" type="stc:observationLocationType">
						<xs:annotation>
							<xs:documentation>Describes the spatial and temporal coverage of the observation</xs:documentation>
						</xs:annotation>
					</xs:element>
					<xs:element name="PixelSpace" type="stc:pixelSpaceType" minOccurs="0">
						<xs:annotation>
							<xs:documentation>Defines the pixel coordinate system for pixelated data</xs:documentation>
						</xs:annotation>
					</xs:element>
				</xs:sequence>
			</xs:extension>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="observatoryLocationType">
		<xs:annotation>
			<xs:documentation>Type for an observatory location</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:restriction base="stc:stcDescriptionType">
				<xs:sequence>
					<xs:sequence maxOccurs="unbounded">
						<xs:element ref="stc:AstroCoordSystem"/>
					</xs:sequence>
					<xs:element ref="crd:AstroCoords"/>
				</xs:sequence>
				<xs:attribute name="ID" type="xs:ID" use="optional"/>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="observationLocationType">
		<xs:annotation>
			<xs:documentation>Type for describing the coordinate volume occupied by observational data, as seen from the observatory location</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:restriction base="stc:stcDescriptionType">
				<xs:sequence>
					<xs:sequence maxOccurs="unbounded">
						<xs:element ref="stc:AstroCoordSystem"/>
					</xs:sequence>
					<xs:element ref="crd:AstroCoords"/>
					<xs:sequence minOccurs="0">
						<xs:element ref="stc:AstroCoordArea"/>
					</xs:sequence>
				</xs:sequence>
				<xs:attribute name="ID" type="xs:ID" use="optional"/>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<xs:complexType name="pixelSpaceType">
		<xs:annotation>
			<xs:documentation>Type to specify a pixel space</xs:documentation>
		</xs:annotation>
		<xs:complexContent>
			<xs:restriction base="stc:stcDescriptionType">
				<xs:sequence>
					<xs:element ref="stc:PixelCoordSystem"/>
					<xs:sequence minOccurs="0" maxOccurs="unbounded">
						<xs:element ref="crd:PixelCoords"/>
					</xs:sequence>
					<xs:element ref="stc:PixelCoordArea"/>
				</xs:sequence>
				<xs:attribute name="ID" type="xs:ID" use="optional"/>
			</xs:restriction>
		</xs:complexContent>
	</xs:complexType>
	<xs:element name="STCmetadata" type="stc:stcMetadataType" abstract="true">
		<xs:annotation>
			<xs:documentation>Toplevel: Abstract STCmetadata contains a choice of: ResourceProfile, SearchLocation, CatalogEntryLocation, or ObservationLocation plus ObservatoryLocation elements</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="STCResourceProfile" type="stc:stcResourceProfileType" substitutionGroup="stc:STCmetadata">
		<xs:annotation>
			<xs:documentation>Describes the spatial and temporal coverage of a resource</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="SearchLocation" type="stc:searchLocationType" substitutionGroup="stc:STCmetadata">
		<xs:annotation>
			<xs:documentation>Defines the spatial and temporal coordinate space specified by a query</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="CatalogEntryLocation" type="stc:catalogEntryLocationType" substitutionGroup="stc:STCmetadata">
		<xs:annotation>
			<xs:documentation>Describes the spatial and temporal coverage of a catalog (fragment) and contains the coordinates of the catalog entries; multiple coordinate systems are allowed</xs:documentation>
		</xs:annotation>
	</xs:element>
	<xs:element name="ObsDataLocation" type="stc:obsDataLocationType" substitutionGroup="stc:STCmetadata">
		<xs:annotation>
			<xs:documentation>Describes the coordinate system used in and coordinate space occupied by a particular observational dataset; it contains an observation location, an observatory location, and optionally a pixel coordinate system</xs:documentation>
		</xs:annotation>
	</xs:element>
</xs:schema>
