Subject: reflexions
From: "Didier PH Martin" <martind@xxxxxxxxxxxxx>
Date: Thu, 28 Jan 1999 22:49:08 -0500

I just read again The Eliot Kimber paper named "An Approach to Literate
Programming With SGML Architectures" and this lead me to the following

Because dsssl is based on architerctural forms, a architectural instance
could potentially contains an other style language like for instance XSL.
This would allows a target machine to choose the appropriate style engine or
augment chances that a certain document is processed correctly. Done
correctly the dsssl processor would only care for its constructs and ignore
the XSL constructs without any pre-process. The bigest advantage being not
necessarily having two styles doing the same thing but one for on-line and
the other for printing for instance.

The two style below render exactly the same way on IE 5.x.

Let's take the menu experiment as an example:
<?xml version="1.0"?>
<HTML xmlns:xsl="";>
  <BODY STYLE="font-family:Arial, helvetica, sans-serif; font-size:12pt;
    <xsl:for-each select="breakfast-menu/food">
      <DIV STYLE="background-color:teal; color:white; padding:4px">
        <SPAN STYLE="font-weight:bold; color:white"><xsl:value-of
        - <xsl:value-of select="price"/>
      <DIV STYLE="margin-left:20px; margin-bottom:1em; font-size:10pt">
        <xsl:value-of select="description"/>
        <SPAN STYLE="font-style:italic">
          (<xsl:value-of select="calories"/> calories per serving)

something here I don't know <-----
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN">
<--- not sure about that here
(declare-flow-object-class element "UNREGISTERED::James Clark//Flow Object
(declare-flow-object-class document-type "UNREGISTERED::James Clark//Flow
Object Class::document-type")

    (make document-type
	  name: "HTML"
	  public-id: "-//W3C//DTD HTML 4.0" )
    (make element
	  gi: "HTML"

(element breakfast-menu
    (make element
	  gi: "BODY"
	  attributes: '(("STYLE" "font-family:helvetica,sans

(element food
	(make display-group
	   (make element
		  gi: "DIV"
		  attributes: '(("STYLE" "background-color:teal;color:white;padding:4px"))
         	 (process-matching-children "name")
		 (literal " - ")
		 (process-matching-children "price"))
	   (process-matching-children "description") ))

(element name
    (make element
	  gi: "SPAN"
	  attributes: '(("STYLE" "font-weight:bold;color:white")) ))

(element price
    (make sequence))

(element description
  (make element
            gi: "DIV"
            attributes: '(("STYLE"
     (make sequence
        (process-node-list (select-elements (children (parent
(current-node))) "calories" )))))

(element calories
    (make element
	   gi: "SPAN"
	   attributes: '(("STYLE" "font-style:italic"))
	   (literal " (")
	   (literal " calories per serving)") ))

this would be the equivalent of the equivalent of the Multipart/alternate
construct like found in mail messages. This allows a mail message to contain
both a text message and its equivalent HTML message. In fact most modern mal
packages support this feature and allows mail messages to be read by any
mail receiver as long as the mail receiver understand the
Multipart/alternate construct :-)

So, in the example above, a browser would be capable to either use DSSSL or
XSL dependant on its capabilities add to that CSS and you augmant the
chances that your browser support one of these. What is your opinion on
that? What are your suggestion to reach that goal. I am ready to implement
the result of our collective work.

Didier PH Martin

 DSSSList info and archive:

Current Thread
  • reflexions
    • Didier PH Martin - Thu, 28 Jan 1999 23:32:00 -0500 (EST) <=