com.raritantechnologies.quickstart.taglibrary
Class XSLResultRenderer
java.lang.Object
com.raritantechnologies.searchApp.taglibrary.BasicResultRenderer
com.raritantechnologies.quickstart.taglibrary.XSLResultRenderer
- All Implemented Interfaces:
- IConfigurable, IPreferencesBeanInfo, IResultRenderer
- public class XSLResultRenderer
- extends BasicResultRenderer
- implements IResultRenderer
IResult Renderer which uses an XSLT transform to convert
the entire Result XML to an output or a single XML field in the Result.
The XSLT transform that is used can be switched depending on the SearchSource
from which the result was acquired. The XML can either be acquired from the
IResult.getXML( ) method or from a specific result field that has an XML value.
XML Configuration Template:
<ResultRenderer
rendererClass="com.raritantechnologies.quickstart.taglibrary.XSLResultRenderer" >
<!-- This example uses a specific result field to obtain the XML for rendering -->
<Source name="[sourceName]"
xslFile="[the XSLT xform File path]"
xmlFieldID="[optional fieldID that has XML]" >
<!-- XSL parameters that will be set on the XSLTransform. -->
<!-- Can be static or derived from result field values (dynamic) -->
<params>
<param name="XSLParamName" value="paramValue" /> <!-- static parameter -->
<param name="XSLParamName" fieldID="resultFieldID" /> <!-- dynamic parameter -->
</params>
</Source>
<!-- This example renders the entire result XML -->
<Source name="[anotherSource]" xslFile="[another XSLT File]" />
<!-- This example uses a post-processing StringFilter -->
<Source name="[anotherSource]" xslFile="[another XSLT File]" >
<OutputFilter class="[ class of com.raritantechnologies.utils.filter.IStringFilter" >
</OutputFilter>
</Source>
</ResultRenderer>
Developed by
Raritan Technologies Inc..
- Author:
- Ted Sullivan
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XSLResultRenderer
public XSLResultRenderer()
XSLResultRenderer
public XSLResultRenderer(java.lang.String xslTransformFile)
initialize
public void initialize(org.w3c.dom.Element elem)
- Description copied from interface:
IResultRenderer
- IResultRenderers are XML configurable.
- Specified by:
initialize in interface IResultRenderer- Overrides:
initialize in class BasicResultRenderer
doRenderResult
protected java.lang.String doRenderResult(IResult result,
int firstResult,
int lastResult,
int resultNum,
RaritanPageContext pageContext)
- Specified by:
doRenderResult in class BasicResultRenderer
getConfigurationXML
public void getConfigurationXML(java.io.Writer writer)
throws java.io.IOException
- Throws:
java.io.IOException
getConfigurationXML
public java.lang.String getConfigurationXML()
- Specified by:
getConfigurationXML in interface IResultRenderer
getConfigurationXML
public java.lang.String getConfigurationXML(java.lang.String configurationTemplate)
- Specified by:
getConfigurationXML in interface IResultRenderer