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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T20:04:49+00:00 2026-05-14T20:04:49+00:00

Is there any trick to match two XML by one XSLT? I mean the

  • 0

Is there any trick to match two XML by one XSLT? I mean the way I can apply XSLT to a parameter passed.

For example (I missed declarations to be short). XML1: XML to be transformed:

<myData>
   <Collection>

   </Collection>
</myData>

XSLT need to be applied to the previous XML:

<xsl:param name='items' />
<xsl:template match='Collection'>
    <!-- some transformation here -->
</xsl:template>

XML2: XML data passed as the parameter ‘items’:

<newData>
   <Item>1</Item>
   <Item>2</Item>
   <Item>3</Item>
</newData>

And I need to create a set of nodes in the ‘Collection’ node in XML1 for each ‘Item’ element in XML2 using XSLT. And I do not know what XML2 contains exactly at design time. It is generated at runtime, so I can’t place it inside XSLT, I know only its schema.

  • 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-14T20:04:50+00:00Added an answer on May 14, 2026 at 8:04 pm

    (1). You could generate the XSLT instead of using a static XSLT:

    transform xml2 with xslt1 which leads to xslt2
    transform xml1 with xslt2 which leads to the desired output

    (2). You could use the document() function to load xml2. This requires xml2 to be persisted to disk or to be accessible by a uri.

          <xsl:copy-of select="document('xml2.xml')//newData" />  
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is there any way that I can track the connections made to my application's
Inspired by this question , I'd like to know whether there is any trick
Is there any tricky way to implement a set data structure (a collection of
Should I merge those tables into one table? Is there any tricky alternative? Table
Is there any way to keep track the state of a UIButton whether it
Is there any way in Google Analytics to track whether somebody who completes Goal
Is there any method that can help me track internet usage by application? I
I've started looking at jQuery's built-in tabs functionality here: http://docs.jquery.com/UI/Tabs Is there any way
is there any nice and clean method or trick to find out if the
Is there any tips tricks , techniques, configurations to improve rendering time of sifr3-r436

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.