|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.joost.stx.TransformerHandlerResolverImpl
The default implementation of an TransformerHandlerResolver
.
It supports currently only XSLT transformers.
Field Summary | |
TransformerHandlerResolver |
customResolver
A custom resolver object registered via Processor.setTransformerHandlerResolver(net.sf.joost.TransformerHandlerResolver) |
static String |
HTTP_POST_METHOD
The URI identifying the HTTP POST method |
private static String[] |
knownMethods
|
private static int |
M_POST
|
private static int |
M_SAX
|
private static int |
M_STX
|
private static int |
M_XSLT
|
static String |
SAX_METHOD
The URI identifying a SAX parser |
static String |
XSLT_METHOD
The URI identifying an XSLT transformation (the XSLT namespace) |
Constructor Summary | |
TransformerHandlerResolverImpl()
|
Method Summary | |
boolean |
available(String method)
Determines whether a requested filter is available or not, used by the STX function filter-available . |
private Hashtable |
createExternalParameters(Hashtable params)
Creates a new Hashtable with String values only |
TransformerHandler |
resolve(String method,
String href,
String base,
Hashtable params)
Resolves a TransformerHandler object for an external
transformation. |
private TransformerHandler |
resolve(String method,
String href,
String base,
XMLReader reader,
Hashtable params)
|
TransformerHandler |
resolve(String method,
XMLReader reader,
Hashtable params)
Resolves a TransformerHandler object for an external
transformation. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String XSLT_METHOD
public static final String SAX_METHOD
public static final String HTTP_POST_METHOD
private static String[] knownMethods
private static int M_STX
private static int M_XSLT
private static int M_SAX
private static int M_POST
public TransformerHandlerResolver customResolver
Processor.setTransformerHandlerResolver(net.sf.joost.TransformerHandlerResolver)
Constructor Detail |
public TransformerHandlerResolverImpl()
Method Detail |
private Hashtable createExternalParameters(Hashtable params)
public TransformerHandler resolve(String method, String href, String base, Hashtable params) throws SAXException
TransformerHandlerResolver
TransformerHandler
object for an external
transformation. This method will be called if the
filter-src
attribute contains an URL, or if this attribute
is missing at all.
resolve
in interface TransformerHandlerResolver
method
- an URI string provided in the filter-method
attribute, identifying the type of the requested filterhref
- the location of the source for the filter provided
in the filter-src
attribute (as pseudo-argument of
the url(...)
notation);
null
if the filter-src
attribute is
missingbase
- the base URI of the transformation sheetparams
- the set of parameters specified using
stx:with-param
elements, all values are
String
s
TransformerHandler
object that transforms a SAX
stream, or null
if the STX processor should try
to resolve the handler itself
SAXException
- if an error occurs during the creation or
initializationpublic TransformerHandler resolve(String method, XMLReader reader, Hashtable params) throws SAXException
TransformerHandlerResolver
TransformerHandler
object for an external
transformation. This method will be called if the
filter-src
attribute contains a buffer specification.
resolve
in interface TransformerHandlerResolver
method
- an URI string provided in the filter-method
attribute, identifying the type of the requested filterreader
- an XMLReader
object that provides the
source for the transformation as a stream of SAX events
(the contents of an stx:buffer
). Either
parse
method may be used, the required
parameters systemId
or input
respectively will be ignored by this reader.params
- the set of parameters specified using
stx:with-param
elements, all values are
String
s
TransformerHandler
object that transforms a SAX
stream, or null
if the STX processor should try
to resolve the handler itself
SAXException
- if an error occurs during the creation or
initializationprivate TransformerHandler resolve(String method, String href, String base, XMLReader reader, Hashtable params) throws SAXException
SAXException
public boolean available(String method)
TransformerHandlerResolver
filter-available
.
available
in interface TransformerHandlerResolver
method
- an URI string identifying the type of the requested filter
true
if this resolver will return a
TransformerHandler
object for this filter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |