Author: jleroux
Date: Sun May 20 10:19:29 2018
New Revision: 1831930
URL: http://svn.apache.org/viewvc?rev=1831930&view=rev
Log:
Improved: XML schemas should use predefined boolean type
(OFBIZ-10411)
To define boolean values, some ad-hoc enumeration of "true" and "false" are
repeatedly used. Since XML Schema defines a standard boolean datatype
better to use it.
For now only `site-conf.xsd` is fixed
Thanks: Mathieu Lirzin
Modified:
ofbiz/ofbiz-framework/trunk/framework/webapp/dtd/site-conf.xsd
Modified: ofbiz/ofbiz-framework/trunk/framework/webapp/dtd/site-conf.xsd
URL:
http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/webapp/dtd/site-conf.xsd?rev=1831930&r1=1831929&r2=1831930&view=diff
==============================================================================
--- ofbiz/ofbiz-framework/trunk/framework/webapp/dtd/site-conf.xsd (original)
+++ ofbiz/ofbiz-framework/trunk/framework/webapp/dtd/site-conf.xsd Sun May 20
10:19:29 2018
@@ -216,56 +216,26 @@ under the License.
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="edit" default="true">
+ <xs:attribute type="xs:boolean" name="edit" default="true">
<xs:annotation>
<xs:documentation>
Reserved for future use (not used yet).
</xs:documentation>
</xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="true"/>
- <xs:enumeration value="false"/>
- </xs:restriction>
- </xs:simpleType>
</xs:attribute>
- <xs:attribute name="track-visit" default="true">
+ <xs:attribute type="xs:boolean" name="track-visit" default="true">
<xs:annotation>
<xs:documentation>
Allow or not to track first visit (related to firstvisit
preprocessor).
</xs:documentation>
</xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="true"/>
- <xs:enumeration value="false">
- <xs:annotation>
- <xs:documentation>
- Don't track as first visit (related to
firstvisit preprocessor).
- </xs:documentation>
- </xs:annotation>
- </xs:enumeration>
- </xs:restriction>
- </xs:simpleType>
</xs:attribute>
- <xs:attribute name="track-serverhit" default="true">
+ <xs:attribute type="xs:boolean" name="track-serverhit" default="true">
<xs:annotation>
<xs:documentation>
Allow or not to track statistics.
</xs:documentation>
</xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="true"/>
- <xs:enumeration value="false">
- <xs:annotation>
- <xs:documentation>
- Don't track in the statistics.
- </xs:documentation>
- </xs:annotation>
- </xs:enumeration>
- </xs:restriction>
- </xs:simpleType>
</xs:attribute>
</xs:attributeGroup>
<xs:element name="security">
@@ -279,48 +249,29 @@ under the License.
</xs:complexType>
</xs:element>
<xs:attributeGroup name="attlist.security">
- <xs:attribute name="https" default="false">
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="true">
- <xs:annotation>
- <xs:documentation>
- Redirects to/uses/generates the secured HTTPS
protocol if necessary and possible
- </xs:documentation>
- </xs:annotation>
- </xs:enumeration>
- <xs:enumeration value="false"/>
- </xs:restriction>
- </xs:simpleType>
+ <xs:attribute type="xs:boolean" name="https" default="false">
+ <xs:annotation>
+ <xs:documentation>
+ If https=true, redirect to/use/generate the secured HTTPS
protocol if necessary and possible.
+ </xs:documentation>
+ </xs:annotation>
</xs:attribute>
- <xs:attribute name="auth" default="false">
+ <xs:attribute type="xs:boolean" name="auth" default="false">
<xs:annotation>
<xs:documentation>
If auth=true, when you hit the request if you are not
logged in you will be forwarded to the login page.
</xs:documentation>
</xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="true"/>
- <xs:enumeration value="false"/>
- </xs:restriction>
- </xs:simpleType>
</xs:attribute>
- <xs:attribute name="cert" default="false">
+ <xs:attribute type="xs:boolean" name="cert" default="false">
<xs:annotation>
<xs:documentation>
It true, check for HTTPS client (x.509) security.
If the request is not secured throws an exception
</xs:documentation>
</xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="true"/>
- <xs:enumeration value="false"/>
- </xs:restriction>
- </xs:simpleType>
</xs:attribute>
- <xs:attribute name="external-view" default="true">
+ <xs:attribute type="xs:boolean" name="external-view" default="true">
<xs:annotation>
<xs:documentation>
If false, prevent to pass a view through the url
("chaining" it after the request,
@@ -328,25 +279,13 @@ under the License.
Default to true.
</xs:documentation>
</xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="true"/>
- <xs:enumeration value="false"/>
- </xs:restriction>
- </xs:simpleType>
</xs:attribute>
- <xs:attribute name="direct-request" default="true">
+ <xs:attribute type="xs:boolean" name="direct-request" default="true">
<xs:annotation>
<xs:documentation>
If false the request can only be accessed in a chained
request, default to true.
</xs:documentation>
</xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="true"/>
- <xs:enumeration value="false"/>
- </xs:restriction>
- </xs:simpleType>
</xs:attribute>
</xs:attributeGroup>
<xs:element name="metric">
@@ -457,18 +396,12 @@ under the License.
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="global-transaction" default="true">
+ <xs:attribute type="xs:boolean" name="global-transaction"
default="true">
<xs:annotation>
<xs:documentation>
For service-multi, defines if the event should be wrapped
in a transaction, default to true
</xs:documentation>
</xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="true"/>
- <xs:enumeration value="false"/>
- </xs:restriction>
- </xs:simpleType>
</xs:attribute>
<xs:attribute name="transaction-timeout" type="xs:int" default="0">
<xs:annotation>
@@ -621,47 +554,29 @@ under the License.
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="save-last-view" default="false">
+ <xs:attribute type="xs:boolean" name="save-last-view" default="false">
<xs:annotation>
<xs:documentation>
Saves the last (previous) request's view for future use,
generally
with the view-last type of response.
</xs:documentation>
</xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="true"/>
- <xs:enumeration value="false"/>
- </xs:restriction>
- </xs:simpleType>
</xs:attribute>
- <xs:attribute name="save-current-view" default="false">
+ <xs:attribute type="xs:boolean" name="save-current-view"
default="false">
<xs:annotation>
<xs:documentation>
Saves the current request's view for future use, generally
with
the view-last type of response.
</xs:documentation>
</xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="true"/>
- <xs:enumeration value="false"/>
- </xs:restriction>
- </xs:simpleType>
</xs:attribute>
- <xs:attribute name="save-home-view" default="false">
+ <xs:attribute type="xs:boolean" name="save-home-view" default="false">
<xs:annotation>
<xs:documentation>
Saves the current request's view for future use, generally
with
the view-home type of response.
</xs:documentation>
</xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="true"/>
- <xs:enumeration value="false"/>
- </xs:restriction>
- </xs:simpleType>
</xs:attribute>
<xs:attribute name="status-code" type="xs:string">
<xs:annotation>
@@ -770,18 +685,12 @@ under the License.
</xs:documentation>
</xs:annotation>
</xs:attribute>
- <xs:attribute name="no-cache" default="false">
+ <xs:attribute type="xs:boolean" name="no-cache" default="false">
<xs:annotation>
<xs:documentation>
Send no-cache headers if set to true.
</xs:documentation>
</xs:annotation>
- <xs:simpleType>
- <xs:restriction base="xs:token">
- <xs:enumeration value="true"/>
- <xs:enumeration value="false"/>
- </xs:restriction>
- </xs:simpleType>
</xs:attribute>
<xs:attribute name="x-frame-options" default="sameorigin">
<xs:annotation>