- From: Eve L. Maler <elm@arbortext.com>
- Date: Fri, 13 Sep 1996 07:15:55 -0400
- To: Paul Prescod <papresco@CALUM.CSCLUB.UWATERLOO.CA>, W3C SGML Working Group <w3c-sgml-wg@w3.org>
At 08:24 PM 9/12/96 -0400, Paul Prescod wrote: >Do people really need conditional markup? Or are they really interested in >conditionally _displayed_ markup. If the latter, style sheets could be used. >For instance, here's a graceful mechanism for migrating tables into an >HTML-like XML instance: > ><TABLES.DEFINED><TABLE>...</TABLE></TABLES.DEFINED> ><NO.TABLES.DEFINED><PRE>...</PRE> > >In a style sheet (in a bizarre syntax similar to my current programming >language), you could have something like: > >TABLES.DEFINED(){ > if (!FEATURE_SUPPORTED(<TABLE>) ) > return NULL; > else > return process_children(); >} > >NO.TABLES.DEFINED(){ > if( FEATURE_SUPPORTED( <TABLE> ) ) > return NULL; > else > return process_children(); >} > >Personally, I have never needed to use marked sections in instances for >anything other than conditional display. I do use them often in DTDs, >however. Maybe that's an argument against having DTDs be SGML instances. >Would "XML DTD-instances" themselves have a modifiable DTD that would allow >me to introduce these sorts of conditionals? > > Paul Prescod Marked sections in instances for conditional display have another problem: parsers resolve them before any downstream processors see the instance, so you can't let a user (who's viewing an SGML delivery form) dynamically switch between two views because only one view is left. This is precisely the reason why DocBook now has "effectivity" attributes; element and attribute markup can definitely take up the slack here. Eve
Received on Friday, 13 September 1996 08:35:53 UTC