2014-11-13 10:47:00 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<xs:schema version="0.1"
|
|
|
|
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
2014-11-13 10:54:11 +00:00
|
|
|
xmlns:arch="http://rs.tdwg.org/dwc/text/"
|
2014-11-13 10:47:00 +00:00
|
|
|
xmlns:dwc="http://rs.tdwg.org/dwc/terms/"
|
2014-11-13 10:54:11 +00:00
|
|
|
targetNamespace="http://rs.tdwg.org/dwc/text/"
|
2014-11-13 10:47:00 +00:00
|
|
|
attributeFormDefault="unqualified"
|
|
|
|
elementFormDefault="qualified">
|
|
|
|
<xs:import namespace="http://www.w3.org/2001/XMLSchema" schemaLocation="http://www.w3.org/2001/XMLSchema.xsd"/>
|
|
|
|
<xs:import namespace="http://rs.tdwg.org/dwc/terms/" schemaLocation="http://darwincore.googlecode.com/svn/trunk/xsd/tdwg_dwcterms.xsd"/>
|
|
|
|
|
2014-11-13 10:54:11 +00:00
|
|
|
<xs:element name="starArchive">
|
|
|
|
<xs:complexType>
|
|
|
|
<xs:sequence>
|
|
|
|
<xs:element name="core" type="arch:coreFileType" maxOccurs="1" minOccurs="1"/>
|
|
|
|
<xs:element name="extension" type="arch:extensionFileType" maxOccurs="unbounded" minOccurs="0"/>
|
|
|
|
</xs:sequence>
|
|
|
|
<xs:attribute name="metadata" type="xs:anyURI" use="optional"/>
|
|
|
|
</xs:complexType>
|
|
|
|
</xs:element>
|
|
|
|
|
2014-11-13 10:47:00 +00:00
|
|
|
<!-- The root element of the document is an archive -->
|
2014-11-13 10:54:11 +00:00
|
|
|
<xs:element name="archive" type="arch:archiveType"/>
|
2014-11-13 10:47:00 +00:00
|
|
|
|
|
|
|
<!-- Archives contain file defitions -->
|
|
|
|
<xs:complexType name="archiveType">
|
|
|
|
<xs:sequence>
|
2014-11-13 10:54:11 +00:00
|
|
|
<xs:element name="file" type="arch:fileType" maxOccurs="unbounded" minOccurs="1"/>
|
|
|
|
<xs:element name="relationships" maxOccurs="1" minOccurs="0">
|
|
|
|
<xs:complexType>
|
|
|
|
<xs:sequence>
|
|
|
|
<xs:element name="relationship" maxOccurs="unbounded" minOccurs="1">
|
|
|
|
<xs:complexType>
|
|
|
|
<xs:sequence>
|
|
|
|
<!-- The file within a relationship definition specifies the location and the
|
|
|
|
columns that define the 'join' between the files -->
|
|
|
|
<xs:element name="file" maxOccurs="2" minOccurs="2">
|
|
|
|
<xs:complexType>
|
|
|
|
<xs:attribute name="location" type="xs:string" use="required"/>
|
|
|
|
<xs:attribute name="fieldIndex" type="xs:integer" use="required"/>
|
|
|
|
</xs:complexType>
|
|
|
|
</xs:element>
|
|
|
|
</xs:sequence>
|
|
|
|
</xs:complexType>
|
|
|
|
</xs:element>
|
|
|
|
</xs:sequence>
|
|
|
|
</xs:complexType>
|
|
|
|
</xs:element>
|
2014-11-13 10:47:00 +00:00
|
|
|
</xs:sequence>
|
2014-11-13 10:54:11 +00:00
|
|
|
<xs:attribute name="fileRoot" type="xs:string" use="optional" default="."/>
|
|
|
|
<xs:attribute name="metadata" type="xs:anyURI" use="optional"/>
|
2014-11-13 10:47:00 +00:00
|
|
|
</xs:complexType>
|
|
|
|
|
2014-11-13 10:54:11 +00:00
|
|
|
|
|
|
|
<!-- attributes shared across all file types, core or extensions -->
|
|
|
|
<xs:attributeGroup name="fileAttributes">
|
2014-11-13 10:47:00 +00:00
|
|
|
<xs:attribute name="location" type="xs:string" use="required"/>
|
|
|
|
<xs:attribute name="fieldsTerminatedBy" type="xs:string" use="optional" default=","/>
|
|
|
|
<xs:attribute name="linesTerminatedBy" type="xs:string" use="optional" default="\n"/>
|
2014-11-13 10:54:11 +00:00
|
|
|
<xs:attribute name="fieldsEnclosedBy" type="xs:string" use="optional" default=""/>
|
|
|
|
<xs:attribute name="compression" type="arch:compressionEnum" use="optional"/>
|
|
|
|
<xs:attribute name="encoding" type="arch:encodingEnum" use="optional" default="ISO-8859-1"/>
|
2014-11-13 10:47:00 +00:00
|
|
|
<xs:attribute name="ignoreHeaderLines" type="xs:integer" use="optional" default="0"/>
|
|
|
|
<xs:attribute name="dateFormat" type="xs:string" use="optional"/>
|
2014-11-13 10:54:11 +00:00
|
|
|
<xs:attribute name="rowType" type="xs:string" use="optional" default="http://rs.tdwg.org/dwc/xsd/simpledarwincore/SimpleDarwinRecord"/>
|
|
|
|
</xs:attributeGroup>
|
|
|
|
|
|
|
|
<!-- The file within an archive defines the description and it's fields -->
|
|
|
|
<xs:complexType name="fileType">
|
|
|
|
<xs:sequence>
|
|
|
|
<xs:element name="field" type="arch:fieldType" minOccurs="1" maxOccurs="unbounded"/>
|
|
|
|
</xs:sequence>
|
|
|
|
<xs:attributeGroup ref="arch:fileAttributes"/>
|
|
|
|
</xs:complexType>
|
|
|
|
|
|
|
|
<!-- a file representing the core file in a star schema -->
|
|
|
|
<xs:complexType name="coreFileType">
|
|
|
|
<xs:sequence>
|
|
|
|
<xs:element name="id" type="arch:fieldType" minOccurs="1" maxOccurs="1"/>
|
|
|
|
<xs:element name="field" type="arch:fieldType" minOccurs="0" maxOccurs="unbounded"/>
|
|
|
|
</xs:sequence>
|
|
|
|
<xs:attributeGroup ref="arch:fileAttributes"/>
|
|
|
|
</xs:complexType>
|
|
|
|
|
|
|
|
<!-- a file representing an extension file in a star schema -->
|
|
|
|
<xs:complexType name="extensionFileType">
|
|
|
|
<xs:sequence>
|
|
|
|
<xs:element name="coreid" type="arch:fieldType" minOccurs="1" maxOccurs="1"/>
|
|
|
|
<xs:element name="field" type="arch:fieldType" minOccurs="0" maxOccurs="unbounded"/>
|
|
|
|
</xs:sequence>
|
|
|
|
<xs:attributeGroup ref="arch:fileAttributes"/>
|
2014-11-13 10:47:00 +00:00
|
|
|
</xs:complexType>
|
|
|
|
|
|
|
|
<!-- A field represents a column within the file -->
|
|
|
|
<xs:complexType name="fieldType">
|
|
|
|
<xs:attribute name="index" type="xs:integer" use="optional"/>
|
2014-11-13 10:54:11 +00:00
|
|
|
<xs:attribute name="term" type="xs:anyURI" use="required"/>
|
2014-11-13 10:47:00 +00:00
|
|
|
<xs:attribute name="type" type="xs:anySimpleType" use="optional" default="xs:string"/>
|
|
|
|
<xs:attribute name="default" type="xs:string" use="optional"/>
|
2014-11-13 10:54:11 +00:00
|
|
|
</xs:complexType>
|
2014-11-13 10:47:00 +00:00
|
|
|
|
|
|
|
<!-- Enumeration for supported compression types -->
|
|
|
|
<xs:simpleType name="compressionEnum">
|
|
|
|
<xs:restriction base="xs:string">
|
|
|
|
<xs:enumeration value="GZIP"/>
|
|
|
|
<xs:enumeration value="ZIP"/>
|
|
|
|
</xs:restriction>
|
|
|
|
</xs:simpleType>
|
|
|
|
|
|
|
|
<!-- Enumeration for supported encodings -->
|
|
|
|
<xs:simpleType name="encodingEnum">
|
|
|
|
<xs:restriction base="xs:string">
|
|
|
|
<xs:enumeration value="windows-1252"/>
|
|
|
|
<xs:enumeration value="ISO-8859-1"/>
|
|
|
|
<xs:enumeration value="UTF-8"/>
|
|
|
|
<xs:enumeration value="UTF-16"/>
|
|
|
|
</xs:restriction>
|
|
|
|
</xs:simpleType>
|
2014-11-12 22:40:34 +00:00
|
|
|
</xs:schema>
|