[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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"
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|