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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T01:03:13+00:00 2026-06-18T01:03:13+00:00

How do I create an xsl method to grab a generic ‘list_object_1’ or ‘list_object_2’

  • 0

How do I create an xsl method to grab a generic ‘list_object_1’ or ‘list_object_2’ and then use the number within the method. The data getting parsed is unable to be changed.

data to be parsed

<list_objects>
  <list_object_1/>
  <list_object_1>
    <list_object_2/>
    ...
  </list_object_1>

I thought it would be pretty simple to create a template where name matched the beginning of the element name ‘list_object_’. Is this possible? All the examples I saw for starts_with used an element name and then parsed the value, not just the element name.

expected template something like

<xsl:template match="starts-with(list_object_)>
   <bb>
   <xsl:apply-templates/>
   </bb>
</xsl:template>
  • 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-18T01:03:15+00:00Added an answer on June 18, 2026 at 1:03 am

    You almost had it. This is what you need:

    <xsl:template match="*[starts-with(local-name(), 'list_object_')]">
       <bb>
          <xsl:apply-templates/>
       </bb>
    </xsl:template>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm new in xml, sorry for the dumb question. I'm trying to create xsl
I am attempting to create a list in XSL-FO using a square bracket. I
I'm trying to use XSLT to create Edge Side Includes html blocks. Here is
I have a problem. I get the data from xml then transform it with
So, I'm working on a page that uses xsl on an xml to create
I need validate some fields in xsl by calling non-static method of java class
I use a method in jsp page like this and the page is saved
I am putting an XSL together than will create a NAnt build script using
CREATE TABLE `tbl_atn` ( `atn_id` int(15) NOT NULL AUTO_INCREMENT, `eng_id` int(15) DEFAULT NULL, `visit`
CREATE OR REPLACE FUNCTION layer2layerAttribute RETURN VARCHAR2 AS /** * This function properly joins

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.