[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: xsl:function

Subject: Re: xsl:function
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Fri, 28 Mar 2003 21:12:53 +0000
msxml xsl function
Hi Mac,

> Yup, very confused. So, here is the bare bones xsl that I am trying.
> I'm using the msxml 4.0 processor. There are no files located at
> http://magusdesigns.com/namespace. It's sounds like there don't need
> to be any file there, right?

You're defining the functions with <func:function> from EXSLT. MSXML
doesn't support any EXSLT extension functions or elements, so it
simply doesn't recognise <func:function> and therefore doesn't create
a function definition in the way a processor that *does* recognise
<func:function> would.

If you want to create a user-defined function in MSXML, you have to
use <msxsl:script> and write the function in
JavaScript/VBScript/JScript. For example:

<xsl:stylesheet version="1.0"
                xmlns:my="http://magusdesigns.com/namespace"
                xmlns:msxsl="urn:schemas-microsoft-com:xslt"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<msxsl:script language="JScript" implements-prefix="my">
  function test() {
    return 1;
  }
</msxsl:script>

<xsl:template match="/">
  <xsl:value-of select="my:test()" />
</xsl:template>

</xsl:stylesheet>

Alternatively, you can use a processor that does support
<func:function> such as Saxon, Xalan, 4XSLT or libxslt.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.