[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

XML Schema enum and boolean

  • From: "Anders W. Tell" <anderst@t...>
  • To: xml-dev@i..., ricko@a...
  • Date: Thu, 11 Nov 1999 13:31:59 +0100

schema enum
Food for thoughts:

Add a bindings concept to XML schema to handle boolean ,
enumeration data types and language issues.

An binding is a sequence of pairs of value space expression and lexical
representation
where each value space expression must express a subspace (or equal) of
the
data types value space. The order of the pairs is important since it
defines a confliction
resolution order.


Examples:
<datatype name=”boolean”>
  <basetype name=”integer”/>
    <minInclusive>0</minInclusive>
    <maxInclusive>1</maxInclusive>
</datatype>

<datatype name=”myBoolean”>
    <basetype name=”boolean”/>
   <binding>
     <bind><value> 1 <value>  <pattern> [Tt][Rr][Ue][Ee]</pattern>
</bind>
     <bind><value> 0 <value>  <pattern> [Ff][Aa][Ll][Ss][Ee] </pattern>
</bind>
     <bind><value> 1 <value>  <literal> on </literal> </bind>
     <bind><value> 0 <value>  <literal> off </literal> </bind>
   </binding>
</datatype>

<-- Here the value space is the same but more acceptable lexical resp.
-->
<datatype name=”mySwedishBoolean”>
    <basetype name=”myBoolean”/>
  <binding>
     <bind><value> 1 <value>  <literal> sant </literal> </bind>
     <bind><value> 0 <value>  <literal> falskt </literal> </bind>
   </binding>
</datatype>

<-- Enumeration -->
<datatype name=”enum”>
  <basetype name=”integer”/>
</datatype>

<datatype name=”myByteColor”>
  <basetype name=”enum”/>
    <minInclusive>0</minInclusive>
    <maxInclusive>255</maxInclusive>
 <binding>
     <bind><value> 0 <value>  <literal> white </literal> </bind>
     <bind><value> 255 <value>  <literal> black </literal> </bind>
   </binding>
</datatype>

<datatype name=”mySwedishByteColor”>
  <basetype name=”myByteColor”/>
 <binding>
     <bind><value> 0 <value>  <literal> vit </literal> </bind>
     <bind><value> 255 <value>  <literal> svart </literal> </bind>
   </binding>
</datatype>


Thanks
/Anders
--
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
/  Financial Toolsmiths AB  /
/  Anders W. Tell           /
/_/_/_/_/_/_/_/_/_/_/_/_/_/_/



xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@i... the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)



PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.