/[volute]/trunk/projects/dm/vo-dml/xsd/vo-dml-instance.xsd
ViewVC logotype

Contents of /trunk/projects/dm/vo-dml/xsd/vo-dml-instance.xsd

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1967 - (show annotations)
Fri Feb 15 10:14:49 2013 UTC (8 years, 8 months ago) by gerard.lemson
File size: 7114 byte(s)


1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsd:schema
3 xmlns:xsd="http://www.w3.org/2001/XMLSchema"
4 xmlns="http://volute.googlecode.com/dm/vo-dml-instance/v0.x"
5 xmlns:vo-dml="http://volute.googlecode.com/dm/vo-dml/v0.9"
6 targetNamespace="http://volute.googlecode.com/dm/vo-dml-instance/v0.x"
7 attributeFormDefault="unqualified"
8 elementFormDefault="unqualified">
9 <xsd:import namespace="http://volute.googlecode.com/dm/vo-dml/v0.9"
10 schemaLocation="http://volute.googlecode.com/svn/trunk/projects/dm/vo-dml/xsd/vo-dml.xsd"/>
11
12 <xsd:annotation>
13 <xsd:documentation>
14 This schema defines a standard serialisation format for the VO-DML meta-model.
15 It allows one to create instance documents for models defined via a VO-DML document.
16 It does so in a way that is the same for each model, i.e. does NOT create new types for different models.
17 This is in contrast to for example the instance documents that would arise from a mapping to XML schema for example.
18
19 This is NOT intended to provide a standard serialisation format for these models, but to provide a standard
20 target for translational semantics. IF a VOTable for example can be translated to such a document,
21 it has been annotated correctly.
22 </xsd:documentation>
23 </xsd:annotation>
24
25 <!-- +++++++++++++++++++ Begin of 'UTYPE section' +++++++++++++++++++ -->
26
27 <xsd:simpleType name="UTYPE">
28 <xsd:annotation>
29 <xsd:documentation>
30 This simpleType allows concatenation of vo-dml:UTYPE-sThis in contrast to the normalized version in vo-dml-instance_utype_normalized.xsd
31 TBD define the pattern, is the one below correct?
32 </xsd:documentation>
33 </xsd:annotation>
34 <xsd:restriction base="xsd:string">
35 <xsd:pattern value="([a-zA-Z0-9/:.])+(['+']{1}([a-zA-Z0-9/:.])+)*"></xsd:pattern>
36 </xsd:restriction>
37 </xsd:simpleType>
38
39
40 <xsd:complexType name="Instance">
41 <xsd:sequence>
42 <xsd:element name="model" type="Model" minOccurs="1" maxOccurs="unbounded"/>
43 <xsd:element name="object" type="Object" minOccurs="0" maxOccurs="unbounded"/>
44 </xsd:sequence>
45 </xsd:complexType>
46
47 <xsd:complexType name="Model">
48 <xsd:sequence>
49 <xsd:element name="model-location" type="xsd:anyURI"/>
50 <xsd:element name="utype-prefix" type="xsd:string"/>
51 </xsd:sequence>
52 </xsd:complexType>
53
54 <xsd:complexType name="Object">
55 <xsd:sequence>
56 <xsd:element name="utype" type="UTYPE"/>
57 <xsd:element name="id" type="ObjectId"/>
58 <xsd:element name="attribute" type="Attribute" minOccurs="0" maxOccurs="unbounded"/>
59 <xsd:element name="collection-element" type="Collection" minOccurs="0" maxOccurs="unbounded"/>
60 <xsd:element name="reference" type="Reference" minOccurs="0" maxOccurs="unbounded"/>
61 </xsd:sequence>
62 </xsd:complexType>
63
64 <xsd:complexType name="ObjectId">
65 <xsd:annotation>
66 <xsd:documentation>
67 Wrapper type for an Object Identifier.
68 Allows one to generalise this ObjectId without needing to redefine the usage of that concept.
69 For example could allow us to have various types of identifiers.
70 Or to add links to one or more remote instances of this same object, say in a database,
71 or an XML document based on some mapping of the data model to XML schema.
72 All these other elements should have minOccurs="0". For it should not be necessary to use these other
73 elements in the ObjectId that is used inside the Reference type.
74 </xsd:documentation>
75 </xsd:annotation>
76 <xsd:sequence>
77 <xsd:element name="uri-id" type="xsd:anyURI">
78 <xsd:annotation>
79 <xsd:documentation>
80 Fundamental identifying element that must be unique in this document.
81 Could be simply a string. Must have a uniqueness constraint added.
82 </xsd:documentation>
83 </xsd:annotation>
84 </xsd:element>
85 </xsd:sequence>
86 </xsd:complexType>
87
88 <xsd:complexType name="Attribute" abstract="true">
89 <xsd:sequence>
90 <xsd:element name="utype" type="vo-dml:UTYPE"/>
91 <xsd:element name="datatype" type="vo-dml:UTYPE" minOccurs="0">
92 <xsd:annotation>
93 <xsd:documentation>
94 IF the datatype of the value given to an attribute is a sub-type of the dataty[pe declared on the attribute,
95 This element MUST be used to point at the actual type.
96 This is similar/equivalent to the xsi:type mechanism to indicate subclasses in XML documents.
97 If this element is not provided, the declared type is assumed.
98 </xsd:documentation>
99 </xsd:annotation>
100 </xsd:element>
101 </xsd:sequence>
102 </xsd:complexType>
103
104 <xsd:complexType name="AtomicAttribute">
105 <xsd:complexContent >
106 <xsd:extension base="Attribute">
107 <xsd:sequence>
108 <xsd:element name="value" type="xsd:string"/>
109 </xsd:sequence>
110 </xsd:extension>
111 </xsd:complexContent>
112 </xsd:complexType>
113
114 <xsd:complexType name="StructuredAttribute">
115 <xsd:complexContent >
116 <xsd:extension base="Attribute">
117 <xsd:sequence>
118 <xsd:element name="attribute" type="Attribute" maxOccurs="unbounded"/>
119 </xsd:sequence>
120 </xsd:extension>
121 </xsd:complexContent>
122 </xsd:complexType>
123
124 <xsd:complexType name="Collection">
125 <xsd:sequence>
126 <xsd:element name="utype" type="vo-dml:UTYPE">
127 <xsd:annotation>
128 <xsd:documentation>
129 The utype of the Collection definition.
130 </xsd:documentation>
131 </xsd:annotation>
132 </xsd:element>
133 <xsd:element name="object" type="Object" minOccurs="0" maxOccurs="unbounded">
134 <xsd:annotation>
135 <xsd:documentation>
136 Objects contained in a parent container are always serialized inside the container.
137 </xsd:documentation>
138 </xsd:annotation>
139 </xsd:element>
140 </xsd:sequence>
141 </xsd:complexType>
142
143 <xsd:complexType name="Reference">
144 <xsd:sequence>
145 <xsd:element name="utype" type="vo-dml:UTYPE"/>
146 <xsd:element name="object-doc" type="xsd:anyURI" minOccurs="0">
147 <xsd:annotation>
148 <xsd:documentation>
149 Instance document containing the referenced object.
150 If not specified the current document is intended.
151 </xsd:documentation>
152 </xsd:annotation>
153 </xsd:element>
154 <xsd:element name="ref-id" type="ObjectId">
155 <xsd:annotation>
156 <xsd:documentation>
157 The id of the referenced object in the document indicated by object-doc.
158 I.e. in this serialization format referenced objects are NEVER contained within the referrer.
159 </xsd:documentation>
160 </xsd:annotation>
161 </xsd:element>
162 </xsd:sequence>
163 </xsd:complexType>
164
165
166 <xsd:element name="instance" type="Instance">
167 <xsd:unique name="unique-ids">
168 <xsd:selector xpath=".//object/id"/>
169 <xsd:field xpath="uri-id"/>
170 </xsd:unique>
171 </xsd:element>
172
173
174 </xsd:schema>

msdemlei@ari.uni-heidelberg.de
ViewVC Help
Powered by ViewVC 1.1.26