PageRenderTime 356ms CodeModel.GetById 78ms app.highlight 6ms RepoModel.GetById 164ms app.codeStats 0ms

/indra/newview/app_settings/llsd.xsd

https://bitbucket.org/lindenlab/viewer-beta/
XML Schema | 131 lines | 116 code | 15 blank | 0 comment | 0 complexity | 647b053f5a125ba514bbf225d68e6f7c MD5 | raw file
  1<?xml version="1.0"?>
  2<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  3
  4        <!-- LLSD document has exactly one value -->
  5	<xsd:element name="llsd">
  6		<xsd:complexType>                        
  7                        <xsd:group ref="llsd-value" />
  8		</xsd:complexType>
  9	</xsd:element>
 10
 11        <!-- Value is one of undef, boolean, integer, real, 
 12             uuid, string, date, binary, array, or map -->
 13        <xsd:group name="llsd-value">
 14                <xsd:choice>
 15        		<xsd:element ref="undef"/>
 16        		<xsd:element ref="boolean"/>
 17        		<xsd:element ref="integer"/>
 18        		<xsd:element ref="real"/>
 19        		<xsd:element ref="uuid"/>
 20        		<xsd:element ref="string"/>
 21        		<xsd:element ref="date"/>
 22			<xsd:element ref="uri"/>
 23			<xsd:element ref="binary"/>
 24			<xsd:element ref="array"/>
 25			<xsd:element ref="map"/>
 26                </xsd:choice>
 27        </xsd:group>
 28
 29        <!-- Undefined is an empty eleemnt -->
 30	<xsd:element name="undef">
 31		<xsd:simpleType>
 32                        <xsd:restriction base="xsd:string">
 33                             <xsd:length value="0" />
 34                        </xsd:restriction>
 35                </xsd:simpleType>
 36        </xsd:element>
 37
 38        <!-- Boolean is true or false -->
 39	<xsd:element name="boolean">
 40		<xsd:simpleType>
 41			<xsd:restriction base="xsd:string">
 42				<xsd:enumeration value="true" />
 43				<xsd:enumeration value="false" />
 44
 45                                <!-- In practice, these other serializations are seen: -->
 46				<xsd:enumeration value="" />
 47				<xsd:enumeration value="1" />
 48				<xsd:enumeration value="0" />
 49			</xsd:restriction>
 50		</xsd:simpleType>
 51	</xsd:element>
 52
 53        <!-- Integer is restricted to 32-bit signed values -->
 54	<xsd:element name="integer">
 55		<xsd:simpleType>
 56			<xsd:restriction base="xsd:int" />
 57		</xsd:simpleType>
 58	</xsd:element>
 59
 60        <!-- Real is an IEEE 754 "double" value, including Infinities and NaN -->
 61	<xsd:element name="real">
 62		<xsd:simpleType>
 63                        <!-- TODO: xsd:double uses "INF", "-INF", and "NaN",
 64                        whereas LLSD prefers "Infinity", "-Infinity" and "NaN" -->
 65			<xsd:restriction base="xsd:double" />
 66		</xsd:simpleType>
 67	</xsd:element>
 68
 69        <!-- UUID per RFC 4122 -->
 70	<xsd:element name="uuid">
 71		<xsd:simpleType>
 72			<xsd:restriction base="xsd:string">
 73				<xsd:pattern value="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}|" />
 74			</xsd:restriction>
 75		</xsd:simpleType>
 76	</xsd:element>
 77
 78        <!-- String is any sequence of Unicode characters -->
 79	<xsd:element name="string">
 80		<xsd:simpleType>
 81			<xsd:restriction base="xsd:string" />
 82		</xsd:simpleType>
 83	</xsd:element>
 84
 85        <!-- Date is ISO 8601 in UTC -->
 86	<xsd:element name="date">
 87		<xsd:simpleType>
 88			<xsd:restriction base="xsd:dateTime">
 89                                <!-- Restrict to UTC (Z) times -->
 90                                <xsd:pattern value="[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\.[0-9]+)?Z" />
 91			</xsd:restriction>
 92		</xsd:simpleType>
 93	</xsd:element>
 94
 95        <!-- URI per RFC 3986 -->
 96	<xsd:element name="uri">
 97		<xsd:simpleType>
 98			<xsd:restriction base="xsd:anyURI" />
 99		</xsd:simpleType>
100	</xsd:element>
101
102        <!-- Binary data is base64 encoded -->
103	<xsd:element name="binary">
104		<xsd:simpleType>
105                        <!-- TODO: Require encoding attribute? -->
106			<xsd:restriction base="xsd:base64Binary" />
107		</xsd:simpleType>
108	</xsd:element>
109
110        <!-- Array is a sequence of zero or more values -->
111	<xsd:element name="array">
112		<xsd:complexType>
113                        <xsd:group minOccurs="0" maxOccurs="unbounded" ref="llsd-value" />
114		</xsd:complexType>
115	</xsd:element>
116
117        <!-- Map is a sequence of zero or more key/value pairs -->
118	<xsd:element name="map">
119		<xsd:complexType>
120			<xsd:sequence minOccurs="0" maxOccurs="unbounded">
121				<xsd:element name="key">
122                                	<xsd:simpleType>
123                                        	<xsd:restriction base="xsd:string" />
124                                        </xsd:simpleType>
125				</xsd:element>
126                                <xsd:group ref="llsd-value" />
127			</xsd:sequence>
128		</xsd:complexType>
129	</xsd:element>
130
131</xsd:schema>