funing, I think a little XSLT could do the job, something along these lines:
<xsl:template match="isodocs/doc[@category='jpg']"> <xsl:copy-of select="."/> </xsl:template> Wrap it into a stylesheet and put this stage into your pipeline, it will act as a filter. Best regards, P.S. I wrote this piece of code without testing it first... be aware ! --------------------------------------------- Luca Morandini GIS Consultant [EMAIL PROTECTED] http://utenti.tripod.it/lmorandini/index.html --------------------------------------------- > -----Original Message----- > From: funing [mailto:[EMAIL PROTECTED]] > Sent: Friday, September 27, 2002 11:04 AM > To: [EMAIL PROTECTED] > Subject: How to filter the data according to the user input? > > > Hi! > I have a xml contains such data: > > <isodocs> > <doc category="jpg"> > <name>14_84_1.jpg</name> > <description>a nice pic</description> > <location>14_84_1.jpg</location> > </doc> > <doc category="jpg"> > <name>847_2.jpg</name> > <description>a dog and a cat</description> > <location>847_2.jpg</location> > </doc> > <doc category="bmp"> > <name>14_84_1.bmp</name> > <description>this is a bmp</description> > <location>14_84_1.jpg</location> > </doc> > <doc category="bmp"> > <name>14_84_2.bmp</name> > <description>this is another bmp</description> > <location>14_84_1.jpg</location> > </doc> > </isodocs> > > How can I let only those items whose category="jpg" be showed ? > > Thanks a lot! > > best regards > -- > funing <[EMAIL PROTECTED]> > > > --------------------------------------------------------------------- > Please check that your question has not already been answered in the > FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> > > To unsubscribe, e-mail: <[EMAIL PROTECTED]> > For additional commands, e-mail: <[EMAIL PROTECTED]> > --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>