|
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: |
Forest & Paper Products
Many forest & paper product companies realize the best XML suite doesn't have "pay per" features. That's why these top forest & paper product companies choose Stylus Studio 2006 to get the world's best XML features all in one bundle!
HTML to XML Importer
Convert HTML to XML with the Stylus Studio HTML to XML Importer, a powerful, visual utility for Converting HTML to XML with ease.
XML Schema Documentation Generator
Stylus Studio's XML Schema Editor includes an integrated XML Schema documentation generator, allowing you to easily publish XML content models defined in XML Schema in a convenient, HTML format. A screenshon of the XML Schema Editor is shown here.
XQuery Blasts off at NASA's Johnson Space Center
This is a short story how DynCorp (CSC) used XQuery at NASA's Johnson Space Center to Simplify XML Data Access and Integration


