I am actually using Xalan, which is a XSLT 2.0 processor. However I use
XSLT 1.0. This is why it is always 1. Thanks :)
Your suggestion works as well.
Many thanks,
Houman
-----Original Message-----
From: Michael Kay [mailto:mike(_at_)saxonica(_dot_)com]
Sent: 26 September 2005 14:35
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] What is wrong with this count()
In XSLT 1.0 this should give you an error: the argument of count() must
be a
node-set, not a boolean. (It's actually one of the few type errors you
can
get from XSLT 1.0).
In 2.0 the count() of a boolean value is always one (a single value is a
sequence of length one).
I don't know what result you wanted: perhaps
count(*[starts-with(name(),'DGBUIMSNNumber')][(_at_)action='add'])
Michael Kay
http://www.saxonica.com/
-----Original Message-----
From: Khorasani, Houman [mailto:houman_khorasani(_at_)csgsystems(_dot_)com]
Sent: 26 September 2005 13:23
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] What is wrong with this count()
Hello everyone,
I am trying hard to figure out why this isn't working:
count(*[starts-with(name(),'DGBUIMSNNumber')]/@action='add')
It always returns 1. Why?
Many thanks,
Houman
--~------------------------------------------------------------------
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>
--~--
--~------------------------------------------------------------------
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>
--~--