eliminating leading spaces after newline
I'm trying to format an xml file as a fixed-width file using an XSLT stylesheet.
It's going pretty well, except for one problem with new lines.
I have to create new lines for each group of two repeating lines. To do this,
I'm using this character sequence:
and this is my output element:
<xslutput method="text" encoding="UTF-8"/>
The problem I'm encountering is that each line in the result file is spaced
or tabbed in to column 7, as seen below in this excerpt:
24 MONTH HISTORY
BMW/LAND ROVER FINCL S 30478 05/01/1998
ANCHORBANK, SSB 4664 11/01/1994
1399621960831416 82 .........
"24 MONTH HISTORY" is the header and the rest of the lines are the repeating
ones. But no matter what I do, I can't seem to get rid of the leading spaces.
I have tried "
" instead of " ", using the strip-space() instruction
(which really doesn't apply here, I guess), and different encodings (UTF-16,
ANSI), but with no luck. I'm also trying "normalize-space()" in the XPath
expressions, but this doesn't help either.
Here's an excerpt from my XSLT:
<xsl:value-of select="normalize-space(creditor)"/><![CDATA[ ]]>
<xsl:value-of select="normalize-space(balance_owed)"/><![CDATA[ ]]>
<xsl:value-of select="normalize-space(date_opened)"/><![CDATA[ ]]>
<xsl:value-of select="account_number"/><![CDATA[ ]]>
Anyone have any ideas? I'm stumped!
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL