xsl-list
[Top] [All Lists]

[xsl] Manipulating values from an xml file using xsl key

2006-09-07 08:56:46
Hi 

   I am trying to read the following xml file called xmlFile.xml:


   <?xml version="1.0" encoding="UTF-8"?>

<file>
  <fileId fileName="getClientDetails_Req.xml" 
filePath="\\ifdwebapp1\www\docs\virginTest\client\xml"/>
  <fileId fileName="getPensions_Req.xml" 
filePath="\\ifdwebapp1\www\docs\virginTest\client\xml"/>
  <fileId fileName="getRSF_ISA_Req.xml" 
filePath="\\ifdwebapp1\www\docs\virginTest\client\xml"/>
 </file>


 In my xsl file I have coded the following:

   <xsl:key name="fileIndex" match="fileId" use="@fileName"/>
  <xsl:key name="fileDir" match="fileId" use="@filePath"/>

 ...
     
               <xsl:for-each select="document('xmlFile.xml')">
                  <xsl:variable name="vXmlName"     
select="key('fileIndex',.)"/>
                  <xsl:variable name="vXmlPathName" select="name()"/>
                 
                  <a class="hyperlink" 
href="javascript:selectXml('{$vXmlName}','{$vXmlPathName}');">ccc</a>
               </xsl:for-each>

...

  When I run this in the browser, I get no results. What I am trying to achieve 
is to iterate over the filename and list them in the browser. So where am I 
going wrong?


Thanks in advance.

            


INTERNATIONAL FINANCIAL DATA SERVICES (UK) LTD Tel: +44 1268 44 3000
********************** N O T I C E *********************************

This message and any attachments is intended only for the individual or company 
to which it is addressed and may contain
information which is privileged, confidential or prohibited from disclosure or 
unauthorised use. If the recipient of this
transmission is not the intended recipient, or the employee or agent 
responsible for delivering such materials to the
intended recipient, you are hereby notified that any use, any form of 
reproduction, dissemination, copying, disclosure, 
modification, distribution and/or publication of this e-mail message or its 
attachments other than by it's intended
recipient is strictly prohibited by the sender. If you have received it in 
error, please notify us immediately by 
telephone on the number above and destroy the message and all copies in your 
possession.

International Financial Data Services (UK) Ltd is authorised and regulated by 
the Financial Services Authority.

This footnote also confirms that this email message has been swept by 
MIMEsweeper for the presence of computer viruses.

**********************************************************************


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>