eliminating leading spaces after newline

wxdqz

New Member
Hi,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:<xsl:output method="text" encoding="UTF-8"/>The problem I'm encountering is that each line in the result file is spacedor tabbed in to column 7, as seen below in this excerpt:24 MONTH HISTORYBMW/LAND ROVER FINCL S 30478 05/01/19982000159892 773ANCHORBANK, SSB 4664 11/01/19941399621960831416 82 ........."24 MONTH HISTORY" is the header and the rest of the lines are the repeatingones. 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 XPathexpressions, but this doesn't help either.Here's an excerpt from my XSLT:<xsl:template match="credit_line_item"> <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[ ]]><xsl:choose><xsl:when test="payment_amount"><xsl:value-of select="payment_amount"/></xsl:when><xsl:otherwise>0</xsl:otherwise></xsl:choose></xsl:template>Anyone have any ideas? I'm stumped!TIA,Paul Klanderud
 
Back
Top