public class XalanJavabeanExtension extends Object
Provides XSLT template population using OGNL expressions embedded in an XSLT element or function extension. The OGNL expressions are targeted at the Javabean data gathered through use of the Smooks JavaBean Cartridge.
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xalan="http://xml.apache.org/xalan" xmlns:smooks-bean="org.milyn.templating.xslt.XalanJavabeanExtension" extension-element-prefixes="smooks-bean" version="1.0"> <xsl:template match="*"> <!-- Using the XSLT extension element... --> <smooks-bean:select ognl="ognl-expression" /> <!-- Using the XSLT extension function... --> <xsl:value-of select="smooks-bean:select('ognl-expression')"/> </xsl:template> </xsl:stylesheet>
Constructor and Description |
---|
XalanJavabeanExtension() |
Modifier and Type | Method and Description |
---|---|
Object |
select(String ognlExpression)
Support OGNL based bean value injection via an XSLT extension function.
|
Object |
select(org.apache.xalan.extensions.XSLProcessorContext context,
org.apache.xalan.templates.ElemExtensionCall element)
Support OGNL based bean value injection via an XSLT extension element.
|
public Object select(org.apache.xalan.extensions.XSLProcessorContext context, org.apache.xalan.templates.ElemExtensionCall element) throws ognl.OgnlException
The OGNL expression is expected to be specified in the "ognl" attribute.
See Usage.
context
- Processor context.element
- Extension element instance.ognl.OgnlException
- Extension element syntax is incorrectly formed, or the
OGNL expression is unspecified or its
syntax is incorrectly formed.Copyright © 2020. All rights reserved.