ASP Error: 70
Description: Permission denied
Source: Microsoft VBScript runtime error

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

Break a for-each

Subject: Break a for-each
From: Stephane.Le-Deaut@xxxxxxxxxx
Date: Mon, 20 Aug 2001 10:47:59 +0200
for each break

Hello,

I have an XML file called "ReferenceAuthentified.xml" which contains some informations
like this :

<ReferenceAuthentified>
<SingleElement
                  SubsetName="HMBASE"
                    .....
</SingleElement>
....
</ReferenceAuthentified>

I have also severals XML files called "CurrentAuthentified1.xml", "CurrentAuthentifiedn.xml"
which contain also SingleElement. For example :

The CurrentAuthentified1.xml contains

<CurrentAuthentified1>
<SingleElement
                  SubsetName="NGPBASE"
                    .....
</SingleElement>
...
</CurrentAuthentified1>
...
The CurrentAuthentifiedn.xml contains

<CurrentAuthentifiedn>
<SingleElement
                  SubsetName="HMBASE"
                    .....
</SingleElement>
...
</CurrentAuthentifiedn>

With all this file, I must build an XML file called SubsetDescriptor.xml which contains all the
SubsetName present in the "ReferenceAuthentified.xml" :

<SubsetDescriptor>
   <Subset  subsetName="HMBASE"
                        ...
                   impactedByEvolution="true"
   </Subset>
 .....
</SubsetDescriptor>

I must inform an attribute called impactedByEvolution with true or false.

<xsl:attribute name="impactedByEvolution">

        <xsl:for-each select="$XslParameterFile//InputFile/@*
                      [starts-with(name(),'CurrentAuthentified')]">

           <xsl:variable name="currentAuthentifiedFile"
                         select="document(.)"/>

              <!-- check if the subset is found    -->
              <!-- in the currentAuthentified -->
              <xsl:variable name="occurenceNumber">
                <xsl:value-of select="count($currentAuthentifiedFile
                                  //Subset[@subsetName=$subsetName])"/>
              </xsl:variable>

              <!-- interpret the result -->
              <xsl:choose>

                <xsl:when test="$occurenceNumber='0'">
               </xsl:when>

                <!-- subset found more than 0 -->
                <xsl:otherwise>

                   <xsl:value-of select="'true'"/>

                </xsl:otherwise>

              </xsl:choose>
          <!--</xsl:for-each>-->
 </xsl:attribute>

My problem is as follows :
- If I find the subsetName in the first CurrentAuthentified how can I break the loop ?

- If I do not find the subsetName in all the CurrentAuthentified how to know that I did not find it
because I want to inform the impactedByEvolution attribute to "'false'" ?

If my problem is not  enough clear, tell me, I will give you more information
Thanks for 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.