|
next
|
Subject: Removing whitespace Author: (Deleted User) Date: 25 Jun 2007 02:23 PM Originally Posted: 25 Jun 2007 02:15 PM
|
First, I am new user to Stylus Studio and somewhat new to XSLT.
I am using the Saxon 8.9.0.3 XSLT processor.
I am trying to convert this XML:
<Report xmlns="bwreport.es.service" delimiter="#">
<ColumnHeaders>
<Column>Period/Fiscal Year</Column>
<Column>Commitment</Column>
<Column>Obligation</Column>
</ColumnHeaders>
<Data>
<R>Period 00 2004# #</R>
<R>OCT 2004#$ 60,676,740.88#$ 60,658,920.88</R>
<R>NOV 2004#$ 52,446,486.16#$ 52,444,236.16</R>
<R>DEC 2004#$ 65,762,952.83#$ 65,762,952.83</R>
</Data>
</Report>
to this text output:
Period 00 2004# #
OCT 2004#$ 60,676,740.88#$ 60,658,920.88
NOV 2004#$ 52,446,486.16#$ 52,444,236.16
DEC 2004#$ 65,762,952.83#$ 65,762,952.83
I keep ending up with this as a result in the text file (also, the tabs don't seem to appear as presented but are there):
Period 00 2004# #
OCT 2004#$ 60,676,740.88#$ 60,658,920.88
NOV 2004#$ 52,446,486.16#$ 52,444,236.16
DEC 2004#$ 65,762,952.83#$ 65,762,952.83
I don't want the tabs in the output document.
My XSLT is:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:bwreport="bwreport.es.service">
<xsl:output method="text" indent="no"/>
<xsl:strip-space elements="*"/>
<xsl:template match="/bwreport:Report/bwreport:Data/bwreport:R">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="text()">
<xsl:value-of select="."/>
<xsl:text>
</xsl:text>
</xsl:template>
<xsl:template match="bwreport:ColumnHeaders"/>
</xsl:stylesheet>
I have read several XSLT documents on-line to no avail.
TIA
MTH
|
|
|
|