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

Re: maps


Re: maps
Uche Ogbuji scripsit:

> Simon has brought up the more 
> practical geospatial example.  But the folks who could clean up this mess 
> mostly just take in all the warnings and blithely respond "sorry we had to 
> satisfy OO and relational data type needs from our chartered requirements".

Here's a sketch of a way through the problem.  Define an (XML-based,
why not?) regex-based expression language for datatypes.  Then write
interpreters for this language that export appropriate datatypes
to RELAX NG schema validators and other tools.

<library uri="http://http://www.w3.org/2001/XMLSchema-datatypes">
        <datatype "boolean">
                <rule regex="true|1" value="true"/>
                <rule regex="false|0" value="false"/>
        </datatype>
        <datatype "integer">
                <rule regex="+0" value="0"/>
                <rule regex="-0" value="0"/>
                <rule regex="0" value="0"/>
                <rule regex="+0*([1-9][0-9]*)" value="\1"/>
                <rule regex="-0*([1-9][0-9]*)" value="-\1"/>
                <rule regex="0*([1-9][0-9]*)" value="\1"/>
        </datatype>
</library>

This syntax does not handle constraining facets yet; I leave it up
to someone else to figure out how to integrate these.  The basic
questions "Is this string lexical?" and "Do these strings have strings the same
value?" are mapped to "Does this string match any regex?" and "When
mapped into the corresponding values, are these two strings identical?"

> And so the Titanic lumbers on.  Nought but the iceberg itself will alter its 
> course.

Nevertheless some people may decide to get off the boat first.

-- 
John Cowan                                <jcowan@r...>     
http://www.reutershealth.com              http://www.ccil.org/~cowan
Yakka foob mog.  Grug pubbawup zink wattoom gazork.  Chumble spuzz.
    -- Calvin, giving Newton's First Law "in his own words"

  • Follow-Ups:

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.