From: Jirka Kosek (jirka@kosek.cz)
Date: Wed Sep 15 2004 - 13:28:31 PDT
David Tolpin wrote:
> There was a customer who complained that certain authors use
> non-breaking spaces for text-indent, and, according to the
> specification, they should not collapse.
If it were on 1st April I would though that you must be joking. XML is
not typewriter. But it is September now. Sigh! I thought that these
typewriter guys are using MS Word these days. >:-(
> A consequence is that they are not stretched when they text is
> justified. I am not sure it is the right result, but, at least,
> it is simple and consistent. Anything that is not an XML space
> is not a space in XSL FO.
I tried to find some information about this issue in XSL FO spec. Here
are my conclusions. From the description of the treat-as-word-space
property it is clear that U+00A0 should be stretched according to
word-spacing in the same way as the U+0020. This applies to characters
that are inserted using <fo:character/>. And the description of
<fo:character/> says that each character in a result tree is treated as
if it were corresponding <fo:character/>. In this light my
interpretation of spec is that U+00A0 should stretch.
Of course there might be different interpretations. We can ask XSL-FO WG
for their opinion about this issue.
> A solution would be to take each sequence of words joined by  s
> into <fo:inline keep-together.within-line="always">V lese</fo:inline>.
Unfortunately this is not suitable solution. It forbids line-breaks
inside "lese" word (there might be longer words more suitable for
hyphenation in practice). And also converting from to this format
is doable in XSLT but very complex if you want to handle cases where
input document looks like
V <emphasis>lese</emphasis>
and it is processed by several XSLT templates (for text node and for
emphasis element node). And once you are using xsl:value-of instead
xsl:apply-templates to pull data from input XML you don't have decent
chance to surround them by construct you are suggesting.
> If it works for you, use it. If it does not, I need a consistent
> approach, or we'll end up applying the same change back and forth.
If my interperation of XSL-FO is correct I would appreciate fix in XEP.
If not, would it be possible to add an extension property to switch
between different modes for U+00A0? Something like
rx:no-break-space-treatment="{normal|stretch}".
TIA,
Jirka
-- ------------------------------------------------------------------ Jirka Kosek e-mail: jirka@kosek.cz http://www.kosek.cz ------------------------------------------------------------------ Profesionální školení a poradenství v oblasti technologií XML. Podívejte se na náš nově spuštěný web http://DocBook.cz ------------------------------------------------------------------
-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo@renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html
This archive was generated by hypermail 2.1.5 : Wed Sep 15 2004 - 13:52:46 PDT