[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

Subject: xalan 0.19 Why am I getting alot of blank lines in output
From: "Linda Derezinski" <linda@xxxxxxxxxxxxxx>
Date: Tue, 22 Feb 2000 18:22:07 -0500
xalan blank lines
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>>

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.