|
Subject: Re: Help about formatting-instruction From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Tue, 26 Jan 1999 21:21:29 -0800 |
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
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Help about formatting-instruction, Didier PH Martin | Thread | RE: Help about formatting-instructi, Didier PH Martin |
| Help about formatting-instruction, Didier PH Martin | Date | Help about formatting-instruction, Alexander Taranov |
| Month |