Previous Page Next Page

Recipe 14.11. MSXML Extension Functions

XSLT 1.0

Microsoft's MSXML 3.0, 4.0, and .NET XSLT processor is extensible via Jscript and VBScript. MSXML .NET adds C# extensibility. Extensions in MSXML are specified using the ms:script element:

<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
  xmlns:ms="urn:schemas-microsoft-com:xslt" 
  xmlns:myExt="urn:AcmeX.com:xslt">
   
  <ms:script language="JScript" implements-prefix="myExt">
    <![CDATA[
    function superExtension(ops) {
         /* ... */
       return result;
    }
    ]]>
  </ms:script>
   
</xsl:stylesheet>

XSLT 2.0

At the present time, Microsoft has no plans to implement XSLT 2.0 on the .NET platform, choosing instead to only support XQuery. However, an effort is well on the way to port Saxon to C# .NET (http://sourceforge.net/projects/saxondotnet/ and http://weblog.saxondotnet.org/ ).

See Also

The XSLT C library for Gnome (libxslt) also supports extensibility. See http://xmlsoft.org/XSLT/extensions.html for details.


Previous Page Next Page