Hi,
Yes I am trying to generate a number in sequence like 1,2,3
the for loop is
<xsl:for-each select="../../file[generate-id() =
generate-id(key('file-types', @name)[1])]">
<xsl:variable name="ErrorCount"
select="count(child::error[attribute::source=$chckerror])" />
<xsl:if test="$ErrorCount > 0" >
<tr>
<td><xsl:number
count="file[child::error[attribute::source=$chckerror]]"
from="file[child::error[attribute::source=$chckerror]]"/> </td<
<td class="checkstyle-data"><xsl:value-of
select="$javaclass" /></td>
<td align="center"
class="checkstyle-data"><xsl:value-of select="$ErrorCount" /></td>
</tr>
</xsl:if>
</xsl:for-each>
Thanks
Priya
------------------------------
Date: Wed, 15 Feb 2006 08:31:34 +0000
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
From: "Arun Sinha" <arunsinha666(_at_)hotmail(_dot_)com>
Subject: RE: [xsl] Problem in creating a numbering in xsl 1.0
Message-ID: <BAY109-F2753F3A0EDF56A7716A288CFA0(_at_)phx(_dot_)gbl>
Hi,
Are you trying to generate a number in sequence e.g 1, 2, 3, etc. etc.
If yes, then you need to tell how is your "For" loop written.
Cheers.
Arun
From: Priya_Agarwal(_at_)Keane(_dot_)com
Reply-To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Problem in creating a numbering in xsl 1.0
Date: Wed, 15 Feb 2006 12:37:08 +0530
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
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
------------------------------
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--