W3C home > Mailing lists > Public > www-validator@w3.org > September 2004

Date and time attribute type in conforming XHTML and valid HTML

From: <Wolfgang.Frech@xenium.de>
Date: Mon, 6 Sep 2004 14:19:32 +0200
To: www-validator@w3.org
Message-ID: <OFD6A55F5F.400F241D-ONC1256F07.0042F317@XENIUM.ag>

Please help me clarify my terms and definitions.
It started with a simple question:
How do I write a correct '<ins datetime="...'

Step 1)

The <ins> element in XHTML 1.0 has a datetime attribute
of type Datetime. Syntactically Datetime is a internal
parameter entity defined as CDATA in the DTDs (all three).

Result 1)

In a conforming XHTML 1.0 document, the value of the
datetime attribute of the ins element MUST be CDATA,
because a conforming document must be (XML-)valid with
respect to one of the XHTML DTDs.

Step 2)

The comment in the states that Datetime is "ISO date
format". The XHTML recommendation text, including the
DTDs, does not spedify which format, nor does it
reference the standard itself. The XHTML rec does
reference the HTML specification (4.01), but not
normatively. There is only one ISO standard on date and
time formats:  8601:2000.  The standard is not available
online, only an overview. The overview states that there
are several formats for date and time, with or without
punctuation, with varying precision, with or without
time zone information, even a week-of-year format.

Result 2)

If the datetime attribute is in one of ISO 8601:2000
date and time formats, the XHTML document is in a sense
_more than conforming_.


How would you call this more-than-conforming property of
an XHTML document?
DTD-comment-conforming? or DTD-comment-valid?
Is there an official term?
Is there a term used in the Validator community?

Step 3)

The HTML spec  specifies the attribute type Datetime in
its text, and it references the ISO 8601:1988 and a W3C
Note on date and time. For a HTML-element ins, only one
format is valid for the datetime attribute:
YYYY-MM-DDThh:mm:ssTZD,  The HTML spec states explictly
that the validity is defined by both the DTD and additional
constraints that cannot be expressed in SGML.

Result 3)

If the datetime attribute is in the YYYY-MM-DDThh:mm:ssTZD
format, the XHTML document is (in this respect) also valid

Questions continued

How would you call an XHTML document with attribute values
that are also valid in HTML?
How should any program processing XHTML (user agent,
parser) react to XHTML that is _not_ valid HTML?
How would you call a program that processes or generates
XHTML that is also valid HTML?  HTML-conforming,

Other attribute types

The reasoning above holds for all "imported names" in the
XHTML DTDs, for example media type, language code, content

Wolfgang Frech
Xenium AG            www.xenium.de
Excellence in information management
Elektrastraße 6a, 81925 München
Tel +49 - (0) 89 - 42 07 98 - 29,  Fax - 40
Mobil +49 - (0) 1 78 - 7 82 64 26
Received on Monday, 6 September 2004 12:48:34 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:42 UTC