public abstract class XslTransformationUtil extends Object
XslTransformation
s.Constructor and Description |
---|
XslTransformationUtil() |
Modifier and Type | Method and Description |
---|---|
static org.apache.velocity.VelocityContext |
createStrictVelocityContext()
Create a new
VelocityContext that lets template merging fail if
an invalid reference is encountered. |
static String |
selectInstances(TypeEntityDefinition ted,
String context,
NamespaceContext namespaces)
Create a XPath statement to select instances specified by the given type
entity definition.
|
static XMLStreamWriter |
setupXMLWriter(OutputStream outStream,
NamespaceContext namespaces)
Setup a XML writer configured with the namespace prefixes and UTF-8
encoding.
|
public static String selectInstances(TypeEntityDefinition ted, String context, NamespaceContext namespaces)
ted
- the type entity definitioncontext
- the context for the XPath expression, e.g. the empty
string for the document root or /
for anywhere in
the documentnamespaces
- the namespace contextnull
if there are no
elements that match the typepublic static XMLStreamWriter setupXMLWriter(OutputStream outStream, NamespaceContext namespaces) throws XMLStreamException
outStream
- the output stream to write the XML content tonamespaces
- the namespace context, e.g. as retrieved from a
XsltGenerationContext
XMLStreamException
- if an error occurs setting up the writerpublic static org.apache.velocity.VelocityContext createStrictVelocityContext()
VelocityContext
that lets template merging fail if
an invalid reference is encountered.Build 2013-10-07_11-27-38
Revision 99b27713a799a59a21b0b166eaaea8aaefbf125a