DSSSL and braille

Subject: DSSSL and braille
From: David Pawson <DPawson@xxxxxxxxxxx>
Date: Thu, 31 Jul 1997 10:10:05 +0000
Use of DSSSL in Braille Production.
(Since the list is fairly quiet).

I have been asking about dsssl
as a possible tool for braille production. 
 I describe below the overall production 
process and outline how I see dsssl fitting into that.
What I would appreciate from the list is guidance on the
formatting phase, for which I believe dsssl is ideally suited.
We have software and (are the author of) the rules for 
English braille, its contraction etc. 

If you could help get us started we are prepared to 
pour over the standard to build on whatever you can give
us to build in the remaining rules. Rather than confuse
the issue with my limited knowledge of dsssl, I have written 
the style sheet requirement in pseudo dsssl style language,
in the hope that you may be able to make sense of it.

Overall Process Description.

1. SGML markup of source file using RNIB DTD.
2. Contraction phase. 
	This is only used for grade 2 braille.
	For simplicity I have assumed grade 1
	braille, which does not have the 
E.g. The word English becomes 5DLI%, where the 
         initial EN is contracted to ASCII 5, the 
         final SH is contracted to %

	This process is readily 
	implementable via available software,
	replacing character groupings by
	contractions. The output is again,
	simple ASCII
3. Formatting phase. The markup is used to determine
  	the format. All markup is removed.
  	Controls for the process 
	are the braille page size and the stylesheet.
4. Feed the output file from process 3 to an embosser to
   	produce the braille.The embosser works as an old
	line printer, each page being a fixed size of
	multi-fold paper, needing a FF character (normally
	as part of the header) to move on to the next 
	line. Think of the embosser as a printer taking 
	fixed font characters, one per 'cell' using 
	ASCII input which it converts to a six dot matrix
	driving the pins of the printer on a one to one
	relationship between the ASCII character and 
	a combination of the six 'dot' positions.

Presently available tools.
process 2 is available, but is ignored here for simplicity

Process 3. This phase offers the 
best potential for the use of DSSSL or CSS.


Process 1 output

<title> Example Text </title>
<author> Dave Pawson </author>
<head1>Introduction </head1>
<para>Telling the story</para>
<li>part 1</li>
<li>part 2</li>
<head2>The story</head2>
<para>This is the story</para>

 Process 2 output (uncontracted- hence identical)

Process 3 output


             EXAMPLE TEXT
             DAVE PAWSON
    part 1
    part 2

The story
  This is the story

This file is fed to the embosser and produces the braille 
Notes: The #A is the page number in a running header.
	The line of 3's is an end of section marker

Stylesheet requirement (very basic)

Embossing is done on a fixed width font basis
using cells, each of which holds one
braille character using paper sizes as shown:

Example sizes are 
lines  cells per row	Name
25	38		book
25	28		A4
28	38		Magazine
11	28		A5-landscape
18	20		A5-portrait
12	38		Inter-line

element book    process-children, align:centre, add-literal

element title   new page, centred, space-before 1 line,
                process-children, para-break-after*
element head1   centred, new para, process-children,
element head2   centred, process-children, para-break-after*

* Note: All 3 elements are left-margin >= 5 cells
               right-margin >=5 cells. I.e. word wrap to permit the

		stated margins.

element head3   space-before 1 line, hanging margin of 4
element head 4  if word-count of head <4
            precede each word by literal-char "."
            precede first word by literal-char ".."
        output-remaining words
        precede last word by literal-char "."
element para    make-para-break, indent by 2 cells
element para para    make-para-break, add additional indent
of 2
element para para para     make-para-break, add additional
indent of 2
element ul  indent first line by 2 cells more than parent
element note    make-para-break, insert 20 literal-chars
        insert 20 literal-chars
create page header consisting of
        left aligned print-page-number
        centred section-number, section title*
        right aligned braille page-number
[* note: maximum width = 10 less than page width]
element extract    make-para-break, add additional indent of
4 to all
        lines (including runovers)

Hope this gives you an idea of what I meant!

One item of concern is the need to 'add a two cell 
indent' repeatedly. In a procedural language I would
have a global variable hold the present value, and
use this to judge where to take the margin. This is
used so often in braille that it makes me ask how
this might be done in DSSSL (scheme). Is there a
function to find out what the present value is and
make it relative (add 2 char positions to whatever
is present?)

Regards, Dave Pawson

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

Current Thread