Subject: [xsl] Re: Unspecified From: munur@xxxxxxxxxxxx Date: Mon, 16 Sep 2002 16:43:57 GMT |
Hi Bryan I think you can try out in the following way: <xsl:output method="text" omit-xml-declaration="yes"/> <xsl:template match="elemA"> <xsl:for-each select="elemB/elemC[text() ='bar']"> <xsl:if test="position()=1"> <xsl:value-of select="."/> </xsl:if> </xsl:for-each> </xsl:template> </xsl:stylesheet> Cheers!!! Munu > Hi, > > > I have an XML file with this structure: > > <elemA> > <elemB> > <elemC></elemC> > <elemC></elemC> > etc... > </elemB> > <elemB> > <elemC></elemC> > <elemC></elemC> > etc... > </elemB> > etc... > </elemA> > > I am writing an XSL file to search it. I want to be able to search all of > the <elemC> nodes for the occurrence of a searchstring - and, if an <elemC> > node matches the searchstring, to output the value of the first <elemC> node > of the <elemB> node that contains the matching <elemC> node. I hope that > makes sense! I haven't been able yet to get the XSL to process each of the > <elemC> nodes of each of the <elemB> nodes systematically. > > Any help much appreciated. > > Bryan T > Solicitec has been nominated for 4 awards in the 2002 LOTIES (In Brief > magazine's legal office technology innovation awards) for Best legal office > technology supplier, Best legal office technology newcomer (for > Visualfiles), Best fee-earner support system (for SolCase), Best legal > office automation system (for SolCase). > > Your vote counts! So please, <a > href="http://www.inbrief.co.uk/nomination.asp">click here</a> and vote for > us. > > Email Disclaimer > > This Mail has been scanned for Viruses using the most up to date McAfee > Virus Definitions. > > The information in this email is confidential and is intended solely for the > addressee. Access to this email by anyone else is unauthorised. If you are > not the intended recipient, any use, disclosure, copying, distribution or > retention of any part of it is prohibited and may be unlawful. If you have > received this communication in error please notify us by email or by > telephone 0113 2262000 and then delete the email and any copies of it. The > contents of this message may contain personal views that are not the views > of Solicitec, unless specifically stated. > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list --------------------------------------------- This message was sent using Endymion MailMan. http://www.endymion.com/products/mailman/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] RE:, Kirk Allen Evans | Thread | [xsl] [Announce] XMLSPY 5 Released , Larry E. Kim |
Re: [xsl] xalan-java xslt node valu, Trevor Nash | Date | Re: [xsl] grouping probs, Jeni Tennison |
Month |