0 Replies Latest reply on Apr 15, 2014 5:02 PM by gCubed

    Preserve text category newline characters in custom export


      If you are using custom exports and want to keep your newline characters that are in text categories, you will need to run your export through a post stylesheet.


      <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

      <xsl:strip-space elements="*" />

        <xsl:template match="node()|@*">


      <xsl:apply-templates select="node()|@*" />



        <xsl:template match="text()" name="replaceNL">

          <xsl:param name="pText" select="." />


            <xsl:when test="contains($pText, '&#xA;')">

      <xsl:value-of select="substring-before($pText, '&#xA;')" />

      <xsl:text disable-output-escaping="yes">&amp;#10;</xsl:text>

      <xsl:call-template name="replaceNL">

      <xsl:with-param name="pText" select="substring-after($pText, '&#xA;')" />




      <xsl:value-of select="$pText" />