xsl-list
[Top] [All Lists]

RE: [xsl] Counting records [Solved]

2008-12-08 11:20:37
Thanks Martin, Andrew and David.  Sorry to bother you with such a
trivial query.

Cheers


Peter


-----Original Message-----
From: Andrew Welch [mailto:andrew(_dot_)j(_dot_)welch(_at_)gmail(_dot_)com] 
Sent: 08 December 2008 16:14
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: Re: [xsl] Counting records

<HesaValidate_Response xmlns="http://HesaValidateSqlSend";>

your xml is in the namespace "http://HesaValidateSqlSend";

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
version="1.0">
   <xsl:template match="/">
       <xsl:variable name="RowCount" select="count(//row)"/>

you need to give that namespace a prefix in your stylesheet and use
that:

<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
    xmlns:h="http://HesaValidateSqlSend";
    exclude-result-prefixes="h">

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



cheers
-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

--~------------------------------------------------------------------
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>
--~--