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 9155927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:40:55+00:00 2026-06-17T12:40:55+00:00

<node> <node1><node11/></node1> <node2/> </node> I want my XSLT to check <xsl:if test=If at least

  • 0
<node>
   <node1><node11/></node1>
   <node2/>
</node>

I want my XSLT to check

<xsl:if test="If at least 1 child node exists">
  Only node1 can pass the if condition
</xsl:if>

Thanks for any reply.

  • 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-17T12:40:56+00:00Added an answer on June 17, 2026 at 12:40 pm

    Firstly, be careful with your terminology here. Do you mean “node” or do you mean “element”. A node can be an element, comment, text or processing-instruction.

    Anyway, if you do mean element here, to check at least one child element exists, you can just do this (assuming you are positioned on the node element in this case.

    <xsl:if test="*">
    

    Your comment suggests only “node1” can pass the if condition, so to check the existence of a specific element, do this

    <xsl:if test="node1">
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So here is my current code: <xsl:variable name=address> <xsl:value-of select=concat(/node1/node2/address.node/street, /node1/node2/address.node/city, /node1/node2/address.node/zip) /> </xsl:variable>
fringe = new PriorityQueue<Node>(10,new Comparator<Node>(){ @Override public int compare(Node node1,Node node2) { if (f(node1)>f(node2))
I want to output something similar to the following using XSLT XML: <myroot> <node1>
I have: <nodes> <node> <name>node1</name> <other>stuff1</other> <node> <name>node11</name> <other>stuff11</other> </node> <node> <name>node12</name> <other>stuff12</other> </node>
I have a list of tuples of format: (node1, node2, weight) What I want
<Node name=node1> <x x=x/> <x x=xxx/> </Node> <Node name=node2> <x x=xx/> <x x=xxxx/> </Node>
I have two strings node1/node2/node3/node4 and node1/node2/node5/node6.... how can I build a ONE JTree
I have a class: class node { public: node& parent; } I want to
I have a list of node ids. I want to append -Selected to all
I have an @XML document created from a single select statement. <root> <node> <node1>

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.