[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Line feeds to breaks
HiB Appologies if you have already received this ...our email system is playing silly buggers... I'm having a problem with converting line feeds to html breaks. Microsoft value is Java /Unix value is When the page is transformed, the line breaks are huge depending on which value is used and what platform you display the page on. Is there a way to get around this? Any help would be most appreciated thank you. AMJ <!-- Template: lf2br Converts XML linefeeds to html <br /> NB: if linebreaks seem strange, stylus studio has helpfully reformatted the xml for you. You need to check that transforms read ($StringToTransform,' ') Inputs: StringToTransform Output: String with LF's converted to <br /> --> <xsl:template name="lf2br"> <xsl:param name="StringToTransform"/> <xsl:choose> <xsl:when test="contains($StringToTransform,' ')"> <!-- <xsl:value-of select="substring-before($StringToTransform,' ')"/> --> <xsl:call-template name="convertcase"> <xsl:with-param name="toconvert" select="substring-before($StringToTransform,' ')"/> <xsl:with-param name="conversion" select="'proper'"/> </xsl:call-template> <br/> <xsl:call-template name="lf2br"> <xsl:with-param name="StringToTransform"> <xsl:value-of select="substring-after($StringToTransform,' ')"/> </xsl:with-param> </xsl:call-template> </xsl:when> <xsl:otherwise> <!-- <xsl:value-of select="$StringToTransform"/> --> <xsl:call-template name="convertcase"> <xsl:with-param name="toconvert" select="$StringToTransform"/> <xsl:with-param name="conversion" select="'proper'"/> </xsl:call-template> </xsl:otherwise> </xsl:choose> </xsl:template> ...................................................................... Aaron Johnson GUI / XSLT development Academic Technologies Group [ATG] University of the West of England ext: 81051 t: 0117 3281051 www: http://atg.uwe.ac.uk/aaron e: aaron2.johnson@xxxxxxxxx ...................................................................... ...................................................................... SECURITY POLICY: Please note that ATG will only accept e-mail attachments in the following formats: .doc,.gif,.jpg,.mdb,.png,.xls,.zip,.psd .html,.shtml,.xml,.xsl,.sdf,.asp ...as a mac user I will accept files compressed using Dropstuff. ...................................................................... This communication is intended solely for the use of the individual(s) to whom it is addressed. Any opinions presented are those of the author and do not necessarily represent the University of the West of England, Bristol. ...................................................................... This email has been independently scanned for viruses and any virus software has been removed using McAfee anti-virus software
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|