|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Names, Dates, Etc.
> >For all of these, we need architectures rather than markup languages > >per se, because applications may need more than one name, date, > >or money amount. I've actually hit this in a recent project which is using all three of these data types. I have to say I got myself a bit confused; in traditional data modelling we distinguish between the property name (e.g. recipient) and the domain (e.g. personalName), and I wasn't at all sure which of these to use as the XML element name, especially when the element had sub-structure. I guess architectural forms would have helped here, but they aren't mainstream XML. I toyed with double nesting (e.g. <recipient><personalName>Fred</personalName></recipient> but this seems horribly clumsy. I also thought of using a fixed attribute (dataType="personalName") in the DTD, but I don't particularly like fixed attributes e.g. because they vanish when you use a non-validating parser. In the end I just used the property name (<recipient>) and left the data type as implicit, something the receiving application is expected to know. Anyone have any better ideas? Mike Kay PS: I decided not to tag the substructure of dates and currency in XML, so currency appears just as GBP123.45, and dates as 1999-01-13. I tried XML substructures at one stage but the troops rebelled. Incidentally, I don't think "," as a decimal separator is any more international than ".", unless you use "international" in the U.S. sense of "not American". What you should really be using is a "middle dot"... xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i... Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ To (un)subscribe, mailto:majordomo@i... the following message; (un)subscribe xml-dev To subscribe to the digests, mailto:majordomo@i... the following message; subscribe xml-dev-digest List coordinator, Henry Rzepa (mailto:rzepa@i...)
|
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
|
|||||||||

Cart








