The
ImagoX
Extensions package is a group of standard and contributed Imago XSLT extensions.
ImagoX
provides a framework for the development of custom or application specific extensions. Once an
extension is incorporated into an
Imago
system its methods are available from within the XSLT stylesheets. Unless otherwise noted these
extensions require the
Imago
engine to function properly.
The general process for inserting extension content into a document is to create an element that will
be transformed by an XSLT. The XSLT transform will execute the extension element. First create an XML
document to be transformed. In the example below we create a
format
element in an
imago
namespace that we will use to trigger the XSLT template.
<?xml version="1.0"?>
<document xmlns:imago="http://xenei.org/imago/2002" >
<imago:format/>
</document>
The XSLT will use the
Imago
extension
org.xenei.imago.extensions.ImagoSystem
to get the format the client should received. Note that the
imago
namespace has the same definition as in the XML document.
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"
xmlns:xsystem="xalan://org.xenei.imago.extensions.ImagoSystem"
xmlns:imago="http://xenei.org/imago/2002"
extension-element-prefixes="xsystem "
>
<xsl:template match="document">
<xsl:apply-templates />
</xsl:template>
<xsl:template match="imago:format">
The desired format is <xsystem:format/>
</xsl:template>
</xsl:stylesheet>
Creating an XML document that has a
<xsystem:format/>
element will not cause the extension element to execute.
All trademarks and copyrights are the property of their respective owners.
Copyright © 2002-2004 by Xenei.com, All Rights Reserved