Print

Print


At 12:28 PM 1/22/2008, it was written:
>You don't say how you're creating the output, but if it's with XSLT, 
>you can get around issues like this with judicious use of the 
>normalize-space() function.

Assuming this is in XSLT, I'd actually recommend using 
xsl:strip-space, including "choice" among the elements from which 
space should be stripped.

normalize-space() can reduce runs of spaces into a single spaces, but 
it won't strip spaces from places they aren't wanted. Mostly this is 
because it's hard to define what's wanted in the general case.

TEI should perhaps publish a list of elements with element-only 
contents, for use by stylesheet designers. These are the elements 
from which it's a good idea to strip whitespace from, since there 
it's simply cosmetic. (Inside mixed content or text-only content, 
it's actual data more often than not.)

Cheers,
Wendell

>Malte Rehbein wrote:
>>Hi all,
>>Working on my kundige bok edition, I am encountering the following layout
>>problem.
>>I encode the following:
>>synen
>><choice>
>>         <abbr>kinden</abbr>
>>         <expan>kinderen</expan>
>></choice>, magen
>>for the text "synen kinderen, magen" where "kinderen" is abbreviated.
>>For the output, this one is transformed into:
>>synen
>>   <span class="abbr">kinden</span>
>>   <span class="expan">kinderen</span>
>>, magen
>>so that the user can decide to see either the "abbr" or the "expan" form.
>>However, this leads to an ugly space:
>>synen kinderen , magen
>>instead of
>>synen kinderen, magen
>>One workaround would be to encode it as
>>synen
>><choice>
>>         <abbr>kinden,</abbr>
>>         <expan>kinderen,</expan>
>></choice> magen
>>which I do not really like. Any other suggestion?
>>Thanks,
>>Malte


======================================================================
Wendell Piez                            mailto:[log in to unmask]
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
   Mulberry Technologies: A Consultancy Specializing in SGML and XML
======================================================================