cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <vijayaraghavan.subraman...@wipro.com>
Subject RE: xslt
Date Fri, 23 Dec 2005 12:58:39 GMT

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:xlink="http://www.w3.org/1999/xlink">

 <xsl:template match="/">
   <xsl:variable name="bFileName" select="report/bigfiles/filename"/>
   <xsl:for-each
select="report/smallfiles/*[contains(local-name(),'file')]">
    <xsl:if test="filename = $bFileName">
     <xsl:value-of select="error"/>
    </xsl:if>  
   </xsl:for-each>
 </xsl:template>
</xsl:stylesheet>

-----Original Message-----
From: kavitha ramesh [mailto:kaviramesh77@yahoo.com]
Sent: Friday, December 23, 2005 6:06 PM
To: users@cocoon.apache.org
Subject: xslt


Hi,

I have the following xml file.I would like to check if the filename
inside the bigfiles equals the filename inside the smallfiles.if so i
would like to display the error of the corresponding filename,,,if
someone knows pls help me,,,

<report>

<bigfiles>
<filename>aaa</filename>
</bigfiles>

<smallfiles>
<file1>
<filename>aaa</filename>
<error>aaa</error>
</file1>
<file2>
<filename>bbb</filename>
<error>bbb</error>
<file2>
<file3>
<filename>ccc</filename>
<error>ccc</error>
<file3>
</smallfiles>

</report>

rgds
kavitha



  _____ 

Yahoo!
<http://pa.yahoo.com/*http://us.rd.yahoo.com/evt=37474/*http://promo.yah
oo.com/broadband/> DSL Something to write home about. Just $16.99/mo. or
less




The information contained in this electronic message and any attachments to this message are
intended for the exclusive use of the addressee(s) and may contain proprietary, confidential
or privileged information. If you are not the intended recipient, you should not disseminate,
distribute or copy this e-mail. Please notify the sender immediately and destroy all copies
of this message and any attachments.

WARNING: Computer viruses can be transmitted via email. The recipient should check this email
and any attachments for the presence of viruses. The company accepts no liability for any
damage caused by any virus transmitted by this email.

www.wipro.com
Mime
View raw message