xsl-list
[Top] [All Lists]

Re: [xsl] Removing line breaks without normalize-space()

2006-09-19 23:21:53
To eliminate extra white spaces and lines I use
<xsl:output indent="no" /> 

It makes the entire output fall in one line, while
preserving the spaces in between elements.

--- Mukul Gandhi <gandhi(_dot_)mukul(_at_)gmail(_dot_)com> wrote:

Perhaps adding the instruction <xsl:strip-space
elements="*" /> (as
child of xsl:stylesheet) will solve the problem.

On 9/19/06, Mark Peters <flickrmeister(_at_)gmail(_dot_)com>
wrote:
Hi,

Is there any way to remove line breaks without
deleting the whitespace
in-between elements? For example, suppose you
started with the
following XML:

<paragraph>
       <sentence>Some words are <i>italicized</i>
and some words are in
<b>bold</b>.</sentence>
       <sentence>Some words are
<u>underlined</u>.</sentence>
</paragraph>


I'd like to remove the line breaks, but otherwise
retain any existing
whitespace between elements, resulting in the
following XML:

<paragraph><sentence>Some words are
<i>italicized</i> and some words
are in <b>bold</b>.</sentence><sentence>Some words
are
<u>underlined</u>.</sentence></paragraph>

I'm trying to avoid sentences whose contents run
together when I
process the text.

Thanks!

Mark

--

Mark Peters
Senior Technical Writer
Saba Software


-- 
Regards,
Mukul Gandhi

http://gandhimukul.tripod.com


--~------------------------------------------------------------------
XSL-List info and archive: 
http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to:
http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--