AH Formatter / XSL Formatter
Q&A



XSLT/XSL-FO/MathML テクニック

空白

トップ
基本・一般
AH Formatter について
XSL Formatter について
操作方法
プログラミング
XSLT/XSL-FO/SVG/MathML 仕様について
XSLT/XSL-FO/MathML テクニック
索引
Q.  linefeed-treatment="treat-as-space"white-space-treatment="ignore" を指定しましたが、改行コードが空白として残ります。 [No.2004032501]
A. 

W3CのXSL-FO仕様の勧告には以下のようにあります。

7.15.8. "white-space-treatment"

The "white-space-treatment" property specifies the treatment during the refinement process of character flow objects, except for linefeeds, that are classified as white space in XML. This includes U+0020 (space) and other white space characters but excludes U+000A (linefeed). Linefeed treatment is determined by the "linefeed-treatment" property.

U+000A を除いた空白文字の処理です。改行の扱いは linefeed-treatment で指定する、とあります。 ignore についても、before any linefeed-treatment handling is considered と記述されています。

ignore
Specifies that any character flow object whose character is classified, before any linefeed-treatment handling is considered, as white space in XML, except for U+000A (linefeed) characters, shall be discarded during the refinement process.

したがって、通常の空白を削除した後に改行が空白になります。 改行を削除したい場合は linefeed-treatment="ignore" を使えばよいでしょう。


Copyright © 1999-2011 Antenna House, Inc. All rights reserved.
Antenna House is a trademark of Antenna House, Inc.