W3C home > Mailing lists > Public > w3c-sgml-wg@w3.org > June 1997

RE: New work-queue item: Conditional inclusion

From: Rivers-Moore, Daniel <daniel.rivers-moore@rivcom.com>
Date: Sun, 8 Jun 1997 04:01:04 +0100
Message-ID: <317CDDD87D9CD011958100609712EB6B04B88F@FLPS-NTSERVER1>
To: "XML Working Group (E-mail)" <w3c-sgml-wg@w3.org>
Cc: "Hugh Tucker (E-mail)" <h-tucker@inet.uni-c.dk>, "RivCom Staff (All) (E-mail)" <All.Staff@rivcom.com>
Paul Prescod wrote:
	Even if XML-LANG *provided*
	"generic" conditional inclusion facilities, I would advocate
against
	using them. Is there someone out there willing to stand up for
them?

Certainly not me.

"Conditional inclusion" and "conditional exclusion" are equivalent.
Conditional exclusion can be handled by a stylesheet language which has
a style called "excluded" meaning "Do not show" and a means of
specifying when that style should be applied.

The conditions for applying the style can be (subject to the stylesheet
syntax being rich enough to allow the specification of all these types
of condition) a combination of:
-	element (e.g. "Do not show <note> elements")
-	context (e.g. "Do not show any child of a <procedure> element
which is not a <step> element" - in other words, only show the steps of
the procedure, not the notes, safety warnings, etc)
-	attribute-values (e.g. "Only show elements whose "status"
attribute has the value "approved")
-	content (e.g. "Do not show <warning> elements whose content
includes the word "perilous")
-	values of other parameters known to the system (e.g. "Only show
<person> elements whose "birthday" attribute is today's date)
-	user input (e.g. "Only show <detail> elements if the user has
clicked on the <showdetail/> button of the parent element and has not
subsequently clicked on the corresponding <hidedetail/> button".

A variant of this last one would be "Only traverse this XML extended
link element when the user clicks on it". This illustrates how a
stylesheet language which recognises that "behaviour" is a subtype of
"presentation", just as "formatting" is, can do exactly what the ACTUATE
attribute of the current XML-LINK draft spec. is intended to do.

Putting the ACTUATE instruction into the stylesheet has the benefit that
it can be changed by applying a different stylesheet, and is not
hard-coded into the link element, where it has no place.

<rant>The purpose of the link element is to specify that there is a
link, what type of link it is, what it points to and what roles the
things pointed to play in the link. It is not to specify how the
application should behave based on the existence of such a link.</rant>

<strawman>Maybe XML-STYLE should be renamed XML-PRESENTATION</strawman>


	-----Original Message-----
	From:	Paul Prescod [SMTP:papresco@calum.csclub.uwaterloo.ca]
	Sent:	Friday, June 06, 1997 12:54 PM
	To:	w3c-sgml-wg@w3.org
	Subject:	Re: New work-queue item: Conditional inclusion

	Joe English wrote:
	> I still think doing this at the application/architecture
	> level -- with elements and attributes -- is the best way to
go.
	> IBM ID Doc has a very nice mechanism for doing this, it would
be
	> a good place to look for ideas.

	It seems to me that people's needs vary not just from
application to
	application, but also within an application. For instance the
logical
	replacement for <FRAMESET> is (IIRC) <BODY>. But the logical
replacement
	for <FIG> would be some other block element. This takes us back
to the
	venerable concepts of DTD and validation. Even if XML-LANG
*provided*
	"generic" conditional inclusion facilities, I would advocate
against
	using them. Is there someone out there willing to stand up for
them?

	 Paul Prescod
Received on Saturday, 7 June 1997 23:00:47 EDT

This archive was generated by hypermail pre-2.1.9 : Wednesday, 24 September 2003 10:04:40 EDT