Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
|
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 31st, 2004, 06:11 AM
Authorized User
 
Join Date: May 2004
Posts: 25
Thanks: 0
Thanked 0 Times in 0 Posts
Default Conditions in looping

Hi,
  I want a better way to do this..

The XML model is like following
<Errors>
   <Error id="field1" fieldName="FIELD1"/>
   <Error id="field2" fieldName="FIELD2"/>
   <Error id="field3" fieldName="FIELD3"/>
   <Error id="field4" fieldName="FIELD4"/>
   <Error id="field5" fieldName="FIELD5"/>
   <Error id="field6" fieldName="FIELD6"/>
</Errors>

My XSL code is like this

<xsl:for-each select="$ErrorCodes">
  <xsl:if test="@fieldName='SECRET_ANSWER'">
    <xsl:call-template name="Errors"/>
  </xsl:if>
</xsl:for-each>
(This code works fine but I need a better alternate)

I ll call the template from various places
wherein I want the control to be on the node

Can anyone tell some other way which is better than this
__________________
Try Try Try Until You Succeed





Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL LIKE Multiple Conditions takwirira ASP.NET 2.0 Basics 1 April 16th, 2008 06:24 AM
Removing whitespaces with certain conditions trishla XSLT 16 October 4th, 2007 05:35 PM
Multiple conditions austinf XSLT 1 May 5th, 2006 02:55 AM
Multiple conditions austinf XSLT 1 May 5th, 2006 02:38 AM
Query for two conditions needed doosti SQL Language 2 November 9th, 2004 06:24 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.