RE: Help about formatting-instruction

Subject: RE: Help about formatting-instruction
From: "Didier PH Martin" <martind@xxxxxxxxxxxxx>
Date: Wed, 27 Jan 1999 09:10:03 -0500
Hi Ken,

Thanx for the help. From it I understood that you have alternative process
flows, not only process-children.

Didier PH Martin
mailto:martind@xxxxxxxxxxxxx
http://www.netfolder.com

-----Original Message-----
From: owner-dssslist@xxxxxxxxxxxxxxxx
[mailto:owner-dssslist@xxxxxxxxxxxxxxxx]On Behalf Of G. Ken Holman
Sent: Wednesday, January 27, 1999 12:21 AM
To: DSSSL mailing list
Subject: Re: Help about formatting-instruction


At 99/01/26 23:16 -0500, Didier PH Martin wrote:
>I try to use the following FO in a script: formatting-instruction but I get
>the following error:

A sosofo created by that particular flow object is not allowed to have
child sosofos ... so you can't specify (process-children) as the content
expression.

>what I want to get is
>
>Belgian Waffles - $5,95

Then you needn't be using the formatting-instruction flow object.

I'm not sure what colour you want the dash, and your script will process
the entire food element instead of just the two you've asked for, so I've
made some changes below to give you what you asked for.  You can take it
from there.

Remember that the content expression for a "make" can contain multiple
sosofos.

I hope this helps.

........ Ken

T:\ftemp2>type food.xml
<?xml version="1.0"?>
  <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>

T:\ftemp2>type food.dsl
<!DOCTYPE style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN">

(define debug
  (external-procedure "UNREGISTERED::James Clark//Procedure::debug"))

(declare-flow-object-class element
  "UNREGISTERED::James Clark//Flow Object Class::element")

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

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

;end of file
T:\ftemp2>jade -c p:\jade\jadecurr\catalog -wno-valid -d food.dsl -f
food.err -t sgml p:\jade\jadecurr\xml.dcl food.xml >food.htm

T:\ftemp2>type food.err
C:\PROGRA~1\JADE\JADECURR\JADE.EXE:food.dsl:17:0:E: missing closing
parenthesis

T:\ftemp2>type food.htm
<DIV
STYLE="background-color:teal;color:white;padding:4px"
><SPAN
STYLE="font-weight:bold;color:white"
>Belgian Waffles</SPAN
> - $5.95</DIV
>


--
G. Ken Holman         mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.  http://www.CraneSoftwrights.com/d/
Box 266,                                V: +1(613)489-0999
Kars, Ontario CANADA K0A-2E0            F: +1(613)489-0995
Training:   http://www.CraneSoftwrights.com/d/schedule.htm
Resources: http://www.CraneSoftwrights.com/d/resources.htm
Shareware: http://www.CraneSoftwrights.com/d/shareware.htm


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


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


Current Thread