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

International booleans proposal

  • From: "Arnold, Curt" <Curt.Arnold@h...>
  • To: "'xml-dev@i...'" <xml-dev@i...>, "'www-xml-schema-comments@w...'" <www-xml-schema-comments@w...>
  • Date: Mon, 15 Nov 1999 11:50:10 -0700

element name enumeration
Hopefully this amounts to what Andrew Layman and Rick Jeliffe considers a
well-thought out alternative proposal.  I would appreciate any stones that
people could throw at it since I think it solves a lot of problems with
minimal additional functionality.

Basically, the idea is to add a few things to the enumeration and literal
elements to provide a minimum transform layer when extending datatypes.
Previous messages I've posted to the schema
http://lists.w3.org/Archives/Public/www-xml-schema-comments/1999JulSep/0053.
html and
http://lists.w3.org/Archives/Public/www-xml-schema-comments/1999JulSep/0029.
html were more ambitious.  This tries to get the essentials done for the
"international booleans" problems with the least amount of additional
functionality.

---------
Current version of datatypes

2.4.2.4 enumeration
[Definition:] Presence of an enumeration facet constrains the value space of
the datatype to the specified list. The enumeration facet can be applied to
to the following datatypes: string (§3.2.1), real (§3.2.3), timeInstant
(§3.2.4), timeDuration (§3.2.5), recurringInstant (§3.2.6), language
(§3.2.9), NMTOKEN (§3.3.1), Name (§3.3.3), NCName (§3.3.4), ENTITY (§3.3.8),
NOTATION (§3.3.10), decimal (§3.3.11), integer (§3.3.12),
non-negative-integer (§3.3.13), positive-integer (§3.3.14),
non-positive-integer (§3.3.15), negative-integer (§3.3.16), date (§3.3.17),
time (§3.3.18). No order or any other relationship is implied between the
elements of the enumeration list. 

New would have to be something like

[Definition:] Presence of an enumeration facet lists acceptible lexical
values for the datatype.  By default, an enumeration facet constrains the
lexical space to the enumerated values.

-------------

Example of enumerations

Currently:

<datatype name="holidays">   
   <basetype name="date"/>   
   <enumeration>   
      <literal>   
        --01-01    <!-- New Year's day -->   
      </literal>   
      <literal>   
        --07-04    <!-- 4th of July -->   
      </literal>   
      <literal>   
        --11-25    <!-- Thanksgiving -->   
      </literal>   
      <literal>   
        --12-25    <!-- Christmas -->   
      </literal>   
   </enumeration>   
</datatype>

Replace with (I've switched to fixed days in 2000, cause I have a
significant amount of issues with dates in the current draft covered in
different messages)

<datatype name="holidays">   
   <basetype name="date"/>   
   <enumeration>   
      <literal value="2000-01-01">
	NewYearsDay   
      </literal>   
      <literal value="2000-07-04">   
	FourthOfJuly
      </literal>   
      <literal value="2000-11-23">
	Thanksgiving   
      </literal>   
      <literal value="2000-12-25">
	Christmas   
      </literal>   
   </enumeration>   
</datatype>


----------------

Schema for datatypes:

Currently:

<element name='enumeration'> 
	<archetype>
		 <element ref='literal' minOccurs='1' maxOccurs='*'/> 
	</archetype> 
</element> 

<!-- the true datatype of the following depends on the basetype --> 
<element name='literal' type='string'/> 

Suggested replacement:

<element name='enumeration'> 
	<archetype>
		 <element ref='literal' minOccurs='1' maxOccurs='*'/> 
		<attribute name='model' type='NCName' default='closed'> 
			<enumeration> 
				<!--  lexical value may match one of the
enumerated values or 
					may be valid lexical value for base
type -->
				<literal>open</literal> 
				<!--  lexical value must match one of the
enumerated values  -->
				<literal>closed</literal> 
			</enumeration> 
		</attribute> 
	</archetype> 
</element> 

<!-- the true datatype of the following depends on the basetype --> 
<element name='literal' type='string'> 
	<archetype>
		<!-- if provided, the value is a representation of this
literal in the lexical space of the base type.
			if not provided, the content of the element is used
as the value -->
		<attribute name='value' type='string'/>
	</archetype>
</element>


--------------

Here is how this could be used for international booleans



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.