[XML-SIG] A bit off topic: XML advice needed...
Fri, 5 Mar 1999 21:17:26 +0800
>But how to express the XML equivalent? One way would be:
> Use an external ENTITY to textually include the date.dtd in
> events.dtd and define
> <!ELEMENT event (start-date, end-date)>
> <!ELEMENT start-date (date)>
> <!ELEMENT end-date (date)>
> That way I get self-documenting names for the date elements,
> but at the cost of another level of markup needed for each date
> in all my XML documents that use events.dtd.
Don't be afraid to take this sort of approach where embedded element types
seems to alternate between entity (in the analysis sense, not SGML/XML) and
There are a lot of advantages as you are explicitly indicating that events
have start-date and end-dates and that these are, in turn, dates. I would
also consider using NOTATIONs on the data elements if you need to tell your
application what particular date format you are using in any given instance.
James Tauber / firstname.lastname@example.org / www.jtauber.com
Associate Researcher, Electronic Commerce Network
Curtin University of Technology, Perth, Western Australia
Full-day XML Tutorial @ WWW8 : http://www8.org/
Maintainer of : www.xmlinfo.com, www.xmlsoftware.com and www.schema.net