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]
Other format: [Raw text]

Re: Escaping newlines in an XSL file


  Ahh the joys of whitespace.  Here why not use <xsl:text>?

  <xsl:template match="/RECORD">
    <xsl:value-of select="child::ELEMENT_1"/><xsl:text>,</xsl:text>
    <xsl:value-of select="child::ELEMENT_2"/><xsl:text>,...</xsl:text>
    <xsl:value-of select="child::ELEMENT_n"/>
  </xsl:template>

  This should give you control over what appears in your output

Or

  <xsl:template match="/RECORD">
    <xsl:value-of select="concat(ELEMENT_1,
                                 ',',
                                 ELEMENT_2,
                                 ',...',
                                 ELEMENT_n)"/>
  </xsl:template>

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

 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]