Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8075715
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:04:59+00:00 2026-06-05T15:04:59+00:00

how to test if my condition is this; <xsl:if test=node = ‘1’ or node=’2′>

  • 0

how to test if my condition is this;

<xsl:if test="node = '1' or node='2'">
<input name="list_{@id}" value="{@id}" type="checkbox"/>
</xsl:if>

Is IF statement allowed OR condition? Please advice..

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T15:05:01+00:00Added an answer on June 5, 2026 at 3:05 pm

    Is IF statement allowed OR condition?

    No, but XPath has an or operator — do note that XPath is case-sensitive language.

    The XPath expression in the provided code:

    node = '1' or node='2'
    

    is syntactically correct.

    or is a standard XPath operator and can be used to combine two subexpressions.

    [33] OperatorName ::= ‘and’ | ‘or’ | ‘mod’ | ‘div’

    Here is a complete XSLT transformation example:

    <xsl:stylesheet version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
     <xsl:output omit-xml-declaration="yes" indent="yes"/>
     <xsl:strip-space elements="*"/>
    
     <xsl:template match="node()|@*">
      <xsl:copy>
       <xsl:apply-templates select="node()|@*"/>
      </xsl:copy>
     </xsl:template>
    
     <xsl:template match="num[ . = 3 or . = 5]"/>
    </xsl:stylesheet>
    

    When this transformation is applied on the following XML document:

    <nums>
      <num>01</num>
      <num>02</num>
      <num>03</num>
      <num>04</num>
      <num>05</num>
      <num>06</num>
      <num>07</num>
      <num>08</num>
      <num>09</num>
      <num>10</num>
    </nums>
    

    the wanted, correct result is produced (all elements copied with the exception of <num>03</num> and <num>05</num>:

    <nums>
       <num>01</num>
       <num>02</num>
       <num>04</num>
       <num>06</num>
       <num>07</num>
       <num>08</num>
       <num>09</num>
       <num>10</num>
    </nums>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This method is updating test variable. But the problem is that if condition does
I've got a problem.. I've got something like... if(condition(TEST) == true){ something (NAME) =
Given a generic class definition BaseClass<T> , is it possible to test this condition?
I want to test one condition in <xsl:when> . The condition is i want
<xsl:call-template name="myfield"> <xsl:with-param name=A/> <xsl:with-param name=B/> <xsl:with-param name=C/> <xsl:if test="not(starts-with(specialTest))"> <xsl:with-param name="TEST" select="'someFunction'"/> </xsl:when>
So i am trying to do this Order.find :all, :conditions => org = 'test
Is there any possibility to include multiple conditions in 'test' attribute expression in <xsl:if>
How to write tests where conditions like the following arise: Test user Input. Test
i am using cakephp and creating this condition: $conditions = array(Userword.levelid=>0, Userword.userid=>$this->Auth->user('UserId'),date(Userword.date)=>DATE_SUB(CURDATE(),INTERVAL 0 DAY));
Im trying to test a condition where on successful signup a Success Template is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.