cansas1d.xsd: Difference between revisions

From canSAS
(New page: =XML Schema: cansas1d.xsd= <pre> <?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.smallangles.net/cansas1d" xmlns:tns="...)
 
(→‎XML Schema: cansas1d.xsd: major modifications of: SASsample, SASinstrument, & SASprocess)
Line 7: Line 7:
elementFormDefault="qualified">
elementFormDefault="qualified">


<complexType name="QType">
<complexType name="floatUnitsType">
<simpleContent>
<simpleContent>
<extension base="float">
<extension base="float">
<attribute name="units" type="string" default="1/A"
<attribute name="units" type="string" use="required" />
use="optional" />
</extension>
</extension>
</simpleContent>
</simpleContent>
</complexType>
</complexType>


<complexType name="IType">
<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
<simpleContent>
 
<extension base="float">
<group name="positionGroup">
<attribute name="units" type="string" default="1/cm"
<sequence>
use="optional" />
<element name="x" type="tns:floatUnitsType" minOccurs="0"
</extension>
maxOccurs="1" />
</simpleContent>
<element name="y" type="tns:floatUnitsType" minOccurs="0"
</complexType>
maxOccurs="1" />
<element name="z" type="tns:floatUnitsType" minOccurs="0"
maxOccurs="1" />
</sequence>
</group>


<complexType name="lengthType">
<complexType name="positionType">
<simpleContent>
<group ref="tns:positionGroup" />
<extension base="float">
<attribute name="name" type="string" use="optional" />
<attribute name="units" type="string" default="mm"
use="optional" />
</extension>
</simpleContent>
</complexType>
</complexType>


<complexType name="temperatureType">
<group name="rotationGroup">
<simpleContent>
<sequence>
<extension base="float">
<element name="roll" type="tns:floatUnitsType" minOccurs="0"
<attribute name="units" type="string" default="C"
maxOccurs="1" />
use="optional" />
<element name="pitch" type="tns:floatUnitsType"
</extension>
minOccurs="0" maxOccurs="1" />
</simpleContent>
<element name="yaw" type="tns:floatUnitsType" minOccurs="0"
</complexType>
maxOccurs="1" />
</sequence>
</group>


<complexType name="unitsType">
<complexType name="rotationType">
<simpleContent>
<group ref="tns:rotationGroup" />
<extension base="float">
<attribute name="name" type="string" use="optional" />
<attribute name="units" type="string" use="required" />
</extension>
</simpleContent>
</complexType>
</complexType>


Line 56: Line 54:
<sequence>
<sequence>
<element name="Q" minOccurs="1" maxOccurs="1"
<element name="Q" minOccurs="1" maxOccurs="1"
type="tns:QType" />
type="tns:floatUnitsType" />
<element name="I" minOccurs="1" maxOccurs="1"
<element name="I" minOccurs="1" maxOccurs="1"
type="tns:IType" />
type="tns:floatUnitsType" />
<element name="Qdev" minOccurs="0" maxOccurs="1"
<element name="Qdev" minOccurs="0" maxOccurs="1"
type="tns:QType" default="0" />
type="tns:floatUnitsType" default="0" />
<element name="Idev" minOccurs="0" maxOccurs="1"
<element name="Idev" minOccurs="0" maxOccurs="1"
type="tns:IType" default="0" />
type="tns:floatUnitsType" default="0" />
<element name="Qfwhm" minOccurs="0" maxOccurs="1"
<element name="Qfwhm" minOccurs="0" maxOccurs="1"
type="tns:QType" default="0" />
type="tns:floatUnitsType" default="0" />
<element name="Qmean" minOccurs="0" maxOccurs="1"
<element name="Qmean" minOccurs="0" maxOccurs="1"
type="tns:QType" default="0" />
type="tns:floatUnitsType" default="0" />
<element name="Shadowfactor" minOccurs="0" maxOccurs="1"
<element name="Shadowfactor" minOccurs="0" maxOccurs="1"
type="float" default="1.0" />
type="float" default="1.0" />
Line 77: Line 75:
type="tns:IdataType" />
type="tns:IdataType" />
</sequence>
</sequence>
<attribute name="name" type="string" />
<attribute name="name" type="string" use="optional" />
</complexType>
</complexType>


Line 84: Line 82:
<complexType name="SASsampleType">
<complexType name="SASsampleType">
<sequence>
<sequence>
<element name="sample_ID" minOccurs="1" maxOccurs="1"
<element name="ID" minOccurs="1" maxOccurs="1"
type="string" />
type="string" />
<element name="sample_thickness" minOccurs="0" maxOccurs="1"
<element name="thickness" minOccurs="0" maxOccurs="1"
type="tns:lengthType" />
type="tns:floatUnitsType" />
<element name="sample_transmission" minOccurs="0"
<element name="transmission" minOccurs="0" maxOccurs="1"
maxOccurs="1" type="float" />
type="float" />
<element name="sample_temperature" minOccurs="0"
<element name="temperature" minOccurs="0" maxOccurs="1"
maxOccurs="1" type="tns:temperatureType" />
type="tns:floatUnitsType" />
<element name="sample_rotation" minOccurs="0" maxOccurs="1"
<element name="position" minOccurs="0" maxOccurs="1"
type="tns:unitsType" />
type="tns:positionType" />
<element name="sample_offset_angle" minOccurs="0"
<element name="rotation" minOccurs="0" maxOccurs="1"
maxOccurs="1" type="tns:unitsType" />
type="tns:rotationType" />
<element name="sample_x" minOccurs="0"
<element name="offset_angle" minOccurs="0" maxOccurs="1"
type="tns:lengthType" />
type="tns:floatUnitsType" />
<element name="sample_y" minOccurs="0" maxOccurs="1"
<element name="details" minOccurs="0" maxOccurs="unbounded"
type="tns:lengthType" />
<element name="sample_prep" minOccurs="0" maxOccurs="1"
type="string" />
type="string" />
</sequence>
</sequence>
<attribute name="name" type="string" />
<attribute name="name" type="string" use="optional" />
</complexType>
</complexType>


Line 110: Line 106:
<complexType name="SASprocessType">
<complexType name="SASprocessType">
<sequence>
<sequence>
<element name="SASprocessnote" type="string" />
<element name="name" minOccurs="0" maxOccurs="1"
type="string" />
<element name="date" minOccurs="0" maxOccurs="1"
type="string" />
<element name="description" minOccurs="0" maxOccurs="1"
type="string" />
<element name="term" minOccurs="0" maxOccurs="unbounded">
<complexType>
<simpleContent>
<extension base="string">
<attribute name="name" type="string"
use="required" />
<attribute name="units" type="string"
use="optional" />
</extension>
</simpleContent>
</complexType>
</element>
<element name="sector_width" minOccurs="0" maxOccurs="1"
type="tns:floatUnitsType" />
<element name="sector_orient" minOccurs="0" maxOccurs="1"
type="tns:floatUnitsType" />
<element name="SASprocessnote" type="string" minOccurs="1"
maxOccurs="unbounded" />
</sequence>
</sequence>
<attribute name="name" type="string" />
<attribute name="name" type="string" use="optional" />
</complexType>
</complexType>


