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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:56:25+00:00 2026-05-17T17:56:25+00:00

I work on an xslt stylesheet, and I should receive as parameter two additional

  • 0

I work on an xslt stylesheet, and I should receive as parameter two additional XML. I get an error when I use the node-set() method (from namespace ms, microsoft). The contents of the XML is correct. The parameters are send with classic ASP.

Here’s the header and the call in xslt:

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0"
     xmlns:ms="urn:schemas-microsoft-com:xslt"
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
...
<xsl:param name="xmlPlanning"></xsl:param>
<xsl:variable name="myXml" select="ms:node-set($xmlPlanning)"></xsl:variable>
    <xsl:value-of select="ms:node-set($xmlPlanning)/*"/>

Here’s the stack trace of the error:

[XsltException: Impossible de convertir l'opérande en 'fragment de l'arborescence résultat'.]
   System.Xml.Xsl.XsltOld.XsltFunctionImpl.ToNavigator(Object argument) +380943
   System.Xml.Xsl.XsltOld.FuncNodeSet.Invoke(XsltContext xsltContext, Object[] args, XPathNavigator docContext) +33
   MS.Internal.Xml.XPath.FunctionQuery.Evaluate(XPathNodeIterator nodeIterator) +292

[XPathException: Échec de la fonction 'ms:node-set()'.]
   MS.Internal.Xml.XPath.FunctionQuery.Evaluate(XPathNodeIterator nodeIterator) +347
   System.Xml.Xsl.XsltOld.Processor.RunQuery(ActionFrame context, Int32 key) +24
   System.Xml.Xsl.XsltOld.VariableAction.Execute(Processor processor, ActionFrame frame) +200
   System.Xml.Xsl.XsltOld.ActionFrame.Execute(Processor processor) +20
   System.Xml.Xsl.XsltOld.Processor.Execute() +82
   System.Xml.Xsl.XsltOld.Processor.Execute(TextWriter writer) +96
   System.Xml.Xsl.XslTransform.Transform(XPathNavigator input, XsltArgumentList args, TextWriter output, XmlResolver resolver) +68
   System.Xml.Xsl.XslTransform.Transform(IXPathNavigable input, XsltArgumentList args, TextWriter output, XmlResolver resolver) +43
   System.Web.UI.WebControls.Xml.Render(HtmlTextWriter output) +132

And here’s the beginning of the xml I receive in parameter :

<?xml version="1.0" encoding="UTF-8"?>
<ArrayOfGenerationPlanningDesign xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://webservices.secureholiday.net/">
  <GenerationPlanningDesign>

What could be my problem ?

  • 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-17T17:56:25+00:00Added an answer on May 17, 2026 at 5:56 pm

    node-set() operates on Result Document Fragments (RDFs) only, but you give it a string, which is something entirely different (even if the string contents looks like XML).

    What you must do is parse the string into XML. You can use an extension script for that. The following worked for me (tested with msxsl.exe on the command line), but if you don’t want to use JScript you can use C# or any other supported language to do the same.

    <xsl:stylesheet version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:ms="urn:schemas-microsoft-com:xslt"
      xmlns:script="urn:my-scripts"
      exclude-result-prefixes="ms script"  
    >
      <ms:script language="JScript" implements-prefix="script">
        <![CDATA[
        function stringToXml(str) {
          var xml = new ActiveXObject("MSXML2.DOMDocument.4.0");
          xml.async = false;
          xml.loadXML(str);
          return xml;
        }
        ]]>
      </ms:script>
    
      <xsl:param name="xmlPlanning"></xsl:param>
    
      <xsl:variable name="myXml" select="script:stringToXml(string($xmlPlanning))" />
    
      <xsl:template match="/">
        <xsl:value-of select="$myXml/*" /><!-- whatever -->
      </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 need to solve the following question which i can't get to work by
Has anyone got EclipseLink MOXy (I'm using eclipselink 2.1.0) to work with Java 5?
There doesn't seem to be any tried and true set of best practices to
If I write a python script using only python standard libraries, using Python 2.6
I notice in several API's, that you may create a struct which is used
Is there a way to test if a collection is already initialized? try-catch only?
I want the messagebox to only show if the number is equal to 0.
I have a snippet to create a 'Like' button for our news site: <iframe
I have a new web app that is packaged as a WAR as part
This is beyond both making sense and my control. That being said here is

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.