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

RE: Names, Dates, Etc.

  • From: Michael.Kay@i...
  • To: xml-dev@i...
  • Date: Fri, 15 Jan 1999 11:41:10 -0000

currency in xml
> >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!

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.