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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T02:28:41+00:00 2026-05-22T02:28:41+00:00

I have a chained XSLT 2.0 transformation scenario (using saxon), like this: – I1.xml

  • 0

I have a chained XSLT 2.0 transformation scenario (using saxon), like this:
– I1.xml is input for T1.xslt, stylesheet which will build T2.xslt
– I2.xml is input for T2.xslt, stylesheet which will output O1.xml

I would like to have an xsl:function (so that it will be available in XPath expressions), let’s call it my:f( dataNode, queryString ), which will query dataNode using the supplied query, similar with below:

<xsl:function name="my:f">
       <xsl:param name="dataNode" as="item()*"/>
       <xsl:param name="query" as="xsd:string"/>
             <xsl:sequence select="$dataNode/$query"/>
</xsl:function>

my:f() is stored in a separate file and included only by T2.
my:f() is isolated in a file because depending on configuration, it might call an extension function for performing the query.
my:f() call is, of course, “build” in T1 ( where the XPath queryString is dynamically concatenated ), but it is actually called only in T2.

The only problem that I seem to have .. is how to actually pass the dynamically build queryString from T1 to T2 and then to my:f() as a simple string (as the actual query will be performed by my:f()).

Does anyone have any ideas (and ideally some code) about how to approach this?

Regards

  • 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-22T02:28:42+00:00Added an answer on May 22, 2026 at 2:28 am

    Well if you want to construct and evaluate XPath expressions at run-time then you need to use an extension function like http://www.saxonica.com/documentation/extensions/functions/evaluate.xml: <xsl:sequence select="saxon:evaluate(concat('$p1/', $query), $dataNode)"/>

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

Sidebar

Related Questions

Have just started using Visual Studio Professional's built-in unit testing features, which as I
I have a Model which I am using to track permissions in a hierarchical
It must be a very common problem. I have a chained many-to-many relationship like
I hope I am using the right terminology. I have made a single-chained list.
I have a few HttpWebRequests and HttpWebResponses chained together, also using CookieContainer. The code
I have a chained list like [root, foo, bar, blah] And I'd like to
I have a jQuery selector, which has a chained function. Inside the function I
I am using this script Dynamic Drive Chained Menu and what I am trying
I would like a regular expression, of which I will use with the Python
I have this jQuery function for chained drop down boxes: function updateCargoDestinations() { $.ajax({

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.