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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T00:17:15+00:00 2026-06-01T00:17:15+00:00

Following David Carlisle blogspot exslt node-set function I added the below to my stylesheet:

  • 0

Following David Carlisle blogspot exslt node-set function I added the below to my stylesheet:

...xmlns:msxsl="urn:schemas-microsoft-com:xslt"...

<msxsl:script language="jscript" implements-prefix="exslt">
    this['node-set'] = function (x) {
        return x;
    }
</msxsl:script>

If I understand correctly, this way of defining a function in javascript (using this) is necessary because of the dash in the function name; defining it as function node-set(){...} will not work and this['z'] is equivalent to this.z.
The problem is that this script is rejected by the script-validator in XML Spy.

Script Compile Error(s) (relative to script begin):

Line 1, Character
3: Syntax error

Line 1, Character 31: Expected identifier ”
this[‘node-set’] = function (x) { return x; } “

No problem at all when I define function nodeset(){...} but somehow it does not allow me to use the construct this['...'], not even this['nodeset'] where a function name without dashes is used.

Anyone know what I should do about this? David, perhaps? 🙂

  • 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-06-01T00:17:17+00:00Added an answer on June 1, 2026 at 12:17 am

    I checked this with Altova support desk, asking about the error when using “this”, and they replied as follows:

    The code in question is non-standard for XSLT 1.0, using MSXML-only features.

    Not a clear answer, but I deduce that this implies that XML Spy’s javascript version does not support “this”.
    I will thus include the code where I need it and just check the code by opening the XML + referred stylesheet in a list of browsers, not bothering about the javascript error that XML Spy mentions during xslt edit or save.

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

Sidebar

Related Questions

i was following the David Brackeen's Developing Games in Java book and i made
I have a following XML file: <titles> <book title=XML Today author=David Perry/> <book title=XML
Suppose I have the the following xml: <package xmlns=http://example/namespace> <rating system=au-oflc>PG</rating> ... </package> To
I'm using the following light-box overlay by David Walsh to create an overlay that
On a Vista machine with the valid path C:\Users\David, calling Directory.GetFiles(@C:\Users\David) throws the following
Imagine I have the following free function and functor: void myFreeFunction(void) { cout <<
David A Black ( The Well Grounded Rubyist , Chapter 6) presents the following
I have the following php function which i wrote a while ago. Now however,
Summarization: Please check the comments below from David, Uwe, and other experts. ================================================================================ The
Consider the following search results: Google for 'David' - 591 millions hits in 0.28

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.