Subject: Re: [xsl] Identity Transform losing original line feed From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Fri, 18 Jul 2008 22:07:17 -0400 |
I have a number of xsl templates which I am running an identity transform on:
<xsl:template match="node() | @*"> <xsl:copy> <xsl:apply-templates select="@* | node()" /> </xsl:copy> </xsl:template>
<xsl:template match="xsl:import/@href | xsl:include/@href"> <xsl:attribute name="href"> <xsl:value-of select="concat('get?include=', .)"/> </xsl:attribute> </xsl:template>
The basic principle here, is preserve the original templates exactly, but update the import and include href tag as specified. So the transform works fine except that the line feed character is changed after the transform.
My proof of this is a simple, open in notepad, where before the transform I have line spaces, and after the transform I do not.
So what gives? What is happening to those line feeds? Here is my output tag:
<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
-- Upcoming XSLT/XSL-FO hands-on courses: Wellington, NZ 2009-01 World-wide corporate, govt. & user group XML, XSL and UBL training RSS feeds: publicly-available developer resources and training G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Identity Transform losing ori, Karl Stubsjoen | Thread | RE: [xsl] Identity Transform losing, Geert Josten |
[xsl] Identity Transform losing ori, Karl Stubsjoen | Date | [xsl] Help with study of functional, M. David Peterson |
Month |