Changeset 3839 in josm for trunk/data/tagging-preset.xsd


Ignore:
Timestamp:
2011-02-01T08:28:03+01:00 (13 years ago)
Author:
jttt
Message:

Fix #5893 Null Pointer Exception while loding custom presets at start - JOSM hangs on splash screen

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/data/tagging-preset.xsd

    r3793 r3839  
    11<?xml version="1.0" encoding="UTF-8"?>
    22<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://josm.openstreetmap.de/tagging-preset-1.0"
    3         xmlns:tns="http://josm.openstreetmap.de/tagging-preset-1.0" elementFormDefault="qualified">
    4 
    5         <!--
    6                 Localized attributes (for example de.description are not supported by
    7                 xsd, so every element needs <anyAttribute/>
    8                 To cover at least some common errors, elements have specified prohibited attributes
    9         -->
    10 
    11         <element name="annotations" type="tns:root"/>
    12         <element name="presets" type="tns:root"/>
     3        xmlns:tns="http://josm.openstreetmap.de/tagging-preset-1.0"
     4        elementFormDefault="qualified">
     5
     6        <!-- Localized attributes (for example de.description are not supported
     7                by xsd, so every element needs <anyAttribute/> To cover at least some common
     8                errors, elements have specified prohibited attributes -->
     9
     10        <element name="annotations" type="tns:root" />
     11        <element name="presets" type="tns:root" />
    1312
    1413        <complexType name="root">
    1514                <complexContent>
    16                         <extension base="tns:group">
     15                        <extension base="tns:group-parent">
    1716                                <attribute name="author" type="string" />
    1817                                <attribute name="version" type="string" />
    1918                                <attribute name="shortdescription" type="string" />
    2019                                <attribute name="description" type="string" />
    21                                 <attribute name="link" type="string"/>
    22 
    23                                 <anyAttribute processContents="skip"/>
     20                                <attribute name="link" type="string" />
     21
     22                                <anyAttribute processContents="skip" />
    2423                        </extension>
    2524                </complexContent>
    2625        </complexType>
    2726
    28         <complexType name="group">
     27        <complexType name="group-parent">
    2928                <sequence>
    3029                        <choice minOccurs="1" maxOccurs="unbounded">
     
    3433                        </choice>
    3534                </sequence>
    36                 <attribute name="name" type="string" />
    3735                <attribute name="icon" type="string" />
    3836
    39                 <attribute name="type" use="prohibited"/>
    40                 <attribute name="text" use="prohibited"/>
    41                 <anyAttribute processContents="skip"/>
     37                <attribute name="type" use="prohibited" />
     38                <attribute name="text" use="prohibited" />
     39                <anyAttribute processContents="skip" />
     40        </complexType>
     41
     42        <complexType name="group">
     43                <complexContent>
     44                        <extension base="tns:group-parent">
     45                                <attribute name="name" type="string" use="required" />
     46                        </extension>
     47                </complexContent>
    4248        </complexType>
    4349
     
    5359                        <element name="roles" type="tns:roles" minOccurs="0" />
    5460                </sequence>
    55                 <attribute name="name" type="string" />
     61                <attribute name="name" type="string" use="required" />
    5662                <attribute name="icon" type="string" />
    5763                <attribute name="type" type="string" />
    5864
    59                 <attribute name="text" use="prohibited"/>
    60                 <anyAttribute processContents="skip"/>
     65                <attribute name="text" use="prohibited" />
     66                <anyAttribute processContents="skip" />
    6167        </complexType>
    6268
     
    7884
    7985        <complexType name="key">
    80                 <attribute name="key" type="string" use="required"/>
    81                 <attribute name="value" type="string"/>
     86                <attribute name="key" type="string" use="required" />
     87                <attribute name="value" type="string" />
    8288        </complexType>
    8389
     
    8894                <attribute name="text_context" type="string" />
    8995
    90                 <attribute name="name" use="prohibited"/>
    91                 <anyAttribute processContents="skip"/>
     96                <attribute name="name" use="prohibited" />
     97                <anyAttribute processContents="skip" />
    9298        </complexType>
    9399
     
    96102                <attribute name="text_context" type="string" />
    97103
    98                 <attribute name="name" use="prohibited"/>
    99                 <anyAttribute processContents="skip"/>
     104                <attribute name="name" use="prohibited" />
     105                <anyAttribute processContents="skip" />
    100106        </complexType>
    101107
     
    103109
    104110        <complexType name="text">
    105                 <attribute name="key" type="string" use="required"/>
     111                <attribute name="key" type="string" use="required" />
    106112                <attribute name="text" type="string" />
    107113                <attribute name="text_context" type="string" />
     
    109115                <attribute name="delete_if_empty" type="boolean" />
    110116                <attribute name="use_last_as_default" type="boolean" />
    111                 <attribute name="required" type="boolean"/>
    112 
    113                 <attribute name="type" use="prohibited"/>
    114                 <attribute name="name" use="prohibited"/>
    115                 <attribute name="value" use="prohibited"/>
    116                 <attribute name="values" use="prohibited"/>
    117                 <anyAttribute processContents="skip"/>
     117                <attribute name="required" type="boolean" />
     118
     119                <attribute name="type" use="prohibited" />
     120                <attribute name="name" use="prohibited" />
     121                <attribute name="value" use="prohibited" />
     122                <attribute name="values" use="prohibited" />
     123                <anyAttribute processContents="skip" />
    118124        </complexType>
    119125
    120126        <complexType name="combo">
    121127                <sequence>
    122                         <element name="short_description" type="string" minOccurs="0" maxOccurs="unbounded"/>
     128                        <element name="short_description" type="string" minOccurs="0"
     129                                maxOccurs="unbounded" />
    123130                </sequence>
    124131                <attribute name="key" type="string" use="required" />
     
    127134                <attribute name="values" type="string" use="required" />
    128135                <attribute name="values_context" type="string" />
    129                 <attribute name="display_values" type="string"/>
     136                <attribute name="display_values" type="string" />
    130137                <attribute name="default" type="string" />
    131138                <attribute name="editable" type="boolean" />
    132139                <attribute name="delete_if_empty" type="boolean" />
    133                 <attribute name="required" type="boolean"/>
    134 
    135                 <attribute name="type" use="prohibited"/>
    136                 <attribute name="value" use="prohibited"/>
    137                 <attribute name="name" use="prohibited"/>
    138                 <attribute name="delete-if-empty" use="prohibited"/>
    139                 <attribute name="display-values" use="prohibited"/>
    140                 <anyAttribute processContents="skip"/>
     140                <attribute name="required" type="boolean" />
     141
     142                <attribute name="type" use="prohibited" />
     143                <attribute name="value" use="prohibited" />
     144                <attribute name="name" use="prohibited" />
     145                <attribute name="delete-if-empty" use="prohibited" />
     146                <attribute name="display-values" use="prohibited" />
     147                <anyAttribute processContents="skip" />
    141148        </complexType>
    142149
     
    147154                <attribute name="values" type="string" use="required" />
    148155                <attribute name="values_context" type="string" />
    149                 <attribute name="display_values" type="string"/>
     156                <attribute name="display_values" type="string" />
    150157                <attribute name="default" type="string" />
    151158                <attribute name="delimiter" type="string" />
    152159                <attribute name="delete_if_empty" type="boolean" />
    153                 <attribute name="required" type="boolean"/>
    154 
    155                 <attribute name="type" use="prohibited"/>
    156                 <attribute name="value" use="prohibited"/>
    157                 <attribute name="name" use="prohibited"/>
    158                 <attribute name="delete-if-empty" use="prohibited"/>
    159                 <attribute name="display-values" use="prohibited"/>
    160                 <anyAttribute processContents="skip"/>
     160                <attribute name="required" type="boolean" />
     161
     162                <attribute name="type" use="prohibited" />
     163                <attribute name="value" use="prohibited" />
     164                <attribute name="name" use="prohibited" />
     165                <attribute name="delete-if-empty" use="prohibited" />
     166                <attribute name="display-values" use="prohibited" />
     167                <anyAttribute processContents="skip" />
    161168        </complexType>
    162169
     
    167174                <attribute name="default" type="tns:check_default" />
    168175                <attribute name="use_last_as_default" type="boolean" />
    169                 <attribute name="required" type="boolean"/>
    170                 <attribute name="value_on" type="string"/>
    171                 <attribute name="value_off" type="string"/>
    172 
    173                 <attribute name="name" use="prohibited"/>
    174                 <attribute name="type" use="prohibited"/>
    175                 <attribute name="value" use="prohibited"/>
    176                 <anyAttribute processContents="skip"/>
     176                <attribute name="required" type="boolean" />
     177                <attribute name="value_on" type="string" />
     178                <attribute name="value_off" type="string" />
     179
     180                <attribute name="name" use="prohibited" />
     181                <attribute name="type" use="prohibited" />
     182                <attribute name="value" use="prohibited" />
     183                <anyAttribute processContents="skip" />
    177184        </complexType>
    178185
     
    186193        <complexType name="roles">
    187194                <sequence>
    188                         <element name="role" type="tns:role" minOccurs="1" maxOccurs="unbounded"/>
     195                        <element name="role" type="tns:role" minOccurs="1" maxOccurs="unbounded" />
    189196                </sequence>
    190197        </complexType>
    191198
    192199        <complexType name="role">
    193                 <attribute name="key" type="string"/>
    194                 <attribute name="text" type="string"/>
    195                 <attribute name="text_context" type="string"/>
    196                 <attribute name="requisite" type="tns:role_requisite"/>
    197                 <attribute name="type" type="string"/>
    198                 <attribute name="count" type="integer"/>
    199                 <attribute name="required" type="boolean"/>
     200                <attribute name="key" type="string" />
     201                <attribute name="text" type="string" />
     202                <attribute name="text_context" type="string" />
     203                <attribute name="requisite" type="tns:role_requisite" />
     204                <attribute name="type" type="string" />
     205                <attribute name="count" type="integer" />
     206                <attribute name="required" type="boolean" />
    200207        </complexType>
    201208
    202209        <simpleType name="role_requisite">
    203210                <restriction base="string">
    204                         <enumeration value="required"/>
    205                         <enumeration value="optional"/>
     211                        <enumeration value="required" />
     212                        <enumeration value="optional" />
    206213                </restriction>
    207214        </simpleType>
Note: See TracChangeset for help on using the changeset viewer.