Return-Path: Delivered-To: apmail-jakarta-taglibs-user-archive@jakarta.apache.org Received: (qmail 80652 invoked by uid 500); 20 Aug 2001 10:31:56 -0000 Mailing-List: contact taglibs-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: taglibs-user@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list taglibs-user@jakarta.apache.org Delivered-To: moderator for taglibs-user@jakarta.apache.org Received: (qmail 63134 invoked from network); 20 Aug 2001 10:12:34 -0000 Message-ID: <004201c12960$4b8bb1d0$0b01a8c0@Trinity.com> From: "B.Paramagurusamy" To: Subject: Doubt Regarding Xtags Date: Mon, 20 Aug 2001 15:40:00 +0530 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_003F_01C1298E.5F564A30" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N This is a multi-part message in MIME format. ------=_NextPart_000_003F_01C1298E.5F564A30 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, Here is my address.xml file=20 -------------------------------------------
1 Guru Chennai Male
2 Samy Chennai Male
3 Sasi Chennai FeMale
Here is my jsp file -------------------------- String sex=3Drequest.getParameter("sex"); // getting sex as Male String city=3Drequest.getParameter("city"); // getting city as Chennai
id Name city sex
The above code should display the elements of sex=3DMale and city =3D Chennai.ie.it should display 2 records.. But i found no display..The 'and' operator is not working.. But in xsl the same code is working..In terms of xtags i found this difficulty..Anything wrong in my code..Pls.rectify. Regards, Paramagurusamy. =20 ------------------------------------------------------------------- Trinity Infosys India Pvt.Ltd., #6,Wallace Garden,2nd street, Nungambakkam, Chennai-600 006 Ph : 91-44-8207199/203/204 (Office) 91-44-8572701,8525693 (Res) E-Mail : paramu1977@yahoo.com Visit me at : http://balder.prohosting.com/paramu ----------------------------------------------------------------------- ------=_NextPart_000_003F_01C1298E.5F564A30 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
 
    Here is my = address.xml file=20
  =20 -------------------------------------------
     =20 <addressbook>
          &nbs= p;=20 <address>
          &nbs= p;      =20 <id>1</id>
          &nbs= p;      =20 <name>Guru</name>
          &nbs= p;      =20 <city>Chennai</city>
          &nbs= p;      =20 <sex>Male</sex>
          =20 </address>
          &nbs= p;=20 <address>
          &nbs= p;      =20 <id>2</id>
          &nbs= p;      =20 <name>Samy</name>
          &nbs= p;      =20 <city>Chennai</city>
          &nbs= p;      =20 <sex>Male</sex>
          =20 </address>
          &nbs= p;=20 <address>
          &nbs= p;      =20 <id>3</id>
          &nbs= p;      =20 <name>Sasi</name>
          &nbs= p;      =20 <city>Chennai</city>
          &nbs= p;      =20 <sex>FeMale</sex>
          =20 </address>
      </addressbook>
 
Here is my jsp file
--------------------------
 
String sex=3Drequest.getParameter("sex"); // getting sex as = Male
String = city=3Drequest.getParameter("city"); //=20 getting city as Chennai
 
<xtags:parse uri=3D"xml/address.xml"/>
<table columns=3D"3">
 
<tr>
        =20 <td>id</td>
       &nbs= p;=20 <td>Name</td>
       &n= bsp;=20 <td>city</td>
       &n= bsp;=20 <td>sex</td>
</tr>
<xtags:forEach=20 select=3D"//address[sex=3D$sex and=20 city=3D$city]">
<tr>
    =20 <td><xtags:valueOf=20 select=3D"id"/></td>
    =20 <td><xtags:valueOf select=3D"name"/></td>
     <td><xtags:valueOf=20 select=3D"city"/></td>
    =20 <td><xtags:valueOf=20 select=3D"sex"/></td>
</tr>
</xtags:forEach></table>
 
The above code should display the elements of sex=3DMale
and city =3D Chennai.ie.it should display 2 records..
But i found no display..The 'and' operator is not=20 working..
But in xsl the same code is working..In terms of xtags i = found
this difficulty..Anything wrong in my code..Pls.rectify.
 
Regards,
Paramagurusamy.
          &nbs= p;     =20
----------------------------------------------------------------= ---
Trinity=20 Infosys India Pvt.Ltd.,
#6,Wallace Garden,2nd=20 street,
Nungambakkam,
Chennai-600 006
Ph : = 91-44-8207199/203/204=20 (Office)
       91-44-8572701,8525693=20 (Res)
E-Mail : paramu1977@yahoo.com
Visit = me at : http://balder.prohosting.com= /paramu
----------------------------------------------------------= -------------
 
------=_NextPart_000_003F_01C1298E.5F564A30--