W3C home > Mailing lists > Public > www-html@w3.org > August 2000

Re: Extending HTML yourself [was: New XHTML 1.1 Attribute]

From: Dan Connolly <connolly@w3.org>
Date: Sat, 12 Aug 2000 10:53:00 -0500
Message-ID: <399572DC.E7C0E49@w3.org>
To: Jan Roland Eriksson <jrexon@newsguy.com>
CC: Sean Palmer <sean_b_palmer@yahoo.com>, www-html@w3.org
Jan Roland Eriksson wrote:
> On Fri, 11 Aug 2000 12:07:27 -0500, Dan Connolly <connolly@w3.org>
> wrote:
> >Sean Palmer wrote:
> >> Here is a thought that has been exciting me for quite
> >> a long time now; a new attribute in XHTML 1.1;
> >> "comment".
> >[...]
> >> <hr style="color:green;" comment="was blue" />
> >
> >With XHTML, you don't need to pray to the HTML Gods
> >for new markup any more: you can Just Do It, as long
> >as you use namespaces:
> Hmmm... namespaces serves exactly what purpose in this?

To ground the new markup idiom in the Web; i.e. to
disambiguate it from all other attributes named "comment",
and in this case, (as in many, though not necessarily
all cases) to connect it to documentation about intended usage,
i.e. a schema.

> And what about the now all forgotten "marked section"?
> Are we all sure that a marked section could not fill the requirements on
> how to put processable comments in the source markup?

HTML 4.0 user agents are required to handle marked sections
as per SGML '86, but we have had little success enforcing
this requiment; in fact, we don't even try very hard:

	"We recommend that authors avoid using
	all of these features."
	-- B.3.3 SGML features with limited support

My summary of the feedback from the community (the users
and the implementors) on the issue of various bits
of SGML syntax is: we don't need anything more than
tags, attributes, and comments (and maybe PIs).

In partciular, XML 1.0 restricts the use of conditional
sections to the document type declaration
(cf 3.4 Conditional Sections
http://www.w3.org/TR/1998/REC-xml-19980210#sec-condition-sect )
and hence XHTML 1.0 user agents must halt-and-catch-fire
if <![ occurs after the prolog.

I have seen quite a few tools with functionality analagous
to "conditional sections": meta-html, ASP, etc.
All of them had the opportunity to use SGML marked sections,
and none of them chose to do so. Most of them predate XML,
but I think they could be adapted to use XML tags or
processing instructions fairly easily.

Here's an example from the meta-html documentation:

"<if <get-var foo bar>>
       "Either FOO or BAR is present"
       "Neither FOO nor BAR is present"


Hmm... I was going to show how this could look using
XML tags, but it's so similar to XSLT that I think
the best way to evolve meta-html is as a package
of XSLT extensions.


XSLT is fun stuff (cf my recent work in
http://www.w3.org/2000/01/sw/ )
and more and more widely deployed every
day. I highly recommend it to anybody
looking for a open format for server-side
processing of XML, especially XHTML; if you're
looking at meta-html, ASP, and all those, but
you're worried about vendor lock-in or fading support,
run, don't walk, to XSLT.

It's less mature as a client-side feature, but
it's getting there on that front too.

Dan Connolly, W3C http://www.w3.org/People/Connolly/
Received on Saturday, 12 August 2000 11:54:09 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 30 April 2020 16:20:40 UTC