[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: text values of nodes

Subject: Re: text values of nodes
From: "Ritu" <rkama@xxxxxxxxxxx>
Date: Tue, 12 Nov 2002 16:30:24 -0600
node text value
Hi  Todd,

>From your email it is not clear what exactly are you trying to do. If you
want to count the number of group nodes with specific value then following
statement should do -

<xsl:value-of select="count(group[normalize-space(text())='abc'])"/>

If you want to get a node set of group nodes with certain value - you can do
something like

<xsl:for-each select="group[normalize-space(text())='abc']"> .......
</xsl:for-each>

Ritu



----- Original Message -----

From: "Todd Binder" <todd_binder@xxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Tuesday, November 12, 2002 4:08 PM
Subject: Re:  text values of nodes


> that works to return the group text value.  Is there a way to count the
> number of group text values that equal a certain string?
>
> for example,
>
> <xsl:value-of select="count(group/text()='abc')"
> <xsl:value-of select="count(//group/text()[.='abc'])"/>
> <xsl:value-of select="count(//group/text()[*='abc'])"/>
>
> none of the above statement does not seem to work [text() doesn't seem to
> want to do
> the string comparison]
>
> is it possible to do the comparison?  one of the things I need to do is
grab
> a set of "group" nodes with a certain text value.
>
> - Todd
>
>
>
>
> Todd Binder
>
>
>
>
>
> >From: "Ritu" <rkama@xxxxxxxxxxx>
> >Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> >To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
> >Subject: Re:  text values of nodes
> >Date: Tue, 12 Nov 2002 15:47:56 -0600
> >
> >Use
> ><xsl:value-of select="group/text()"/>
> >
> >It should return "abc"
> >
> >Ritu
> >
> >----- Original Message -----
> >From: "Todd Binder" <todd_binder@xxxxxxxxxxx>
> >To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
> >Sent: Tuesday, November 12, 2002 3:33 PM
> >Subject:  text values of nodes
> >
> >
> > >
> > > I have some XML (unfortunately I did not generate it, else I would
have
> > > created it in a manner that was easier to transform) that is extremely
> > > nested, and am having problems extracting elements of it vis XSL
> > >
> > > can I grab just the group value (abc)?
> > >
> > > when I try to grab <xsl:value-of select="group"/> I get back all the
> >values
> > > contained within the entire GROUP node (abc 8873 X32 20020430 C 6 P)
> > >
> > > is there a way to work with this poorly formed XML?
> > >
> > >
> > > <group>abc
> > >     <key>8873
> > >         <idcode>X32
> > >             <date>20020430
> > >                 <rectype>C
> > >                     <IST>6</IST>
> > >                     <PRIMISS>P</PRIMISS>
> > >                 </rectype>
> > >             </date>
> > >         </idcode>
> > >     </key>
> > > </group>
> > >
> > > Todd Binder
> > > todd_binder@xxxxxxxxxxx
> > >
> > >
> > >
> > >
> > >
> > > _________________________________________________________________
> > > MSN 8 with e-mail virus protection service: 2 months FREE*
> > > http://join.msn.com/?page=features/virus
> > >
> > >
> > >  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> > >
> >
> >
> >  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>
> _________________________________________________________________
> Protect your PC - get McAfee.com VirusScan Online
> http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.