|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] xalan 0.19 Why am I getting alot of blank lines in output
Hello,
I am using C++ xerces 1.1.0 and xalan 0.19 from apache running on NT 4.0 sp6
building with VC++ 6.0.
Does anyone know why I am getting so many blank lines in my output file ? I
have also tried this with Microsoft's and it also produces many blank lines.
I thought the following template would prevent the blank lines.
<xsl:template match="text()"/>
Output File:
data ULAS,2,"TEST_PKT_UB_ITEM"
rawValue = 0
end ULAS
data AS64,3,"TEST_PKT_SB_ITEM"
rawValue = 0
end AS64
INPUT FILE:
<?xml version="1.0" standalone="no" ?>
<DATABASE NAME="TEST_DB" xmnls="x-schema:sml.xml">
<SECTION NAME="DB">
<ULAS NAME="TEST_PKT_UB_ITEM" ID="2">
<rawValue>0</rawValue>
</ULAS>
<AS64 NAME="TEST_PKT_SB_ITEM" ID="3">
<rawValue>0</rawValue>
</AS64>
</SECTION>
</DATABASE>
XSL FILE:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="text"/>
<xsl:template match="/DATABASE/SECTION/*">
<xsl:for-each select=".">
data <xsl:value-of select="name(.)"/>,<xsl:value-of
select="@ID"/>,"<xsl:value-of select="@NAME"/>"
<xsl:for-each select="./*">
<xsl:if test="name(.)='ARRAY'">
numrecords = <xsl:value-of select="@LENGTH" /> <xsl:text>
</xsl:text>
</xsl:if>
<xsl:if test="name(.)!='ARRAY'">
<out><xsl:value-of select="name(.)"/> = <xsl:value-of
select="."/><xsl:text>
</xsl:text></out>
</xsl:if>
<xsl:apply-templates/>
</xsl:for-each>
end <xsl:value-of select="name(.)"/>
</xsl:for-each>
</xsl:template>
<xsl:template match="comment()">
</xsl:template>
<xsl:template match="RECORD/*">
<xsl:for-each select=".">
<out><xsl:value-of select="name(.)"/> = <xsl:value-of
select="."/><xsl:text>
</xsl:text></out>
</xsl:for-each>
</xsl:template>
<xsl:template match="text()"/>
</xsl:stylesheet>
Thanks in advance,
_______________________________________________________________
Linda Derezinski
Interface & Control Systems
<<attachment: winmail.dat>>
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








