Declaring an Extension Function Namespace

In conformance with the XSLT specification, extension functions are accessed through a unique namespace. The namespace declaration can be in any of the following locations:

  • xsl:stylesheet tag
  • Element that contains the XPath expression that invokes the extension function
  • Ancestor of the element that contains the XPath expression that invokes the extension function

The XPath processor treats the namespace URI as a fully qualified class name. If the class name is preceded by class:, all calls are to static methods only. Otherwise, an instance of the class is created on first use and released when stylesheet processing is complete. Performance is better when you use a static method because creation and deletion of an instance of the class is not required.

You can separate package names with either a dot ( .) or a forward slash ( /). An sample namespace declaration might look like the following:

<xsl:stylesheet xmlns:Ext="NumberUtils">
       

    

The XPath processor resolves namespace prefixes in names of extension functions relative to the namespace declarations in the stylesheet.

XML Operations

Using XML Pipeline it's easy to visually specify a series of XML operations to apply on your XML data, including parsing, validating, converting and transforming, according to the needs of your business application.

Convert to XML

Convert to XML is a powerful data integration tool enabling you to convert any legacy data format (EDI, EDIFACT, x12, Binary, HTML, TSV, CSV, etc.) to XML using an intuitive, visual user interface.

XPath Query Editor

Stylus Studio's XML Editor has an XPath Query Editor that allows you to easily roubleshoot, test, and debug any XPath expression.

Microsoft XML Tools

Build Microsoft XML applications with Stylus Studio, which includes development support for all Microsoft XML technologies, including MSXML and Microsoft System.XML (Microsoft XML Parsers), SQL Server 2000, SQL Server 2005 (Yukon), and more.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member