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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T21:07:53+00:00 2026-05-12T21:07:53+00:00

Simple question, but is the solution? I have a typical C# Application that runs

  • 0

Simple question, but is the solution?

I have a typical C# Application that runs “new XslCompiledTransform.Transform(…);” I am passing it param arguments, all of type string.

I want to pass it a param that is of type array: strings, or even lets say an array of objects.

I am using C# I am being limited to XSL 1.0.

How am I able to preform this task, in a clean way to avoid writing unnecessary code in .NET?

  • 1 1 Answer
  • 1 View
  • 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-12T21:07:53+00:00Added an answer on May 12, 2026 at 9:07 pm

    XsltArgumentList.AddParam accepts the following types for the value:

    W3C Type                      Equivalent.NET Class (Type)
    
    String (XPath)                String
    Boolean (XPath)               Boolean
    Number (XPath)                Double
    Result Tree Fragment (XSLT)   XPathNavigator
    Node Set (XPath)              XPathNodeIterator, XPathNavigator[]
    Node* (XPath)                 XPathNavigator
    

    So you can’t pass in an array, but you could construct an XML fragment with your values and pass it as XPathNavigator.

    Example

    string[] strings = new string[] { "a", "b", "c" };
    
    XPathNavigator[] navigators =
        strings.Select(s => new XElement("item", s).CreateNavigator()).ToArray();
    
    XsltArgumentList args = new XsltArgumentList();
    args.AddParam("items", "", navigators);
    

    The XML nodes constructed look like this:

    <item>a</item>
    <item>b</item>
    <item>c</item>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Probably a long question for a simple solution, but here goes... I have a
Probably a simple question but I haven't found a solution. I have several view
I have a simple question, but i can't find a solution for it. I
I have a simple question, I think, but I can't find the solution for
I have a fairly simple question, but I'm failing to find the solution. I
I have a simple question that I think someone will answer very fast, but
I have a simple question that I assume does not have a simple solution.
This is probably a simple question but I can't seem to find the solution.
Simple question, but one that I've been curious about...is there a functional difference between
I have a quite simple question but the answer is not so easy. I

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.