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

  • Home
  • SEARCH
  • 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 6389519
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:24:48+00:00 2026-05-25T03:24:48+00:00

so I have this assignment and they are asking for data given by Xslt

  • 0

so I have this assignment and they are asking for data given by Xslt

This is what I’ve got:

<xsl:apply-templates select="results/result[@name=$param0]"/>

So the $param0 is given by a jquery transform function. My problem is how can I select all of the @name when sending a certain value for $param0? I’ve tried most wildcards but nothing seems to work.
Can you guys help me?

input XML

<results>
 <result name="name1">
  <score>2500</score>
 </result>
 <result name="name2">
  <score>13500</score>
 </result>
 <result name="name3">
  <score>65100</score>
 </result>
</results>

output for $param0=”name1″

<result name="name1">
 <score>2500</score>
</result>

So i would have to get all of the scores, I need to keep the xslt statement so I can still select one.

output for $param0=”wildcard” <== I need some kind of wildcard (have tried alot of them)

 <result name="name1">
  <score>2500</score>
 </result>
 <result name="name2">
  <score>13500</score>
 </result>
 <result name="name3">
  <score>65100</score>
 </result>

I hope this makes a it clearer what I’m looking for…

  • 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-05-25T03:24:49+00:00Added an answer on May 25, 2026 at 3:24 am

    Why not using a fake string wildcard?

    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
        <xsl:output indent="yes"/>
        <xsl:strip-space elements="*"/>
    
        <xsl:param name="param0" select="'*'"/>
    
        <xsl:template match="/">
            <xsl:copy-of select="results/result[@name=$param0 and $param0!='*']
                |
                results/result[$param0='*']"/>
        </xsl:template>
    
    </xsl:stylesheet>
    

    It copies every result when $param0='*', otherwise it copies the wanted node when there is a match like $param0='name1'; otherwise it does not copy anything at all.

    You can use the same expression within xsl:apply-templates.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I obviously do not 'grok' C++. On this programming assignment, I have hit a
This is uni assignment and I have already done some stuff. Please go to
(this is indirectly a part of a much larger homework assignment) I have something
I have been given a homework assignment where I need to create a captcha
This maybe a related question: Java assignment issues - Is this atomic? I have
There I have this assignment where I am suppose to emulate the hexdump function
I have an assignment and we have a couple of classes given, one of
I have an assignment for school that is really got the best of me.
So I have this assignment for a beginner course in Perl and I have
I have 2 classes for a UITableViewCell that show different data but they use

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.