A new XSLT utility, “nl2elements” is now available for download. Comments and feedback can be left here but if you discover any issues, please post it on the issue tracker.

@bpierre - I was looking for something like this yesterday. Thanks so much for posting.

I was looking for something like this today ;-)

One thing though: You should change line 32 to:

    <xsl:when test="substring-after($string,'&#10;') != ''">
        <xsl:value-of select="substring-after($string,'&#10;')" />
        <xsl:value-of select="$string" />

This way, if no linebreak is set in the text, not an empty element would be rendered (which is now the case), but it would just show one single element.

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details