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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:12:43+00:00 2026-05-27T10:12:43+00:00

I have an XSLT 1.0 stylesheet running using the XSL processor included with PHP

  • 0

I have an XSLT 1.0 stylesheet running using the XSL processor included with PHP (libxml). I want to get the same stylesheet to run on the Microsoft XSL processor MSXML 6.0 (msxml6.dll) ideally so the same stylesheet can run on either processor.

Unfortunately at the moment I would need to have two stylesheets – one for each processor.

This snippet invokes the node-set() function on the PHP processor;

<xsl:transform version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:exsl="http://exslt.org/common"
  extension-element-prefixes="exsl">
    <xsl:template match="root">
        <xsl:variable name="rtf">
            <a>hello</a><b>world</b>
        </xsl:variable>
        <xsl:variable name="ns" select="exsl:node-set($rtf)"/>
        <xsl:copy-of select="$ns/b"/>
    </xsl:template>
</xsl:transform>

This snippet invokes the node-set() function on the Microsoft processor;

<xsl:transform version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:msxsl="urn:schemas-microsoft-com:xslt"
  extension-element-prefixes="msxsl">
    <xsl:template match="root">
        <xsl:variable name="rtf">
            <a>hello</a><b>world</b>
        </xsl:variable>
        <xsl:variable name="ns" select="msxsl:node-set($rtf)"/>
        <xsl:copy-of select="$ns/b"/>
    </xsl:template>
</xsl:transform>

If the input document was;

<root/>

The result of both stylesheets would be;

<b>world</b>

I want a single stylesheet that can run unchanged on the PHP processor and the Microsoft processor.

Although my real stylesheet is about 400 lines long and the the node-set() function is used in four places, I hope the examples above demonstrates the 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-27T10:12:43+00:00Added an answer on May 27, 2026 at 10:12 am

    Checked on libxml and msxsl, works in both cases.

    Regards

    Mike.

    <xsl:transform version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:exsl="http://exslt.org/common"
      xmlns:func="http://exslt.org/functions"
      xmlns:msxsl="urn:schemas-microsoft-com:xslt"
      extension-element-prefixes="exsl func msxsl"
      >
    
        <func:function name="msxsl:node-set">
          <xsl:param name="node"/>
          <func:result select="exsl:node-set($node)"/>
        </func:function>
    
        <xsl:template match="root">
            <xsl:variable name="rtf">
                <a>hello</a><b>world</b>
            </xsl:variable>
            <xsl:variable name="ns" select="msxsl:node-set($rtf)"/>
            <xsl:copy-of select="$ns/b"/>
        </xsl:template>
    </xsl:transform>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a xslt stylesheet with multiple xsl:import s and I want to merge
I have few XSLT files, index stylesheet imports layout using xsl:import. VS says that
Lets say I have a xslt stylesheet like the following: <?xml version=1.0 encoding=utf-8?> <xsl:stylesheet
I have this XSLT document : <xsl:stylesheet version=1.0 xmlns:mstns=http://www.w3.org/2001/XMLSchema xmlns=http://www.w3.org/2001/XMLSchema xmlns:xs=http://www.w3.org/2001/XMLSchema xmlns:msdata=urn:schemas-microsoft-com:xml-msdata xmlns:xsl=http://www.w3.org/1999/XSL/Transform> <xsl:output
Running XSLTprocessor under PHP 5.2.11, I've run into an odd bug and have been
I have this xslt stylesheet, in file Empty.xslt: <xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform xmlns:msxsl=urn:schemas-microsoft-com:xslt xmlns:nrki=http://www.essox.cz/xslt/nrki xmlns:date=http://www.essox.cz/xslt/date version=1.0
How to convert XML to something else using xslt stylesheet? In C++ C# PHP
I'm using an XSLT stylesheet (by Antennahouse) to convert XHTML to an XSL-FO file.
I have the following in xslt <?xml version=1.0 encoding=UTF-8?> <xsl:stylesheet version=2.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform xmlns:xs=http://www.w3.org/2001/XMLSchema xmlns:fn=http://www.w3.org/2005/02/xpath-functions
I have a Java servlet which generates XML, translates it with an XSLT stylesheet,

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.