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

Problem of syntax of filter ?

Subject: Problem of syntax of filter ?
From: Stephane.Le-Deaut@xxxxxxxxxx
Date: Wed, 16 May 2001 10:13:36 +0200
xsl filter syntax

I've got this XML file :

<DownloadTable version="1.4">
   <DownloadTableDescription downloadTableVersion="" />
   <Table>
      <DownloadTableName downloadType="PENE_NOT_OCB" fileName="peNeNotOcbFot.xml"/>
      <DownloadTableName downloadType="SGDTR_NOT_OCB" fileName="sgdtrNotOcbFot.xml"/>
      <DownloadTableName downloadType="EL_NOT_OCB" fileName="elNotOcbFot.xml"/>
      <DownloadTableName downloadType="PE_OCB" fileName="peOcbFot.xml"/>
      <DownloadTableName downloadType="PE_SDIFF" fileName="peSdiffFot.xml"/>
      <DownloadTableName downloadType="PE_GEN" fileName="peGenFot.xml"/>
      <DownloadTableName downloadType="SGDTR_OCB" fileName="sgdtrOcbFot.xml"/>
      <DownloadTableName downloadType="CDP_OCB_INC" fileName="cdpOcbIncFot.xml"/>
      <DownloadTableName downloadType="CDP_OCB_COMP" fileName="cdpOcbCompFot.xml"/>
   </Table>
</DownloadTable>


I would like to recover the attribute fileName only if downloadType = EL_NOT_OCB

I've tried this code in order to select the element :

          <xsl:variable name="matchingDownloadTableName"
                     select="$dtableFile//DownloadTableName
                             [(@downloadType=$downloadType)]"/>  (with $downloadType=EL_NOT_OCB)

Then, I build my output tree like this :

                    <xsl:for-each select="$matchingDownloadTableName">
                                     <DownloadTableName downloadType="{@downloadType}"
                                                                                     fileName="{@fileName}"/>
                   </xsl:for-each>

But the result of my output tree is empty !

I don't understand why my code doesn't work.
Is it my filter good ?

Thanks for your help.





 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.