public abstract class AbstractTraxSerializerFactory extends Object implements SerializerFactory
Modifier and Type | Class and Description |
---|---|
static class |
AbstractTraxSerializerFactory.NamespaceAsAttributes
A pipe that ensures that all namespace prefixes are also present as
'xmlns:' attributes.
|
Constructor and Description |
---|
AbstractTraxSerializerFactory() |
Modifier and Type | Method and Description |
---|---|
protected void |
activate(org.osgi.service.component.ComponentContext ctx) |
Serializer |
createSerializer()
Create a new serializer for the pipeline.
|
protected void |
deactivat(org.osgi.service.component.ComponentContext ctx) |
protected abstract String |
getDoctypePublic() |
protected abstract String |
getDoctypeSystem() |
protected abstract String |
getOutputFormat() |
protected boolean |
needsNamespacesAsAttributes()
Checks if the used Trax implementation correctly handles namespaces set using
startPrefixMapping() , but wants them also as 'xmlns:' attributes. |
protected abstract String getOutputFormat()
protected abstract String getDoctypePublic()
protected abstract String getDoctypeSystem()
public Serializer createSerializer()
SerializerFactory
createSerializer
in interface SerializerFactory
SerializerFactory.createSerializer()
protected void activate(org.osgi.service.component.ComponentContext ctx)
protected void deactivat(org.osgi.service.component.ComponentContext ctx)
protected boolean needsNamespacesAsAttributes() throws Exception
startPrefixMapping()
, but wants them also as 'xmlns:' attributes.
The check consists in sending SAX events representing a minimal namespaced document
with namespaces defined only with calls to startPrefixMapping
(no
xmlns:xxx attributes) and check if they are present in the resulting text.
Exception
Copyright © 2007–2017 The Apache Software Foundation. All rights reserved.