RE: [xsl] Problem in creating a numbering in xsl 1.0

Subject: RE: [xsl] Problem in creating a numbering in xsl 1.0
From: cknell@xxxxxxxxxx
Date: Wed, 15 Feb 2006 09:30:12 -0500
You're halfway there. Now show us a snippet of what the output should look like.
-- 
Charles Knell
cknell@xxxxxxxxxx - email



-----Original Message-----
From:     Priya_Agarwal@xxxxxxxxx
Sent:     Wed, 15 Feb 2006 12:37:08 +0530
To:       xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject:  [xsl] Problem in creating a numbering in xsl 1.0

Hi,

I am trying create a sequence number in the output from the xsl 
transformation of a log file.

in a for loop I process all the file elements in the log file and present 
only those which have a particular error's occurence at least once.
But when i am trying to create a sequence in the output, it is not in 
proper steps.

The code I am using to create the numbering is 

<xsl:number count="file[child::error[attribute::source=$chckerror]]" 
from="file[child::error[attribute::source=$chckerror]]"/>

where chckerror is an attribute which gets set everytime in the for loop.

The snippet of the log file is 

    <file name="src\dao\com\trade\common\constant\Constants.java">
      <error line="5" severity="error" message="Line has trailing spaces." 
source="com.puppycrawl.tools.checkstyle.checks.GenericIllegalRegexpCheck" 
/>
      <error line="9" column="1" severity="error" message="Line contains a 
tab character." 
source="com.puppycrawl.tools.checkstyle.checks.TabCharacterCheck" />
      <error line="10" column="1" severity="error" message="Line contains 
a tab character." 
source="com.puppycrawl.tools.checkstyle.checks.TabCharacterCheck" />
      <error line="12" column="1" severity="error" message="Line contains 
a tab character." 
source="com.puppycrawl.tools.checkstyle.checks.TabCharacterCheck" />
      <error line="13" column="1" severity="error" message="Line contains 
a tab character." 
source="com.puppycrawl.tools.checkstyle.checks.TabCharacterCheck" />
    </file>
    <file name="src\dao\com\trade\common\dao\DAO.java">
      <error line="6" severity="error" message="Line has trailing spaces." 
source="com.puppycrawl.tools.checkstyle.checks.GenericIllegalRegexpCheck" 
/>
      <error line="10" severity="error" message="Line has trailing 
spaces." 
source="com.puppycrawl.tools.checkstyle.checks.GenericIllegalRegexpCheck" 
/>
      <error line="10" column="1" severity="error" message="Line contains 
a tab character." 
source="com.puppycrawl.tools.checkstyle.checks.TabCharacterCheck" />
    </file>
    <file name="src\dao\com\trade\common\dao\impl\BaseDAOImpl.java">
      <error line="9" severity="error" message="Line has trailing spaces." 
source="com.puppycrawl.tools.checkstyle.checks.GenericIllegalRegexpCheck" 
/>
    </file>
 
could you please help me !!!!

thanks and regards
Priya

Current Thread