Subject: Re: Stripping carriage returns From: David Carlisle <davidc@xxxxxxxxx> Date: Thu, 4 May 2000 09:46:23 +0100 (BST) |
<xsl:template match="ric"> <![CDATA[#]]> <xsl:value-of select="@name"/> <![CDATA[|]]> <xsl:apply-templates select="fid"/> </xsl:template> Those CDATA sections are not doing anything as neither # nor | are special to XML so that is the same as <xsl:template match="ric"> # <xsl:value-of select="@name"/> | <xsl:apply-templates select="fid"/> </xsl:template> which means that the template consists of 4 nodes the first text node consists of an end of line, 8 spaces, a # and an end of line, then comes the value-of element node, then a text node with again loads of white space and a | then the apply-templates node. The text node with the end of line after the apply-templates does not contribute to the template as it is all white and so stripped. I would guess that you want <xsl:template match="ric"> <xsl:text>#</xsl:text> <xsl:value-of select="@name"/> <xsl:text>|</xsl:text> <xsl:apply-templates select="fid"/> </xsl:template> Now all the white space is in text nodes that are _only_ white and so will all be stripped and not contribute to the template. David > This email is confidential and intended solely for the use of the > individual to whom it is addressed. So why send it to a mailing list that will archive it and stick it on a public web page? XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Stripping carriage returns, Juan Ciriza Martin | Thread | Re: Stripping carriage returns, Dan Vint |
Re: No match or what..., Eric van der Vlist | Date | Re: Attributes, modes and templates, David Carlisle |
Month |