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

Re:

Subject: Re:
From: "Vasu Chakkera" <vasucv@xxxxxxxxxxx>
Date: Mon, 16 Sep 2002 16:00:56 +0000
what is solcase
Hi Bryan
The following is what you can do. This is intended to be simple...
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<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>
Hope this helps
Vasu



From: Bryan Tulloch <b.tulloch@xxxxxxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: "'xsl-list@xxxxxxxxxxxxxxxxxxxxxx'" <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 16 Sep 2002 16:22:13 +0100

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




_________________________________________________________________
Join the world?s largest e-mail service with MSN Hotmail. http://www.hotmail.com



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.