Re: [xsl] Open Office Multi-Line Normalization

Subject: Re: [xsl] Open Office Multi-Line Normalization
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Thu, 19 Apr 2007 12:47:15 +0200
Michael B Allen wrote:

<text:p text:style-name="p_5f_prototype">require_once('foo.php');</text:p> <text:p text:style-name="p_5f_prototype"/> <text:p text:style-name="p_5f_prototype">bool ...

yields:

  require_once('plexcel.php');
  bool ...

whereas I would like:

require_once('plexcel.php');
bool ...


Mike



Just add the following somewhere:

<xsl:template match="text:p[. = '']">&#xA;</xsl:template>

And change your main match as follows:

<xsl:template match="text:p[. != ''][@text:style-name='p_5f_prototype' and not(preceding-sibling::*[1][@text:style-name='p_5f_prototype'])]">

or something similar.

HTH,

Cheers,
-- Abel Braaksma

Current Thread