Subject: Re: SGML/XML syntax for DSSSL From: Dave Raggett <dsr@xxxxxx> Date: Mon, 26 May 1997 15:09:02 -0400 |
Rather than searching for a HTML-like syntax, I think people may prefer something that builds on familiarity with CSS syntax, while preserving the functional approach DSSSL embodies. I worked on sketching some initial ideas for this in April. Here is an example to give the general flavor of the syntax: // let is used to define global and local variables let document-font-size = 10pt; let heading-font = "Times New Roman"; let heading-weight = 'bold'; let heading-posture = 'italic'; // element foo defines a rule for rendering element // foo as a sequence of flow objects element p { paragraph // create a paragraph flow object { font-family-name: heading-font; font-weight: heading-weight; font-posture: heading-posture; font-size: 2 * document-font-size; quadding: 'center'; } } // process-children is implicitly inserted // at the end of the sequence unless it // appears explicitly in the definition element note { paragraph { font-size: 12pt; // set object property "Warning"; // a literal value process-children; // the childen of this element } } This is obviously very similar to DSSSL, hardly surprising given that I set out to find a way of sugaring DSSSL. The flow objects such as paragraph and the characteristics they support are imported and are not part of the language. This keeps the language simple and opens the door to dynamic extensions using Java or Active X etc. Style sheets languages in this approach know nothing about style! On further thought, it became clear that one needs a way to allow a programmer to define a rich style specification with hooks for non-programmers to tweak the styles. CSS shows the value of providing such simplified knobs and levers. Another line of thought to follow up is the use of constraint languages for layout. In this approach the rules generate layout constraints rather than constructors for flow objects. Louis Weizman explored this a few years ago in work at MIT's Media Lab. For this, we would need to add a constraint solver into the backend. -- Dave Raggett - <dsr@xxxxxx> tel +1 617 258 5741 fax +1 617 258 5999 World Wide Web Consortium 545 Technology Square, Cambridge MA 02139 DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Infix syntax for DSSSL, Sebastian Rahtz | Thread | Re: SGML/XML syntax for DSSSL, Paul Prescod |
DSSSL Math Question, Paul Prescod | Date | Re: XS: Ports --> math, lee |
Month |