webMethods

webMethods

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  xsl: checking

    Posted Tue February 27, 2007 01:00 PM

    can i put xsl:if like this??
    <xsl:if test=“string(local-name()) = ‘frame’|string(local-name())=‘repeatingFrame’|string(local-name())=‘field’|string(local-name())=‘text’”>

    mens i need to check for multiple condition…how to do?


    #webMethods
    #Tamino
    #API-Management


  • 2.  RE: xsl: checking

    Posted Thu March 08, 2007 10:15 PM

    I think that should work, although I would have defined a variable to hold the local-name string so you wouldn’t have to repeat string(local-name()) every time.

    But I suspect that a better way to do this to replace your xsl:if with an xsl:apply-templates statement using a mode:

    <xsl:apply-templates select='.' mode='x'/>
    
    &#8230;
    
    <xsl:template match='frame|repeatingFrame|field|text' mode='x'>
    <!-- whatever you were going to put in your xsl:if statement -->
    </xsl:template>

    #Tamino
    #API-Management
    #webMethods