New problem

Subject: New problem
From: Alexander Taranov <tay@xxxxxxxxxx>
Date: Wed, 27 Jan 1999 19:10:22 +0300
Didier PH Martin writes:
 > Hi
 > 
 > I learn from Ken the process-children trick, I made a new script that works
 > except that the item "description" do not display and I don't know why????
 > Here is the script:

I also don' know why. below is transcript of processing of your
example:
=================
jade:instance.xml:4:0:E: no document type declaration; will parse without validation
jade:sh.dsl:19:6:E: there is no attribute "STYLE"
jade:sh.dsl:19:6:E: an attribute value must be a literal unless it contains only name characters
jade:sh.dsl:19:55:E: element "DIV" undefined

  Belgian Waffles - $5.95two of our famous Belgian waffles with plenty of real maple
syrup
  Strawberry Belgian Waffles - $7.95light Belgian waffles covered with strawberries and whipped
cream[tay@goliath dsssl]$ 
======================

You can see 'light Belgian waffles...' in output

Errors about STYLE and DIV are there because you for
some reason don't use (make element
using     (literal "<DIV instead.

--alexander




 > 
 > (the document is below the script)
 > 
 > <!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN">
 > (declare-flow-object-class element "UNREGISTERED::James Clark//Flow Object
 > Class::element")
 > (root
 >     (make element
 > 	    gi: "HTML"
 > 	    (process-children)))
 > 
 > (element (breakfast-menu)
 >     (make element
 > 	  gi: "BODY"
 > 	  attributes: '(("STYLE" "font-family:helvetica,sans
 > sherif;font-size:12pt;background-color:#EEEEEE"))
 >         (process-children)))
 > 
 > (element food
 > 	(make display-group
 >        (literal "<DIV
 > STYLE=\"background-color:teal;color:white;padding:4px\">")
 >        (process-matching-children "name")
 >        (literal " - ")
 >        (process-matching-children "price")
 > 	 (literal "</DIV>")
 > 	 (process-matching-children "description")))
 > 
 > 
 > (element name
 >     (make element
 > 	  gi: "SPAN"
 > 	  attributes: '(("STYLE" "font-weight:bold;color:white"))
 >       (process-children)))
 > 
 > 
 > (element (price)
 >     (make sequence
 >         (process-children)))
 > 
 > (element (description)
 >     (make element
 > 	   gi: "DIV"
 > 	   attributes: '(("STYLE"
 > "margin-left:20px;margin-bottom:1em;font-size:10pt;"))
 >         (process-children)))
 > 
 > (element (calories)
 >     (empty-sosofo))
 > 
 > 
 > Document:
 > <?xml version="1.0"?>
 > <?xml-stylesheet type="text/dsssl" href="simple-html.dsl" format="sgml"?>
 > 
 > <breakfast-menu>
 >   <food>
 >     <name>Belgian Waffles</name>
 >     <price>$5.95</price>
 >     <description>two of our famous Belgian waffles with plenty of real maple
 > syrup</description>
 >     <calories>650</calories>
 >   </food>
 >   <food>
 >     <name>Strawberry Belgian Waffles</name>
 >     <price>$7.95</price>
 >     <description>light Belgian waffles covered with strawberries and whipped
 > cream</description>
 >     <calories>900</calories>
 >   </food>
 > </breakfast-menu>
 > 
 > 
 >  DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


 DSSSList info and archive:  http://www.mulberrytech.com/dsssl/dssslist


Current Thread