<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->
<complexType name="SASsourceType">
<sequence>
<element name="radiation" minOccurs="1" maxOccurs="1"
type="string" />
<element name="beam_size" minOccurs="0" maxOccurs="1"
type="tns:positionType" />
<element name="beam_shape" minOccurs="0" maxOccurs="1"
type="string" />
<element name="wavelength" minOccurs="0" maxOccurs="1"
type="tns:floatUnitsType" />
<element name="wavelength_min" minOccurs="0" maxOccurs="1"
type="tns:floatUnitsType" />
<element name="wavelength_max" minOccurs="0" maxOccurs="1"
type="tns:floatUnitsType" />
<element name="wavelength_spread" minOccurs="0"
maxOccurs="1" type="tns:floatUnitsType" />
</sequence>
<attribute name="name" type="string" use="optional" />
</complexType>
<complexType name="SAScollimationType">
<sequence>
<element name="distance" minOccurs="0" maxOccurs="1"
type="tns:floatUnitsType" />
<element name="aperture" minOccurs="0"
maxOccurs="unbounded">
<complexType>
<sequence>
<element name="size" minOccurs="0" maxOccurs="1"
type="tns:positionType" />
<element name="distance" minOccurs="0"
maxOccurs="1" type="tns:floatUnitsType" />
</sequence>
<attribute name="name" type="string" use="optional" />
<attribute name="type" type="string" use="optional" />
</complexType>
</element>
</sequence>
<attribute name="name" type="string" use="optional" />
</complexType>
<complexType name="SASdetectorType">
<sequence>
<element name="name" minOccurs="1" maxOccurs="1"
type="string" />
<element name="SDD" minOccurs="0" maxOccurs="1"
type="tns:floatUnitsType" />
<element name="offset" minOccurs="0" maxOccurs="1"
type="tns:positionType" />
<element name="rotation" minOccurs="0" maxOccurs="1"
type="tns:rotationType" />
<element name="beam_center" minOccurs="0" maxOccurs="1"
type="tns:positionType" />
<element name="pixel_size" minOccurs="0" maxOccurs="1"
type="tns:positionType" />
</sequence>
<attribute name="name" type="string" use="optional" />
</complexType>


<complexType name="SASinstrumentType">
<complexType name="SASinstrumentType">
<sequence>
<sequence>
<element name="SASsource" type="string" />
<element name="name" type="string" minOccurs="1"
<element name="SAScollimation" type="string" />
maxOccurs="1" />
<element name="SASdetector" type="string" />
<element name="SASsource" type="tns:SASsourceType" />
<element name="SAScollimation"
type="tns:SAScollimationType" />
<element name="SASdetector" type="tns:SASdetectorType"
minOccurs="1" maxOccurs="1" />
</sequence>
</sequence>
<attribute name="name" type="string" />
<attribute name="name" type="string" use="optional" />
</complexType>
</complexType>


Line 136: Line 218:
<element name="SASdata" type="tns:SASdataType" />
<element name="SASdata" type="tns:SASdataType" />
<element name="SASsample" type="tns:SASsampleType" />
<element name="SASsample" type="tns:SASsampleType" />
<element name="SASinstrument" type="tns:SASinstrumentType" />
<element name="SASinstrument" type="tns:SASinstrumentType"
<element name="SASprocess" type="tns:SASprocessType" />
minOccurs="1" maxOccurs="1" />
<element name="SASprocess" type="tns:SASprocessType"
minOccurs="0" maxOccurs="unbounded" />
<element name="SASnote" />
<element name="SASnote" />
</sequence>
</sequence>
<attribute name="name" type="string" />
<attribute name="name" type="string" use="optional" />
</complexType>
</complexType>


Line 151: Line 235:
</element>
</element>
</sequence>
</sequence>
<attribute name="version" type="string" fixed="0.1a" />
<attribute name="version" type="string" fixed="0.1a"
use="required" />
</complexType>
</complexType>



Revision as of 03:16, 21 December 2007

XML Schema: cansas1d.xsd

