[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

XSL FO question: white-space-treatment

Subject: XSL FO question: white-space-treatment
From: MURAKAMI Shinyu <murakami@xxxxxxxxxx>
Date: Tue, 15 Feb 2000 01:55:00 +0900
white space treatment
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 "&#xA;  some text&#xA;".
#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 (&nbsp; 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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.