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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T14:49:55+00:00 2026-05-17T14:49:55+00:00

Using XSLT 1.0, I’m trying to essentially create a small node set and then

  • 0

Using XSLT 1.0, I’m trying to essentially create a small node set and then pass it as a parameter to a template, something like the following:

<xsl:call-template name="widget">
  <xsl:with-param name="flags">
    <items>
      <item>widget.recent-posts.trim-length=100</item>
      <item>widget.recent-posts.how-many=3</item>
      <item>widget.recent-posts.show-excerpt</item>
    </items>
  </xsl:with-param>
</xsl:call-template>

The idea is that then from within the widget template I could write something like:

<xsl:value-of select="$flags/item[1]" />

Obviously I get compile errors.. how can I achieve this sort of thing?

  • 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-17T14:49:56+00:00Added an answer on May 17, 2026 at 2:49 pm

    There is a way (non-standard) in XSLT 1.0 to create temporary trees dynamically and evaluate XPath expressions on them, however this requires using the xxx:node-set() function.

    Whenever nodes are dynamically created inside the body of an xsl:variable or an xsl:param, the type of that xsl:variable / xsl:param is RTF (Result Tree Fragment) and the W3 XSLT 1.0 Spec. limits severyly the kind of XPath expressions that can be evaluated against an RTF.

    As a workaround, almost every XSLT 1.0 vendor has their own xxx:node-set() extension function that takes an RTF and produces a normal node-set from it.

    The namespace to which the xxx prefix (or any other prefix you choose) is bound is different for different vendors. For MSXML and the two .NET XSLT processor it is: "urn:schemas-microsoft-com:xslt". The EXSLT library uses the namespace: "http://exslt.org/common". This namespace EXSLT is implemented on many XSLT 1.0 processors and it is recommended to use its xxx:node-set() extension, if possible.

    Here is a quick example:

    <xsl:stylesheet version="1.0"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     xmlns:msxsl="urn:schemas-microsoft-com:xslt"
     xmlns:ext="http://exslt.org/common"
      exclude-result-prefixes="ext msxsl"
     >
     <xsl:template match="/">
      <xsl:variable name="vTempRTF">
       <a>
        <b/>
       </a>
      </xsl:variable>
    
      <xsl:copy-of select="ext:node-set($vTempRTF)/a/*"/>
     </xsl:template>
    </xsl:stylesheet>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'd like to output html controls using xslt, but I need to be able
Using XSLT, I'd like to be able to transform this : <doc> <tag1>AAA</tag1> Hello
Using XSLT 1.0 - I have the following xml and I an trying to
I am using XSLT to recurse some XML and then apply some HTML to
Question Using XSLT 1.0, given a string with arbitrary characters how can I get
I am parsing a document using XSLT. Within the XSLT I am loading a
Is it possible to merge elements using XSLT. If I have the following XML
.NET allows to extend XSLT by using the so called extension object. Very handy
I want to apply an XSLT Stylesheet to an XML Document using C# and
Using C# .NET 3.5 and WCF, I'm trying to write out some of the

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.