Copying

   

Extensions

It is possible to extend XSLT with new elements and new functions. However, extensions must be introduced in a special namespace. For elements, the extension namespace must be registered with either the extension-element-prefixes of xsl:stylesheet or an xsl:extension-element-prefixes attribute attached to an element:

 <xsl:stylesheet       xmlns:xsl="http://www.w3.org/1999/XSL/Transform"       xmlns:axslt="http://xml.apache.org/xslt"       xmlns:psol="http://www.psol.com/xsledi/extensions"       extension-element-prefixes="psol"       version="1.0">       <!-- deleted -->    </xsl;stylesheet> 

Extension functions must also be declared in a special namespace, although it doesn't need to be registered with xsl:extension-element-prefixes or a similar attribute. A function with a namespace prefix is an extension function:

 psol:query-db($name) 

Warning

XSLT does not specify how to link extension elements and functions with Java code. This is left to the processor writer.


   


Applied XML Solutions
Applied XML Solutions
ISBN: 0672320541
EAN: 2147483647
Year: 1999
Pages: 142

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net