Dates in XML

Andrew Layman andrewl at microsoft.com
Wed Jul 8 21:59:45 BST 1998


Regarding the difficulty of writing a parser for arbitrary date formats, we
propose using only one date format, specifically a profile of ISO 8601.
This greatly aids interoperability.  I've worked with Misha Wolf of your
company on this a while back, and I think we both approve of this course.

-----Original Message-----
From: Peter_Masters at motorcity2.lotus.com
[mailto:Peter_Masters at motorcity2.lotus.com]
Sent: Wednesday, July 08, 1998 11:13 AM
To: Andrew Layman
Cc: xml-dev at ic.ac.uk
Subject: RE: Dates in XML





Andrew Layman <andrewl at microsoft.com> wrote (in part):

   One thing I notice
   in the example shown below is that the element contains the date twice,
   once
   in an easily-parsed form, once in what appears to be a display form.  I
   would hope that the parsable form is all that is needed, with an
   application
   able to produce the appropriate display when needed.

        <some-date-element type="ISO 8601" value="19980708">July 8,
        1998</some-date-value>



While it is easy for an application (written in a Turing-complete language)
to go from a canonical date representation to some (presumably localized)
pretty-printed version, it is not clear to me how you would do this with
the standard *ML style sheet mechanisms (either CSS or XSL).  The benefit
of the sample syntax is that the element content would be apparent, for
example, to any HTML browser that latched on to it and which followed the
rule that unknown tags are ignored, but their contents are processed.



<asbestos-suit> I am aware that I am conflating HTML and XML here, and not
everyone will be happy about it, but that is the subject for another, and
much longer, message </asbestos-suit>



This is the same general approach we've taken with Lotus eSuite's
      spreadsheet formulas, which typically look something like this:

<TD FORMULA="@SUM(A2..A4)" LOTUS_VALUE="6.0" ALIGN="right">6</TD>



 There are certainly proposals on the table to add arbitrary processing
 capabilities to the rendering pipeline: Netscape's Action Sheets, for
 example (http://www.w3c.org/TR/NOTE-AS).  While these in principal might
 support the generation of arbitrary displayable content from other
 information (such as the attribute values in an associated tag), I don't
 think this really represents a solution to the problem, for at least a
 couple of reasons:

 - it breaks the contract (implicit, I think, in both HTML and XML) that
 the text of the document is represented by the content of its elements

 - the amount of code needed to implement the desired transforms is
 essentially unbounded, as is the amount of computation required.  While it
 might be practical to reformat dates with a script attached to an action
 sheet, I don't think anyone would suggest that a spreadsheet recalc engine
 is a good candidate for script implementation.



xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev at ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo at ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo at ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa at ic.ac.uk)




More information about the Xml-dev mailing list