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

Re: New work-queue item: Conditional inclusion

From: Joe English <jenglish@crl.com>
Date: Thu, 5 Jun 1997 19:32:34 -0700
Message-Id: <199706060232.AA04243@crl2.crl.com>
To: w3c-sgml-wg@w3.org

Arjun Ray <aray@q2.net> wrote:

> Finally, the basic problem with using MSs to kludge this is that SGML's
> default of INCLUDE for status specification is in the way (otherwise the
> common {something=>true,nothing=>false} type of fail-soft behavior could
> be built in.)

A much bigger problem with conditional marked sections
is that they operate at the lexical level.  That is, if you
say <![IGNORE[ blah ]]> the parser COMPLETELY ignores "blah";
it doesn't even attempt to check it for well-formedness/validity/

The result is that if there are N possible conditions, it's
necessary to validate source documents 2**N times, once for
each possible combination of INCLUDE/IGNORE.  This becomes
impractical at about N=3.

The XML restriction that element boundaries cannot cross
marked section boundaries doesn't help much here either.

> Nevertheless, I'll throw yet another syntax suggestion into
> the pot:
>   <![ %cond1; [ ...
>   ]][ %cond2; [ ...
>   ...
>   ]]>

This just might work, along with one more restriction.  This
construct would be equivalent to a "case" statement (instead of
multiple "if"s with no "else" like conditional marked sections),
so a parser could check that each branch leads to the same state
(content model position) to validate all possibilities in one
pass.  (That being the additional restriction).

Unfortunately, like Arjun said, it:

> Wouldn't quite work on the older systems though.

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.

--Joe English

Received on Thursday, 5 June 1997 22:35:44 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:25:10 UTC