OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   International booleans proposal

[ Lists Home | Date Index | Thread Index ]
  • From: "Arnold, Curt" <Curt.Arnold@hyprotech.com>
  • To: "'xml-dev@ic.ac.uk'" <xml-dev@ic.ac.uk>, "'www-xml-schema-comments@w3.org'" <www-xml-schema-comments@w3.org>
  • Date: Mon, 15 Nov 1999 11:50:10 -0700

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@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@ic.ac.uk the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)






 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS