[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Re: maps
An unpopular (but possible with current technology) answer is that the ° and ' and " and even N|S|E|W stuff is window dressing, and that the actual value is just a number: <zoo> <name>Utica Zoo</name> <lat>75.25</lat> <long>43.08333333333333</long> </zoo> S and E values would be a negative number, etc. .micah From: Simon St.Laurent [mailto:simonstl@s...] Sent: Sunday, August 04, 2002 1:51 PM To: Liam Quin Cc: xml-dev@l... Subject: Re: maps At 03:51 PM 8/4/2002 -0400, Liam Quin wrote: >[I have cc' postmaster@x... becasue none of my xml dev posts in the past > year or two seem to have made it to the list] This seems to be a continuing problem for some folks. (I'll happy forward messages to xml-dev if that helps.) >On Sun, Aug 04, 2002 at 12:43:36PM -0400, Simon St.Laurent wrote: > > There's no type in WXS for locations. I can't use the built-in types to > > express something like: > > > > <zoo> > > <name>Utica Zoo</name> > > <lat>75°15'00" N</lat> > > <long>43°05'00" W</long> > > </zoo> > > > >It sounds like you're hankering after some of the minimisation featuers >in SGML -data tag, shortref, etc. No, I'm looking for a cleaner approach to mapping between the lexical and value spaces that lets me map the lexical space to my own value spaces - value spaces which can be represented explicitly (if verbosely) in markup, at that. >The XML way to do this, I claim, is ><zoo> > <name>Utica Zoo</name> > <lat> > <deg>75</deg> > <min>15</min> > </lat> > <long> > <deg>43</deg> > <min>05</min> > </long> ></zoo> > >Now you can represent both lat and long in W3C XML Schema. But that's simply a bizarre way to make me type more. A smarter approach is to let humans (or GPS gadgets) type 75°15'00" N and provide a mapping from that to a value structure. Using Regular Fragmentations, I can use regular expressions break that down into: <lat><deg>75</deg><min>15</min><sec>00</sec><hem>N</hem></lat> If the normalized form you present above is so obviously good, then how exactly did we get stuck with gHorribleKluge and a variety of other nastiness? I'd guess we got there by focusing on notions of strong typing from other aspects of computing - which, I've argued previously, are simply a bad fit for markup. >XML is a way to represent structure. You aer saying that it is flawed >because it doesn't natively understand arbitrary other ways to >represent structure. But that is not a goal of XML. Neither was >terseness, of course :-) Unfortunately, that's a goal that W3C XML Schema expressly sets out to achieve and then falls flat on its face for any but a tiny number of mappings from lexical to value. It is both too much (a huge pile of spec to implement) and too little (for cartographers, anyone who cares about units, etc.) 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>
|
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
|