Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: XSLT unexpectedly produces {tab}{tab}output{cr}{lf} XSLT unexpectedly produces {tab}{tab}output{cr}{lf}To: NULL Date: 3/2/2006 11:34:00 AM [Environment: XP PRO, .NET 2.0 FX, VS2005, IE 6.0]
I only want CR/LF at the end of each <xsl:template> (flat file). I
have had no success with either of these:
<xsl:apply-templates select="output"/><xls:text>
</xls:text>
</xsl:template>
or...
<xsl:apply-templates select="output"/><xsl:text
disable-output-escaping="yes">
</xsl:text>
DESIRED output is like this:
FHDYN
MTRROUTE999001
...
ACTUAL is like this:
{tab}{tab}FHD{cr}{lf}
{tab}{tab}Y{cr}{lf}
{tab}{tab}N{cr}{lf}
{tab}{tab}MTR{cr}{lf}
{tab}{tab}ROUTE999{cr}{lf}
{tab}{tab}001{cr}{lf}
XSD/XML follow...any suggestions appreciated!
Thanks,
Terry
////////////////////////////////////////////////////////////////////////////////////
<xsl:output method="text" indent ="no"/>
<!-- Removing this causes CR/LF at the end of each line of output!!!
-->
<!--<xsl:strip-space elements="*"/>-->
<xsl:template match="FHD">
<xsl:apply-templates select="RecordID"/><xsl:text>
</xsl:text>
<xsl:apply-templates select="Tables"/>
<xsl:apply-templates select="OpticalProbe"/>
<xsl:text disable-output-escaping="yes">
</xsl:text>
</xsl:template>
<xsl:template match="MTR">
<xsl:apply-templates select="RecordID"/>
<xsl:apply-templates select="RouteNumber"/>
<xsl:apply-templates select="NumReadings"/>
</xsl:template>
</xsl:stylesheet>
////////////////////////////////////////////////////////////////////////////////////
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ns1:MVRS xmlns:ns1="http://tempuri.org/XMLSchema.xsd">
<ns1:FHD>
<ns1:RecordID>FHD</ns1:RecordID>
<ns1:Tables>Y</ns1:Tables>
<ns1:OpticalProbe>N</ns1:OpticalProbe>
</ns1:FHD>
<ns1:MTR>
<ns1:RecordID>MTR</ns1:RecordID>
<ns1:RouteNumber>ROUTE999</ns1:RouteNumber>
<ns1:NumReadings>001</ns1:NumReadings>
</ns1:MTR>
</ns1:MVRS>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
