Re: [xsl] Counting records

Subject: Re: [xsl] Counting records
From: Martin Honnen <Martin.Honnen@xxxxxx>
Date: Mon, 08 Dec 2008 17:13:51 +0100
Bradley, Peter wrote:

<HesaValidate_Response xmlns="http://HesaValidateSqlSend";>
    <row     instance_no="1  "

The problem is that this always returns zero: as does
count(/HesaValidate_Response/row), and count(row); which I suppose is to
be expected if //row does.

Those elements are in the namespace http://HesaValidateSqlSend while //row selects 'row' elements in no namespace.
So you need

    <xsl:template match="/">
      <xsl:value-of select="count(/df:HesaValidate_Response/df:row)"/>


	Martin Honnen

Current Thread