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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] Iceberg development (was Re: [xml-dev] maps)

[ Lists Home | Date Index | Thread Index ]

At 10:44 AM 8/6/2002 -0700, Jeff Lowery wrote:
>And then maybe we should just shove type information in the documents
>themselves. I think you could subvert the namespace prefix mechanism to do
>just that.  Truly evil.  But we needn't call it XML. Call it Typed
>Metalanguage (TML), and make it backwards compatible with XML.

I was going to create POND (Perversely Oriented Namespace Datatypes) after 
XML 2001 but never got around to it.

This was as far as I got (note the old set of WXS datatypes, alas):
---------------------------
Perversely Oriented Namespace Datatypes (POND)

POND permits developers to use XML Namespaces in a manner quite different 
from their "proper" purpose of disambiguating vocabulary. Using namespaces 
to identify datatypes is not "best practices" by any stretch of the 
imagination - indeed, it may be a "worst practice".  POND is quite purely 
an implementation of a thought-experiment that hopes to stretch the 
boundaries of how people think about namespaces and markup in general.

POND offers its own types, identified as namespaces, which conform to the 
W3C XML Schema built-in types.  POND could be extensible, but that would be 
a large step toward encouraging what many developers would argue is 
disastrous practice, so I've restrained myself to relatively simple abuses.

Types are identified by the following URIs:
(Temporary list from the XML Schema CR - needs update.)
http://simonstl.com/ns/pond/string
http://simonstl.com/ns/pond/boolean
http://simonstl.com/ns/pond/float
http://simonstl.com/ns/pond/double
http://simonstl.com/ns/pond/decimal
http://simonstl.com/ns/pond/timeDuration
http://simonstl.com/ns/pond/recurringDuration
http://simonstl.com/ns/pond/binary
http://simonstl.com/ns/pond/uriReference
http://simonstl.com/ns/pond/ID
http://simonstl.com/ns/pond/IDREF
http://simonstl.com/ns/pond/ENTITY
http://simonstl.com/ns/pond/QName
http://simonstl.com/ns/pond/CDATA
http://simonstl.com/ns/pond/token
http://simonstl.com/ns/pond/language
http://simonstl.com/ns/pond/IDREFS
http://simonstl.com/ns/pond/ENTITIES
http://simonstl.com/ns/pond/NMTOKEN
http://simonstl.com/ns/pond/NMTOKENS
http://simonstl.com/ns/pond/Name
http://simonstl.com/ns/pond/NCName
http://simonstl.com/ns/pond/NOTATION
http://simonstl.com/ns/pond/integer
http://simonstl.com/ns/pond/nonPositiveInteger
http://simonstl.com/ns/pond/negativeInteger
http://simonstl.com/ns/pond/long
http://simonstl.com/ns/pond/int
http://simonstl.com/ns/pond/short
http://simonstl.com/ns/pond/byte
http://simonstl.com/ns/pond/nonNegativeInteger
http://simonstl.com/ns/pond/unsignedLong
http://simonstl.com/ns/pond/unsignedInt
http://simonstl.com/ns/pond/unsignedShort
http://simonstl.com/ns/pond/unsignedByte
http://simonstl.com/ns/pond/positiveInteger
http://simonstl.com/ns/pond/timeInstant
http://simonstl.com/ns/pond/time
http://simonstl.com/ns/pond/timePeriod
http://simonstl.com/ns/pond/date
http://simonstl.com/ns/pond/month
http://simonstl.com/ns/pond/year
http://simonstl.com/ns/pond/century
http://simonstl.com/ns/pond/recurringDate
http://simonstl.com/ns/pond/recurringCentury

For example, a document containing strings and integers might look like:

<container xmlns:string="http://simonstl.com/ns/pond/string"; 
xmlns:int="http://simonstl.com/ns/pond/int";>
    <string:firstName>Simon</string:firstName>
    <string:lastName>St.Laurent</string:lastName>
    <int:age>31</int:age>
</container>

POND will provide a SAXFilter which verifies the types (using the datatypes 
library in Sun's MSV) and reports type errors as warnings - ErrorHandler 
probably for now, letting the app conclude if it's worth throwing an Exception.

Simon St.Laurent
"Every day in every way I'm getting better and better." - Emile Coue





 

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

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