- Render theme styles, closes #93

- Stream render theme, closes #161
This commit is contained in:
Emux
2016-09-03 17:13:55 +03:00
parent 290aee9a8b
commit 7c97ac5101
25 changed files with 667 additions and 219 deletions

View File

@@ -2,6 +2,7 @@
<xs:schema xmlns:tns="http://opensciencemap.org/rendertheme"
xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
targetNamespace="http://opensciencemap.org/rendertheme" xml:lang="en">
<!-- attribute types -->
<xs:simpleType name="cap">
<xs:restriction base="xs:string">
@@ -88,8 +89,38 @@
</xs:restriction>
</xs:simpleType>
<!-- style menu cat element -->
<xs:complexType name="cat">
<xs:attribute name="id" type="xs:string" use="required" />
</xs:complexType>
<!-- style menu name element -->
<xs:complexType name="name">
<xs:attribute name="lang" type="xs:string" use="required" />
<xs:attribute name="value" type="xs:string" use="required" />
</xs:complexType>
<!-- style menu overlay element -->
<xs:complexType name="overlay">
<xs:attribute name="id" type="xs:string" use="required" />
</xs:complexType>
<!-- style menu layer element -->
<xs:complexType name="layer">
<xs:sequence maxOccurs="1" minOccurs="0">
<xs:element name="name" maxOccurs="unbounded" minOccurs="0" type="tns:name" />
<xs:element name="cat" maxOccurs="unbounded" minOccurs="0" type="tns:cat" />
<xs:element name="overlay" maxOccurs="unbounded" minOccurs="0" type="tns:overlay" />
</xs:sequence>
<xs:attribute name="id" type="xs:string" use="required" />
<xs:attribute name="parent" type="xs:string" use="optional" />
<xs:attribute name="visible" default="false" type="xs:boolean" use="optional" />
<xs:attribute name="enabled" default="false" type="xs:boolean" use="optional" />
</xs:complexType>
<!-- rendering instructions -->
<xs:complexType name="area">
<xs:attribute name="cat" type="xs:string" use="optional" />
<xs:attribute name="id" default="0" type="xs:string" use="optional" />
<xs:attribute name="use" default="0" type="xs:string" use="optional" />
<xs:attribute name="src" type="tns:src" use="optional" />
@@ -103,6 +134,7 @@
</xs:complexType>
<xs:complexType name="caption">
<xs:attribute name="cat" type="xs:string" use="optional" />
<xs:attribute name="k" type="tns:textKey" use="required" />
<xs:attribute name="dy" default="0" type="xs:float" use="optional" />
<xs:attribute name="font-family" default="default" type="tns:fontFamily" use="optional" />
@@ -119,6 +151,7 @@
</xs:complexType>
<xs:complexType name="circle">
<xs:attribute name="cat" type="xs:string" use="optional" />
<xs:attribute name="radius" type="tns:nonNegativeFloat" use="required" />
<xs:attribute name="scale-radius" default="false" type="xs:boolean" use="optional" />
<xs:attribute name="fill" default="#00000000" type="tns:color" use="optional" />
@@ -127,6 +160,8 @@
</xs:complexType>
<xs:complexType name="line">
<xs:attribute name="cat" type="xs:string" use="optional" />
<!-- style: TODO only in style-line-->
<xs:attribute name="id" default="0" type="xs:string" use="optional" />
@@ -154,23 +189,24 @@
</xs:complexType>
<!-- <xs:complexType name="outline">
<xs:attribute name="name" type="xs:string" use="optional"
default="0" />
<xs:attribute name="src" type="tns:src" use="optional" />
<xs:attribute name="stroke" type="tns:color" use="optional"
default="#000000" />
<xs:attribute name="stroke-width" type="tns:nonNegativeFloat"
use="optional" default="0" />
</xs:complexType>
-->
<!--<xs:complexType name="outline">
<xs:attribute name="cat" type="xs:string" use="optional" />
<xs:attribute name="name" default="0" type="xs:string" use="optional" />
<xs:attribute name="src" type="tns:src" use="optional" />
<xs:attribute name="stroke" default="#000000" type="tns:color" use="optional" />
<xs:attribute name="stroke-width" default="0" type="tns:nonNegativeFloat" use="optional" />
</xs:complexType>-->
<xs:complexType name="lineSymbol">
<xs:attribute name="cat" type="xs:string" use="optional" />
<xs:attribute name="src" type="tns:src" use="required" />
<xs:attribute name="align-center" default="false" type="xs:boolean" use="optional" />
<xs:attribute name="repeat" default="false" type="xs:boolean" use="optional" />
</xs:complexType>
<xs:complexType name="text">
<xs:attribute name="cat" type="xs:string" use="optional" />
<xs:attribute name="id" default="0" type="xs:string" use="optional" />
<xs:attribute name="use" default="0" type="xs:string" use="optional" />
@@ -188,16 +224,17 @@
</xs:complexType>
<xs:complexType name="symbol">
<xs:attribute name="cat" type="xs:string" use="optional" />
<xs:attribute name="src" type="tns:src" use="required" />
</xs:complexType>
<xs:complexType name="extrusion">
<xs:attribute name="cat" type="xs:string" use="optional" />
<xs:attribute name="line-color" type="tns:color" use="optional" />
<xs:attribute name="side-color" type="tns:color" use="required" />
<xs:attribute name="top-color" type="tns:color" use="required" />
</xs:complexType>
<!-- match elements -->
<xs:complexType name="m">
<xs:choice maxOccurs="unbounded" minOccurs="0">
@@ -222,10 +259,10 @@
<xs:attribute name="e" type="tns:elementList" use="optional" />
<xs:attribute name="k" type="xs:string" use="optional" />
<xs:attribute name="v" type="xs:string" use="optional" />
<xs:attribute name="cat" type="xs:string" use="optional" />
<xs:attribute name="closed" default="any" type="tns:closed" use="optional" />
<xs:attribute name="zoom-min" default="0" type="xs:unsignedByte" use="optional" />
<xs:attribute name="zoom-max" default="127" type="xs:unsignedByte" use="optional" />
</xs:complexType>
<xs:complexType name="atlasRect">
@@ -240,9 +277,20 @@
<xs:attribute name="img" type="xs:string" use="required" />
</xs:complexType>
<!-- stylemenu element -->
<xs:complexType name="stylemenu">
<xs:sequence maxOccurs="1" minOccurs="0">
<xs:element name="layer" maxOccurs="unbounded" minOccurs="0" type="tns:layer" />
</xs:sequence>
<xs:attribute name="defaultvalue" type="xs:string" use="required" />
<xs:attribute name="defaultlang" type="xs:string" use="required" />
<xs:attribute name="id" type="xs:string" use="required" />
</xs:complexType>
<!-- rendertheme element -->
<xs:complexType name="rendertheme">
<xs:sequence maxOccurs="1" minOccurs="0">
<xs:element name="stylemenu" maxOccurs="1" minOccurs="0" type="tns:stylemenu" />
<!-- style definitions -->
<xs:sequence maxOccurs="256" minOccurs="0">
@@ -271,7 +319,6 @@
use="optional" />
</xs:complexType>
<!-- root element -->
<xs:element name="rendertheme" type="tns:rendertheme" />
</xs:schema>