Skip to content

Commit

Permalink
update decoder schema for i18n
Browse files Browse the repository at this point in the history
  • Loading branch information
silverailscolo committed Mar 23, 2019
1 parent 3ac1ae1 commit 381f80f
Show file tree
Hide file tree
Showing 2 changed files with 96 additions and 23 deletions.
Expand Up @@ -547,7 +547,7 @@ public PaneProgFrame(DecoderFile pDecoderFile, @Nonnull RosterEntry pRosterEntry
* <li>Retrieves "productID" and "model attributes from the "model" element
* and "family" attribute from the roster entry. </li>
* <li>Then invokes DecoderFile.isIncluded() with the retrieved values.</li>
* <li>Deals deals gracefully with null or missing elements and
* <li>Deals gracefully with null or missing elements and
* attributes.</li>
* </ul>
*
Expand Down
117 changes: 95 additions & 22 deletions xml/schema/decoder-4-15-2.xsd
Expand Up @@ -150,7 +150,7 @@
</xs:attribute>
<xs:attribute name="transpRead" type="yesNoType" default="no">
<xs:annotation><xs:documentation>
Not a programming mode per say, this indicates that the
Not a programming mode per se, this indicates that the
decoder is capable of replying to CV reads via Digitrax Transponding.
</xs:documentation></xs:annotation>
</xs:attribute>
Expand Down Expand Up @@ -862,29 +862,10 @@
<xs:attribute name="display" type="temporalDisplayType" default="default"/>
</xs:complexType>
</xs:element>
<xs:element name="compositeVal" >
<xs:element name="compositeVal" type="CompositeValType">
<xs:annotation><xs:documentation>
A value made up of references to others
A fixed set of choices is defined, made up of references to others
</xs:documentation></xs:annotation>
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="compositeChoice" >
<xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="compositeSetting" >
<xs:complexType>
<xs:attribute name="label" type="xs:string" use="required"/>
<xs:attribute name="value" type="xs:int" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="choice" type="xs:string" use="required"/>
<xs:attribute name="comment" type="xs:string"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="comment" type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:element ref="xi:include" minOccurs="0" maxOccurs="1" />
</xs:choice>
Expand Down Expand Up @@ -1077,6 +1058,98 @@
<xs:attribute name="comment" type="xs:string"/>
</xs:complexType>

<xs:complexType name="CompositeValType">
<xs:annotation><xs:documentation>
A variable containing a fixed set of choices is defined, each choice corresponding to a specific value
</xs:documentation></xs:annotation>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element ref="docbook:copyright" minOccurs="0" maxOccurs="1">
<xs:annotation><xs:documentation>
DocBook element(s) providing copyright information in standard form.
For use in subfiles.
</xs:documentation></xs:annotation>
</xs:element>
<xs:element ref="docbook:authorgroup" minOccurs="0" maxOccurs="unbounded" >
<xs:annotation><xs:documentation>
DocBook element(s) describing the authors in standard form.
For use in subfiles.
</xs:documentation></xs:annotation>
</xs:element>
<xs:element ref="docbook:revhistory" minOccurs="0" maxOccurs="unbounded" >
<xs:annotation><xs:documentation>
DocBook element(s) describing the revision history in standard form.
For use in subfiles.
</xs:documentation></xs:annotation>
</xs:element>
<xs:element type="CompositeChoiceType" name="compositeChoice" minOccurs="0" maxOccurs="unbounded" />
<xs:element type="CompositeChoiceGroupType" name="compositeChoiceGroup" minOccurs="0" maxOccurs="unbounded" />
<xs:element ref="xi:include" minOccurs="0" maxOccurs="unbounded" />
</xs:sequence>
<xs:attribute ref="xml:base" />
<xs:attribute name="comment" type="xs:string"/>
</xs:complexType>

<xs:complexType name="CompositeChoiceType">
<xs:annotation><xs:documentation>
Defines one choice within a compositeVal element (may be grouped in one or more
intermediate compositeValGroup elements)
</xs:documentation></xs:annotation>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:annotation><xs:documentation>Multiple elements provide internationalized choice text</xs:documentation></xs:annotation>
<xs:element name="choice" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="comment" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="compositeSetting">
<xs:complexType>
<xs:attribute name="label" type="xs:string" use="required"/>
<xs:attribute name="value" type="xs:int" use="required" />
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="choice" type="xs:string">
<xs:annotation><xs:documentation>Deprecated in favor of the choice sub-element</xs:documentation></xs:annotation>
</xs:attribute>
<xs:attribute name="include" type="xs:string"/>
<xs:attribute name="exclude" type="xs:string"/>
<xs:attribute name="comment" type="xs:string"/>
</xs:complexType>

<xs:complexType name="CompositeChoiceGroupType">
<xs:annotation><xs:documentation>
Allows grouping of compositeValChoice elements within an CompositeValType element.
</xs:documentation></xs:annotation>
<xs:sequence minOccurs="1" maxOccurs="1">
<xs:element ref="docbook:copyright" minOccurs="0" maxOccurs="1">
<xs:annotation><xs:documentation>
DocBook element(s) providing copyright information in standard form.
For use in subfiles.
</xs:documentation></xs:annotation>
</xs:element>
<xs:element ref="docbook:authorgroup" minOccurs="0" maxOccurs="unbounded" >
<xs:annotation><xs:documentation>
DocBook element(s) describing the authors in standard form.
For use in subfiles.
</xs:documentation></xs:annotation>
</xs:element>
<xs:element ref="docbook:revhistory" minOccurs="0" maxOccurs="unbounded" >
<xs:annotation><xs:documentation>
DocBook element(s) describing the revision history in standard form.
For use in subfiles.
</xs:documentation></xs:annotation>
</xs:element>
<xs:element name="name" minOccurs="0" maxOccurs="unbounded">
<xs:annotation><xs:documentation>User-visible name for this group, can be repeated for I18N</xs:documentation></xs:annotation>
</xs:element>
<xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element type="CompositeChoiceType" name="compositeChoice" minOccurs="0" maxOccurs="unbounded"/>
<xs:element type="CompositeChoiceGroupType" name="compositeChoiceGroup" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:sequence>
<xs:attribute ref="xml:base" />
<xs:attribute name="include" type="xs:string"/>
<xs:attribute name="exclude" type="xs:string"/>
<xs:attribute name="comment" type="xs:string"/>
</xs:complexType>

<xs:simpleType name="maskType">
<xs:annotation>
<xs:documentation>
Expand Down

0 comments on commit 381f80f

Please sign in to comment.