Subject: Re: Jade 1.0.1 String trimming? From: Paul Prescod <papresco@xxxxxxxxxxxxxxxx> Date: Fri, 21 Nov 1997 07:06:51 -0500 |
Russell Senior wrote: > in my top-level element sequence and also converted the > `process-children' to `process-children-trim', but still my output > (apparent using each of the TeX, RTF and FOT backends) contains the > padding space. process-children-trim works for me: <!doctype style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN"> (element test (sosofo-append (literal "[BEFORE]") (process-children-trim) (literal "[AFTER]" ))) --- <!DOCTYPE TEST[ <!ELEMENT TEST O O (#PCDATA|TEST)*> ]> <TEST> This is a test </TEST> --- [BEFORE]This is a test[AFTER] Note that process-children-trim only works right if it is applied directly to the element which contains the whitespace. For example: <!doctype style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN"> (element main (sosofo-append (literal "[BEFORE]") (process-children-trim) (literal "[AFTER]" ))) --- <!DOCTYPE MAIN[ <!ELEMENT MAIN O O (TEST+)> <!ELEMENT TEST O O (#PCDATA)> ]> <TEST> This is a test </TEST> --- [BEFORE] This is a test [AFTER] input-whitespace-treatment also seems to work for me: <!doctype style-sheet PUBLIC "-//James Clark//DTD DSSSL Style Sheet//EN"> (element main (make sequence input-whitespace-treatment: 'collapse (literal "[BEFORE]") (process-children) (literal "[AFTER]" ))) --- \pard\sl-240 \fs20 [BEFORE] This is a test [AFTER]} (in the RTF) >I notice in the Jade source file `lib/ArcEngine.cxx' ArcEngine is almost certainly unrelated to what you are doing, unless you are working with SGML Architectures. Paul Prescod DSSSList info and archive: http://www.mulberrytech.com/dsssl/dssslist
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Jade 1.0.1 String trimming?, Russell Senior | Thread | Re: Jade 1.0.1 String trimming?, Russell Senior |
Line-fields and line breaks, Richard Light | Date | Re: Line-fields and line breaks, James Clark |
Month |