Re: [xsl] How to find out number of elements which does not have a particular attribute

Subject: Re: [xsl] How to find out number of elements which does not have a particular attribute
From: "M. David Peterson" <m.david@xxxxxxxxxx>
Date: Wed, 07 Jul 2004 06:48:58 -0600
You bet :) Hey, a really good quick reference for questions just like this can be found at Dave Pawson's XSL-List FAQ. He's been collecting questions and answers from the list since I believe its inception and as such there are very few questions, if any, that in one form or another are not answered and made available for reference. In fact, if I didnt learn this particular solution directly from the FAQ then I learned it from whoever the original poster was and unless Dave somehow missed it (not even possible) then I can guarantee that he has captured it and published it for all the world to learn from... I cant tell you how many times his FAQ has helped me in the past and continues to help me whenever I reference it. I have no doubt you will have the same experience...

You can find the site here > http://www.dpawson.co.uk/xsl/

Dont thank me, thank DaveP :) (hey Dave, you should print that on a t-shirt and sell it on thinkgeek.com. I know I'd buy one for sure! :)

Ranjan K. Baisak wrote:

Hello,
      Great! very simple solution!!! I am bit relaxed.
Thanks a lot.

regards,
Ranjan
--- "M. David Peterson" <m.david@xxxxxxxxxx> wrote:


you need to either add a * to complete your shortcut
for "descendant-or-self" reference....

<xsl:variable name="sharedcount1"
select="count(connectivity//*[@*[not(local-name() =
'sharedsource')]])"/>

Good luck!

<M:D/>


Ranjan K. Baisak wrote:



Hello David,
           This looks only "bar" element under

"foo"


but under foo there might be other elements too. I
need some generic xpath which can give me the

count. I


am using <xsl:variable name="sharedcount1"
select="count(connectivity//[@*[not(local-name() =
'sharedsource')]])"/> but this did not work. Do I

need


to modify something?

regards,
Ranjan
--- "M. David Peterson" <m.david@xxxxxxxxxx>

wrote:


select="count(foo/bar[@*[not(local-name() =
'bar')]])"

Ranjan K. Baisak wrote:



Hello List,
         Can anybody suggest me how to find out
number of elments which does not have a

particular


attribute?

regards,
Ranjan


__________________________________ Do you Yahoo!? Yahoo! Mail - 50x more storage than other

providers!



http://promotions.yahoo.com/new_mail



--+------------------------------------------------------------------

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@xxxxxxxxxxxxxxxxxxxxxx>

--+--



--+------------------------------------------------------------------

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@xxxxxxxxxxxxxxxxxxxxxx>

--+--






		
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other

providers!


http://promotions.yahoo.com/new_mail



--+------------------------------------------------------------------

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@xxxxxxxxxxxxxxxxxxxxxx>


--+--



--+------------------------------------------------------------------

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@xxxxxxxxxxxxxxxxxxxxxx>
--+--








__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail


--+------------------------------------------------------------------
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@xxxxxxxxxxxxxxxxxxxxxx>
--+--


Current Thread