Skip to content

Commit

Permalink
1) Allow binding element devoid of entries, re #15. 2) Remove trailin…
Browse files Browse the repository at this point in the history
…g whitespace.
  • Loading branch information
safris committed Apr 28, 2024
1 parent dc389ab commit ebe6c19
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
22 changes: 11 additions & 11 deletions schema-0.5/binding-0.5.jsdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

<import namespace="http://www.jsonx.org/schema-0.5.jsdx" schemaLocation="http://www.jsonx.org/schema-0.5.jsdx"><xi:include href="http://www.jsonx.org/schema-0.5.jsdx"/></import>
<import namespace="http://www.jsonx.org/include-0.5.jsdx" schemaLocation="http://www.jsonx.org/include-0.5.jsdx"><xi:include href="http://www.jsonx.org/include-0.5.jsdx"/></import>

<string name="nonEmptyString" pattern="\S|\S.*\S"/>
<string name="typeIdentifier" pattern="(([a-zA-Z_$][a-zA-Z\d_$]*)\.)*[a-zA-Z_$][a-zA-Z\d_$]*(\[\])?"/>
<string name="methodIdentifier" pattern="(([a-zA-Z_$][a-zA-Z\d_$]*)\.)*[a-zA-Z_$][a-zA-Z\d_$]*(\.&lt;init&gt;)?"/>
Expand All @@ -50,48 +50,48 @@
<object name="fieldBindings" abstract="true">
<property names="\S|\S.*\S" xsi:type="any" types="fieldBinding" nullable="false"/>
</object>

<object name="typeFieldBindings" abstract="true">
<property names="\S|\S.*\S" xsi:type="any" types="typeFieldBinding" nullable="false"/>
</object>

<object name="codecTypeFieldBindings" abstract="true">
<property names="\S|\S.*\S" xsi:type="any" types="codecTypeFieldBinding" nullable="false"/>
</object>

<object name="any" extends="fieldBindings">
<property name="@" xsi:type="string" pattern="any" nullable="false"/>
</object>

<object name="reference" extends="fieldBindings">
<property name="@" xsi:type="string" pattern="reference" nullable="false"/>
</object>

<object name="array" extends="fieldBindings">
<property name="@" xsi:type="string" pattern="array" nullable="false"/>
</object>

<object name="object" extends="typeFieldBindings">
<property name="@" xsi:type="string" pattern="object" nullable="false"/>
</object>

<object name="boolean" extends="codecTypeFieldBindings">
<property name="@" xsi:type="string" pattern="boolean" nullable="false"/>
</object>

<object name="number" extends="codecTypeFieldBindings">
<property name="@" xsi:type="string" pattern="number" nullable="false"/>
</object>

<object name="string" extends="codecTypeFieldBindings">
<property name="@" xsi:type="string" pattern="string" nullable="false"/>
</object>

<object name="binding">
<property name="@ns" xsi:type="string" pattern="http://www.jsonx.org/binding-0.5.jsd" nullable="false"/>
<property name="@schemaLocation" xsi:type="string" pattern="((\S|\S.*\S) (\S|\S.*\S))+" use="optional" nullable="false"/>
<property names="@schema" xsi:type="any" types="jx:schema ji:include" nullable="false"/>
<property names="\S|\S.*\S" xsi:type="any" types="any reference array object boolean number string" nullable="false"/>
</object>

</schema>
10 changes: 5 additions & 5 deletions schema-0.5/binding-0.5.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

<xs:import namespace="http://www.openjax.org/xml/datatypes-0.9.xsd" schemaLocation="http://www.openjax.org/xml/datatypes-0.9.xsd"/>
<xs:import namespace="http://www.jsonx.org/schema-0.5.xsd" schemaLocation="http://www.jsonx.org/schema-0.5.xsd"/>

<xs:simpleType name="methodIdentifier">
<xs:restriction base="xs:string">
<xs:pattern value="(([a-zA-Z_$][a-zA-Z\d_$]*)\.)*[a-zA-Z_$][a-zA-Z\d_$]*(\.&lt;init&gt;)?"/>
Expand Down Expand Up @@ -58,7 +58,7 @@
</xs:annotation>
</xs:attribute>
</xs:complexType>

<xs:complexType name="typeFieldBinding">
<xs:complexContent>
<xs:extension base="jb:fieldBinding">
Expand Down Expand Up @@ -88,7 +88,7 @@
</xs:extension>
</xs:complexContent>
</xs:complexType>

<xs:complexType name="path" abstract="true">
<xs:attribute name="path">
<xs:simpleType>
Expand Down Expand Up @@ -131,9 +131,9 @@

<xs:element name="binding">
<xs:complexType>
<xs:sequence>
<xs:sequence minOccurs="0">
<xs:element ref="jx:schema"/>
<xs:choice maxOccurs="unbounded">
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="any" maxOccurs="unbounded">
<xs:complexType>
<xs:complexContent>
Expand Down
2 changes: 1 addition & 1 deletion schema-0.5/include-0.5.jsdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
xmlns:jxns="http://www.jsonx.org/namespace"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.jsonx.org/schema-0.5.xsd schema-0.5.xsd"

jxns:jx="http://www.jsonx.org/schema-0.5.jsdx"
targetNamespace="http://www.jsonx.org/include-0.5.jsdx">

Expand Down
6 changes: 3 additions & 3 deletions schema-0.5/schema-0.5.jsdx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
</object>

<object name="member" abstract="true" extends="documented"/>

<object name="import">
<property name="@namespace" xsi:type="reference" type="nonEmptyString" nullable="false" use="optional"/>
<property name="@schemaLocation" xsi:type="reference" type="schemaLocation" use="optional" nullable="false"/>
Expand All @@ -49,7 +49,7 @@
</property>
<property names="[a-zA-Z_][-a-zA-Z\d_]*" xsi:type="any" types="array boolean number objectType string" nullable="false"/>
</object>

<object name="any" extends="member" abstract="true">
<property name="@" xsi:type="string" pattern="any" nullable="false"/>
<property name="@types" xsi:type="reference" type="nonEmptyString" use="optional" nullable="false"/>
Expand Down Expand Up @@ -164,5 +164,5 @@
<property name="@minOccurs" xsi:type="reference" type="min" use="optional" nullable="false"/>
<property name="@maxOccurs" xsi:type="reference" type="max" use="optional" nullable="false"/>
</object>

</schema>
2 changes: 1 addition & 1 deletion schema-0.5/schema-0.5.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
</xs:extension>
</xs:complexContent>
</xs:complexType>

<xs:complexType name="reference">
<xs:complexContent>
<xs:extension base="jx:referenceMember">
Expand Down

0 comments on commit ebe6c19

Please sign in to comment.