|
Home > Online Product Documentation > Table of Contents > Using an Extension Function in Stylus Studio Using an Extension Function in Stylus StudioThe process of using an extension function in Stylus Studio involves three main steps:
1. First, you need to write a Java class that can be used from within a stylesheet. In this example, the
SystemDate() method returns the system date and time as a string:
2. Second, compile your class and register it on the Stylus Studio host by copying the
.class file to a location defined in the host's
CLASSPATH environment variable.
3. Finally, specify information in the stylesheet so that Stylus Studo can use your class. You do this with a namespace reference in the
xsl:stylesheet tag. For example, define a namespace as
xmlns:Ext where
Ext is the prefix to use when calling the class methods. (
Ext is not a predefined keyword; it can be replaced by any other legal string.) The namespace reference then takes the class name as a value. In this example, the whole reference looks like the following:
The class is now available from within the stylesheet and can be used in a template such as the following:
The XSLT stylesheet might look like the following:
|
EDI to XML Mapping
A tutorial on how to transform EDI files into XML using Stylus Studio's Convert to XML tool. Subsequent post-processing of the converted EDI data is done through XQuery or XSLT, modeling a real world XML data integration application.
XQuery Talk
Join the XQuery Talk mailing list for a practical discussion about XQuery. It's a place to work together to learn a new language, talk about problem solutions, discuss engines and implementations, chat about the latest XQuery news and more.
Building DataDirect XML Converter Applications with Stylus Studio
DataDirect XML Converters are Java and .NET components that enable access to any data (flat files, EDI) from your application code. Learn how to deploy XML applications today.
Automotive Companies That Use Stylus Studio
Top automotive companies get their wheels spinning with Stylus Studio 2006. Come see which companies put Stylus Studio in their drivers seat today!


