RE: New work-queue item: Conditional inclusion

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 UTC