|
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:
|
Sun Multi-Schema XML Validator (MSV)
Learn how to integrate the Multi Schema Validator (MSV) into Stylus Studio as one of the Custom Validation Engines. It will work for files with a DTD, a single XSD, or both a DTD and a single XSD.
Investments and Financial Companies That Use Stylus Studio
Stylus Studio provides XML tools & components to leading investment and financial companies! See which top investment and financial companies are banking on Stylus Studio 2006 to simplify their dollars and cents.
Switch to Stylus Studio: Customer Testimonials
Read in their own words, why customers have decided to make the switch to Stylus Studio, the World's best XML editor.
XML Publisher - XSLT Generator and XSL:FO Generator
The XML Publisher lets you easily design beautiful documents in HTML or PDF format from relational, XML and other data sources using XSL:FO or XSLT, using an intuitive visual interface.