| Subject: XSL FO question: white-space-treatment From: MURAKAMI Shinyu <murakami@xxxxxxxxxx> Date: Tue, 15 Feb 2000 01:55:00 +0900 | 
Hello,
WD XSL(2000-01-12)
7.19.46 "white-space-treatment"
<quote>
collapse 
    Specifies that any character flow object whose character is of 
    the Unicode character class "whitespace" shall be ignored if the 
    preceding flow object was a character flow object also with a 
    character of class whitespace.
<quote>
I have two questions:
(1) How to trim the leading and trailing whitespaces?
e.g.
<fo:block>
  some text
</fo:block>
contains the text "
  some text
".
#xA is treated as #x20 (default linefeed-treatment="treat-as-space"),
so it's to be "   some text ", and 
by the collapse rule, the result is: " some text ",
two whitespaces (leading and trailing) are remained. (?)
(2) What is "whitespace"?
Unicode character class "whitespace" contains: (I think)
0020 SPACE
00A0 NO-BREAK SPACE
2000 EN QUAD
2001 EM QUAD
2002 EN SPACE
2003 EM SPACE
2004 THREE-PER-EM SPACE
2005 FOUR-PER-EM SPACE
2006 SIX-PER-EM SPACE
2008 PUNCTUATION SPACE
2009 THIN SPACE
200A HAIR SPACE
200B ZERO WIDTH SPACE
3000 IDEOGRAPHIC SPACE
Are these all collapsed by white-space-treatment="collapse" ?
Or "whitespace" means only #x20, #x9, #xD and #xA ?
#xA0 (  in HTML) is often used for avoid collapsing,
and in Japanese text, #x3000 is very often used as paragraph's first 
indent. (it's same as text-indent="1em")
collapsed or not collapsed is very important!
7.19.47 "linefeed-treatment"
The initial value "treat-as-space" is not suitable for Japanese text,
but when specified linefeed-treatment="ignore", also it's not very well
because sometimes Japanese text contains non-Japanese text.
I want another value like: linefeed-treatment="auto"
(ignore #xA0 adjacent to Japanese/Chinese (CJK) characters)
7.19.48 "space-treatment"
7.19.49 "white-space-collapse"
Why are these separated properties necessary, something different from 
"white-space-treatment" ?
Thanks,
--
MURAKAMI Shinyu
murakami@xxxxxxxxxx
http://www.nadita.com/
 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
| Current Thread | 
|---|
| 
 | 
| <- Previous | Index | Next -> | 
|---|---|---|
| XSL FO question: Border/Padding and, MURAKAMI Shinyu | Thread | xsl and url parameter strings, Igor Nakshin | 
| XSL FO question: Border/Padding and, MURAKAMI Shinyu | Date | RE: Character entities, Beckers, Marc | 
| Month |