<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
	targetNamespace="http://www.smallangles.net/cansas1d"
	xmlns:tns="http://www.smallangles.net/cansas1d"
	elementFormDefault="qualified">

	<complexType name="floatUnitsType">
		<simpleContent>
			<extension base="float">
				<attribute name="units" type="string" use="required" />
			</extension>
		</simpleContent>
	</complexType>

	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

	<group name="positionGroup">
		<sequence>
			<element name="x" type="tns:floatUnitsType" minOccurs="0"
				maxOccurs="1" />
			<element name="y" type="tns:floatUnitsType" minOccurs="0"
				maxOccurs="1" />
			<element name="z" type="tns:floatUnitsType" minOccurs="0"
				maxOccurs="1" />
		</sequence>
	</group>

	<complexType name="positionType">
		<group ref="tns:positionGroup" />
		<attribute name="name" type="string" use="optional" />
	</complexType>

	<group name="rotationGroup">
		<sequence>
			<element name="roll" type="tns:floatUnitsType" minOccurs="0"
				maxOccurs="1" />
			<element name="pitch" type="tns:floatUnitsType"
				minOccurs="0" maxOccurs="1" />
			<element name="yaw" type="tns:floatUnitsType" minOccurs="0"
				maxOccurs="1" />
		</sequence>
	</group>

	<complexType name="rotationType">
		<group ref="tns:rotationGroup" />
		<attribute name="name" type="string" use="optional" />
	</complexType>

	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

	<complexType name="IdataType">
		<sequence>
			<element name="Q" minOccurs="1" maxOccurs="1"
				type="tns:floatUnitsType" />
			<element name="I" minOccurs="1" maxOccurs="1"
				type="tns:floatUnitsType" />
			<element name="Qdev" minOccurs="0" maxOccurs="1"
				type="tns:floatUnitsType" default="0" />
			<element name="Idev" minOccurs="0" maxOccurs="1"
				type="tns:floatUnitsType" default="0" />
			<element name="Qfwhm" minOccurs="0" maxOccurs="1"
				type="tns:floatUnitsType" default="0" />
			<element name="Qmean" minOccurs="0" maxOccurs="1"
				type="tns:floatUnitsType" default="0" />
			<element name="Shadowfactor" minOccurs="0" maxOccurs="1"
				type="float" default="1.0" />
		</sequence>
	</complexType>

	<complexType name="SASdataType">
		<sequence>
			<element name="Idata" minOccurs="1" maxOccurs="unbounded"
				type="tns:IdataType" />
		</sequence>
		<attribute name="name" type="string" use="optional" />
	</complexType>

	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

	<complexType name="SASsampleType">
		<sequence>
			<element name="ID" minOccurs="1" maxOccurs="1"
				type="string" />
			<element name="thickness" minOccurs="0" maxOccurs="1"
				type="tns:floatUnitsType" />
			<element name="transmission" minOccurs="0" maxOccurs="1"
				type="float" />
			<element name="temperature" minOccurs="0" maxOccurs="1"
				type="tns:floatUnitsType" />
			<element name="position" minOccurs="0" maxOccurs="1"
				type="tns:positionType" />
			<element name="rotation" minOccurs="0" maxOccurs="1"
				type="tns:rotationType" />
			<element name="offset_angle" minOccurs="0" maxOccurs="1"
				type="tns:floatUnitsType" />
			<element name="details" minOccurs="0" maxOccurs="unbounded"
				type="string" />
		</sequence>
		<attribute name="name" type="string" use="optional" />
	</complexType>

	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

	<complexType name="SASprocessType">
		<sequence>
			<element name="name" minOccurs="0" maxOccurs="1"
				type="string" />
			<element name="date" minOccurs="0" maxOccurs="1"
				type="string" />
			<element name="description" minOccurs="0" maxOccurs="1"
				type="string" />
			<element name="term" minOccurs="0" maxOccurs="unbounded">
				<complexType>
					<simpleContent>
						<extension base="string">
							<attribute name="name" type="string"
								use="required" />
							<attribute name="units" type="string"
								use="optional" />
						</extension>
					</simpleContent>
				</complexType>
			</element>
			<element name="sector_width" minOccurs="0" maxOccurs="1"
				type="tns:floatUnitsType" />
			<element name="sector_orient" minOccurs="0" maxOccurs="1"
				type="tns:floatUnitsType" />
			<element name="SASprocessnote" type="string" minOccurs="1"
				maxOccurs="unbounded" />
		</sequence>
		<attribute name="name" type="string" use="optional" />
	</complexType>

	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

	<complexType name="SASsourceType">
		<sequence>
			<element name="radiation" minOccurs="1" maxOccurs="1"
				type="string" />
			<element name="beam_size" minOccurs="0" maxOccurs="1"
				type="tns:positionType" />
			<element name="beam_shape" minOccurs="0" maxOccurs="1"
				type="string" />
			<element name="wavelength" minOccurs="0" maxOccurs="1"
				type="tns:floatUnitsType" />
			<element name="wavelength_min" minOccurs="0" maxOccurs="1"
				type="tns:floatUnitsType" />
			<element name="wavelength_max" minOccurs="0" maxOccurs="1"
				type="tns:floatUnitsType" />
			<element name="wavelength_spread" minOccurs="0"
				maxOccurs="1" type="tns:floatUnitsType" />
		</sequence>
		<attribute name="name" type="string" use="optional" />
	</complexType>

	<complexType name="SAScollimationType">
		<sequence>
			<element name="distance" minOccurs="0" maxOccurs="1"
				type="tns:floatUnitsType" />
			<element name="aperture" minOccurs="0"
				maxOccurs="unbounded">
				<complexType>
					<sequence>
						<element name="size" minOccurs="0" maxOccurs="1"
							type="tns:positionType" />
						<element name="distance" minOccurs="0"
							maxOccurs="1" type="tns:floatUnitsType" />
					</sequence>
					<attribute name="name" type="string" use="optional" />
					<attribute name="type" type="string" use="optional" />
				</complexType>
			</element>
		</sequence>
		<attribute name="name" type="string" use="optional" />
	</complexType>

	<complexType name="SASdetectorType">
		<sequence>
			<element name="name" minOccurs="1" maxOccurs="1"
				type="string" />
			<element name="SDD" minOccurs="0" maxOccurs="1"
				type="tns:floatUnitsType" />
			<element name="offset" minOccurs="0" maxOccurs="1"
				type="tns:positionType" />
			<element name="rotation" minOccurs="0" maxOccurs="1"
				type="tns:rotationType" />
			<element name="beam_center" minOccurs="0" maxOccurs="1"
				type="tns:positionType" />
			<element name="pixel_size" minOccurs="0" maxOccurs="1"
				type="tns:positionType" />
		</sequence>
		<attribute name="name" type="string" use="optional" />
	</complexType>

	<complexType name="SASinstrumentType">
		<sequence>
			<element name="name" type="string" minOccurs="1"
				maxOccurs="1" />
			<element name="SASsource" type="tns:SASsourceType" />
			<element name="SAScollimation"
				type="tns:SAScollimationType" />
			<element name="SASdetector" type="tns:SASdetectorType"
				minOccurs="1" maxOccurs="1" />
		</sequence>
		<attribute name="name" type="string" use="optional" />
	</complexType>

	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

	<complexType name="SASentryType">
		<sequence>
			<element name="Title" minOccurs="0" maxOccurs="1"
				type="string" />
			<element name="Run" minOccurs="0" maxOccurs="1"
				type="string" />
			<element name="SASdata" type="tns:SASdataType" />
			<element name="SASsample" type="tns:SASsampleType" />
			<element name="SASinstrument" type="tns:SASinstrumentType"
				minOccurs="1" maxOccurs="1" />
			<element name="SASprocess" type="tns:SASprocessType"
				minOccurs="0" maxOccurs="unbounded" />
			<element name="SASnote" />
		</sequence>
		<attribute name="name" type="string" use="optional" />
	</complexType>

	<!-- ++++++++++++++++++++++++++++++++++++++++++++++++++++++ -->

	<complexType name="SASrootType">
		<sequence>
			<element name="SASentry" minOccurs="1" maxOccurs="unbounded"
				type="tns:SASentryType">
			</element>
		</sequence>
		<attribute name="version" type="string" fixed="0.1a"
			use="required" />
	</complexType>

	<element name="SASroot" type="tns:SASrootType" />

</schema>