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 ]

I have to admire the evil genius of a man who can pursue both sides of a
debate...

I was thinking of something similar, but still perhaps compatible with
Namespaces in XML:

<myns:root
    xmlns:myns="http://www.example.com/myns";
    xmlns:tmltype="http://www.tmltypes.org";
    tmltype:int="http://www.tmltypes.org/integer";
    tmltype:boolean="http://www.tmltype.org/boolean";>
	<myns:foo  boolean:flag="true"/>
                <myns:int:fum>1234</myns:int:fum>
</myns>

I believe the double colons to be legal, and I think that only the first
prefix will be interpreted as a namespace prefix. That leaves any remaining
"prefix" as type information that can be processed by a filter.  I haven't
tried this, and it may cause problems with some parsers, but the idea might
just be screwy enough to work.

Verbose, and no schema required (but optional).

Again, I wouldn't call this XML.  It would be nice to have it behave like
XML, however.


> -----Original Message-----
> From: Simon St.Laurent [mailto:simonstl@simonstl.com]
> Sent: Tuesday, August 06, 2002 11:22 AM
> To: xml-dev@lists.xml.org
> Subject: RE: [xml-dev] Iceberg development (was Re: [xml-dev] maps)
> 
> 
> 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
> 
> 
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
> 
> The list archives are at http://lists.xml.org/archives/xml-dev/
> 
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://lists.xml.org/ob/adm.pl>
> 




 

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

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