Re: How can i use paragraph color ?

Subject: Re: How can i use paragraph color ?
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxx>
Date: Wed, 15 Jul 1998 11:15:21 -0700
At 98/07/15 13:50 +0900, Jun Seong Hak wrote:
>Q1) I would like to use blue color to all p element.

I have examples in my publicly available DSSSL Colour resource found
through the resources link of my trailer below.

With these files that can be included into your DSSSL scripts, you will be
able to use named colours as follows:

(element doc
    (make paragraph
        font-size:    20pt
        line-spacing: 20pt
        font-weight:  'bold
        color:        color-blue
        (process-children)))

>Q2> I can't understand conetpt of sosofo. Do you mind explain sosofo
>easily for me?

<concept>A sosofo can be thought of conceptually as a set of commands for
the formatter, but this is an imprecise generalization.</concept>

<detailed type="wordy">A Specification Of a Sequence Of Flow Objects
(sosofo) is a package of instructions to the flow object tree constructor
to build a part of the flow object tree containing all information that
will subsequently be sent to the formatter for interpretation to produce
the desired result as expressed in the semantics of the flow objects being
used in the tree.
</detailed>

>Q3> Can i get a output as follows ? That, two element is located in one
>line withour line break.
>
>In SGML Document :
><p> This is a test <sub>program</sub> for beginner.</p>
>
>In DSSSL file :
>(element p
>    (make paragraph
>	font-size : 20pt))
>(element sub
>    (make paragraph: 6p))

The following illustrates what you want to do:

T:\FTEMP>type test.sgm
<!DOCTYPE p [
<!ELEMENT p - O ( #PCDATA | sub )*>
<!ELEMENT sub - O ( #PCDATA )>
]>
<p>This is a test <sub>program</sub> for beginner.</p>

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

(element p
    (make paragraph
     font-size: 20pt))

(element sub
    (make sequence
     font-size: 6pt))

; end of file

T:\FTEMP>jade -c p:\jade\jadecurr\catalog test.sgm

T:\FTEMP>type test.fot
<?xml version="1.0"?>
<fot>
<paragraph font-size="20pt">
<a name="0"/>
<text>This is a test </text>
<sequence font-size="6pt">
<a name="1"/>
<text>program</text>
</sequence>
<text> for beginner.</text>
</paragraph>
</fot>

T:\FTEMP>

In this example you are using "(make" to produce sosofos that the flow
object tree constructor uses to build the output flow object tree.  You can
see above the flow object tree that was created by JADE's flow object tree
constructor based on the sosofos resulting from your data and your modified
program.  This flow object tree is comprised of flow objects, each of which
is defined with a set of semantics (in this case they are standardized
style semantics).  This tree is sent to a back-end for interpreting those
semantics for a given target device or format.

It is an important nuance that "(make" doesn't produce "flow objects" nor
"sequences of flow objects" ... only "specifications of sequences of flow
objects" ... because it is the flow object tree constructor's
responsibility to actually make the flow objects from the specifications
produced in your program.  This is because the physical representation of a
flow object tree is not standardized and is up to the implementor to design.

I hope this helps.

........ Ken


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


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


Current Thread
  • How can i use paragraph color ?
    • Jun Seong Hak - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id AAA05896Wed, 15 Jul 1998 00:49:24 -0400 (EDT)
      • Brandon Ibach - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id CAA08692Wed, 15 Jul 1998 02:02:39 -0400 (EDT)
        • Richard Light - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id EAA14914Wed, 15 Jul 1998 04:44:35 -0400 (EDT)
      • G. Ken Holman - from mail1.ability.netby web4-1.ability.net (8.8.5/8.6.12) with ESMTP id OAA01876Wed, 15 Jul 1998 14:55:12 -0400 (EDT) <=