|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface XSLTTemplate
This class defines an interface for the use of XSLT processors with MorganaXProc
. It
allows you to use any XSLT processor you like in 'p:xslt' by just wrapping an
XSLTConnector
around it.
The interface to XSLT processors comes in two classes:
XSLTConnector
serves as the basic connection to the used
XSLT processor. It holds the basic information of the connector and
is used to set some configuration. The basis task of XSLTConnector
is to create an instance of XSLTTemplate
as an executable form
of an XSLT stylesheet. in compile()
.
XSLTTemplate
is then used to set the dynamic context of
the transformation and run it to produce a result document.
Method Summary | |
---|---|
void |
clearParameter()
Ensures that all previously set parameters are cleared. |
void |
setCollectionURIResolver(CollectionURIResolver resolver)
Sets the resolver to use for fn:collection in transformation. |
void |
setDefaultCollection(nu.xom.Document[] defaultCollection)
Set the default collection for the transformation, i.e. the sequence of documents on port "source" of p:xslt. |
void |
setErrorListener(javax.xml.transform.ErrorListener listener)
Sets the error listener to use in transformation. |
void |
setOutputBaseURI(java.lang.String uri)
Sets the output base uri supplied from p:xslt. |
void |
setParameter(javax.xml.namespace.QName name,
XdmSequence value)
Sets the parameters on port 'parameters' of p:xslt. |
void |
setTextURIResolver(TextURIResolver resolver)
Sets the uri resolver to use for fn:unparsedText in XSLT 2.0 transformations. |
void |
setURIResolver(javax.xml.transform.URIResolver resolver)
Sets the uri resolver to use for fn:document in transformation. |
XsltResult |
transform(nu.xom.Document sourceDocument,
java.lang.String outputBaseURI,
javax.xml.namespace.QName initialTemplate,
javax.xml.namespace.QName initialMode)
Starts a transformation using this template |
Method Detail |
---|
XsltResult transform(nu.xom.Document sourceDocument, java.lang.String outputBaseURI, javax.xml.namespace.QName initialTemplate, javax.xml.namespace.QName initialMode) throws javax.xml.transform.TransformerException
sourceDocument
- - the document to transform or null.outputBaseURI
- - the output base uri or null.initialTemplate
- the name of the initial template for the transformation or null.initialMode
- initialMode the initial mode to use or null.
javax.xml.transform.TransformerException
void setURIResolver(javax.xml.transform.URIResolver resolver)
resolver
- the uri resolver to use.void setCollectionURIResolver(CollectionURIResolver resolver)
resolver
- the uri resolver to use.void setTextURIResolver(TextURIResolver resolver)
resolver
- the uri resolver to use.void setErrorListener(javax.xml.transform.ErrorListener listener)
listener
- the error listener to use.void setOutputBaseURI(java.lang.String uri)
uri
- base output base uri as supplied to p:xslt.void setDefaultCollection(nu.xom.Document[] defaultCollection)
defaultCollection
- the documents on port "source" of p:xslt as Source
array.void clearParameter()
void setParameter(javax.xml.namespace.QName name, XdmSequence value)
name
- the name of the parameter to set.value
- the value of the parameter.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |