Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


XSLT unexpectedly produces {tab}{tab}output{cr}{lf}

From: anderson_terry@-------.---
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">&#xD;&#xA;</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">&#xD;&#xA;</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>



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent