[GeoNetwork-devel] preformetted template doesn't work

Hi,

The preformatted template in metadata.xsl doesn’t work for text areas. Unix can only see LF and Windows can only see CR. To fix I did this, maybe someone else has a better fix.

<xsl:template name=“preformatted”>

<xsl:param name=“text”/>

xsl:choose

<xsl:when test=“contains($text,’ ')”>

<xsl:value-of select=“substring-before($text,’ ')”/>


<xsl:call-template name=“preformatted”>

<xsl:with-param name=“text” select=“substring-after($text,’ ')”/>

</xsl:call-template>

</xsl:when>

<xsl:when test=“contains($text,’ ')”>

<xsl:value-of select=“substring-before($text,’ ')”/>


<xsl:call-template name=“preformatted”>

<xsl:with-param name=“text” select=“substring-after($text,’ ')”/>

</xsl:call-template>

</xsl:when>

<xsl:when test=“contains($text,’ ')”>

<xsl:value-of select=“substring-before($text,’ ')”/>


<xsl:call-template name=“preformatted”>

<xsl:with-param name=“text” select=“substring-after($text,’ ')”/>

</xsl:call-template>

</xsl:when>

xsl:otherwise

<xsl:value-of select=“$text”/>

</xsl:otherwise>

</xsl:choose>

</xsl:template>

Kevin Gunn

Software Engineer

Australian Institute of Marine Science

Ph: (07) 47534305

Fax: (07) 4772 5852

E-mail: k.gunn@anonymised.com

------------------------------------------------------------------------|

The information contained in this communication is for the use of the |

individual or entity to whom it is addressed, and may contain |

information which is the subject of legal privilege and/or copyright. |

If you have received this communication in error, please notify the |

sender by return E-Mail and delete the transmission, together with any |

attachments, from your system. Thank you. |

------------------------------------------------------------------------|


--  
------------------------------------------------------------------------
The information contained in this communication is for the use of the 
individual or entity to whom it is addressed, and may contain 
information which is the subject of legal privilege and/or copyright.  

If you have received this communication in error, please notify the 
sender by return email and delete the transmission, together with any 
attachments, from your system. Thank you.
------------------------------------------------------------------------