This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: newline white space



Thanks, Jeni.
This solved my problem for the hyphenated words, but where ever there were
other tags in the string, I lost my spaces.
How can I fix this?
Thanks,
Lisa

<p>This is a <b>bold</b> para&#xAD;<lb/>
graph.</p>

Displays as:
 This is aboldparagraph.

<xsl:template match="text()">
  <xsl:value-of select="normalize-space()" />
</xsl:template>

<xsl:template match="lb">
  <xsl:variable name="text" select="preceding-sibling::text()[1]" />
  <xsl:if test="substring($text, string-length($text)) != '&#xAD;'">
    <fo:inline>
      <xsl:text> </xsl:text><xsl:apply-templates />
    </fo:inline>
  </xsl:if>
</xsl:template>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]