Package com.saxonica.serialize
Class SerializerFactoryPE
java.lang.Object
net.sf.saxon.lib.SerializerFactory
com.saxonica.serialize.SerializerFactoryPE
Saxon-PE extensions to the serializer factory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddTextOutputFilter(Receiver next, Properties properties) Add a filter to the text output method pipeline.protected voidcheckExtensions(String key) checkOutputProperty(String key, String value) Check that a supplied output property is valid, and normalize the value (specifically in the case of boolean values where yes|true|1 are normalized to "yes", and no|false|0 are normalized to "no").protected SequenceReceivercreateSaxonSerializationMethod(String method, SerializationProperties serProps, PipelineConfiguration pipe, CharacterMapExpander characterMapExpander, ProxyReceiver normalizer, ExpandedStreamResult expandedResult, Result result) protected Comparator<AtomicValue> getPropertySorter(String propertyOrder) Get a Comparator that sorts key values in a map into the order implied by the serialization property saxon:property-orderprotected ProxyReceivernewAttributeSorter(Receiver next, Properties outputProperties) Create a new AttributeSorter, responsible for sorting of attributes into a specified order.protected EmitternewHTMLEmitter(Properties properties) Create a new HTML Emitter.protected ProxyReceivernewHTMLIndenter(Receiver next, Properties outputProperties) Create a new HTML Indenter.protected ReceivernewNamespaceSorter(Receiver next, Properties outputProperties) Create a new NamespaceSorter, responsible for sorting of namespaces into a specified order.protected EmitternewXHTMLEmitter(Properties properties) Create a new XHTML Emitter.protected ProxyReceivernewXHTMLIndenter(Receiver next, Properties outputProperties) Create a new XHTML Indenter.protected EmitternewXMLEmitter(Properties properties) Create a new XML Emitter.protected ProxyReceivernewXMLIndenter(XMLEmitter next, Properties outputProperties) Create a new XML Indenter.prepareNextStylesheet(PipelineConfiguration pipe, String href, String baseURI, Result result) Prepare another stylesheet to handle the output of this one.Methods inherited from class net.sf.saxon.lib.SerializerFactory
addHtml5Component, checkListOfEQNames, checkListOfEQNamesAllowingStar, checkNonNegativeInteger, checkYesOrNo, createHTMLSerializer, createTextSerializer, createUserDefinedOutputMethod, createXHTMLSerializer, createXMLSerializer, customizeAdaptiveSerializer, customizeJSONSerializer, getConfiguration, getReceiver, getReceiver, getReceiver, getReceiver, getXMLStreamWriter, injectCharacterMapExpander, injectUnicodeNormalizer, makeSequenceNormalizer, newCDATAFilter, newCharacterMapExpander, newHTMLMetaTagAdjuster, newHTMLURIEscaper, newSequenceWrapper, newTEXTEmitter, newUncommittedSerializer, newUnicodeNormalizer, newXHTMLMetaTagAdjuster, newXHTMLURIEscaper, newXML10ContentChecker
-
Constructor Details
-
SerializerFactoryPE
-
-
Method Details
-
createSaxonSerializationMethod
protected SequenceReceiver createSaxonSerializationMethod(String method, SerializationProperties serProps, PipelineConfiguration pipe, CharacterMapExpander characterMapExpander, ProxyReceiver normalizer, ExpandedStreamResult expandedResult, Result result) throws XPathException - Overrides:
createSaxonSerializationMethodin classSerializerFactory- Throws:
XPathException
-
newHTMLIndenter
Description copied from class:SerializerFactoryCreate a new HTML Indenter. This method exists so that it can be overridden in a subclass.- Overrides:
newHTMLIndenterin classSerializerFactory- Parameters:
next- the next receiver in the pipelineoutputProperties- the serialization parameters- Returns:
- the newly created HTML indenter.
-
newXHTMLIndenter
Description copied from class:SerializerFactoryCreate a new XHTML Indenter. This method exists so that it can be overridden in a subclass.- Overrides:
newXHTMLIndenterin classSerializerFactory- Parameters:
next- the next receiver in the pipelineoutputProperties- the serialization parameters- Returns:
- the newly created XHTML indenter.
-
newXMLIndenter
Description copied from class:SerializerFactoryCreate a new XML Indenter. This method exists so that it can be overridden in a subclass.- Overrides:
newXMLIndenterin classSerializerFactory- Parameters:
next- the next receiver in the pipelineoutputProperties- the serialization parameters- Returns:
- the newly created XML indenter.
-
newXMLEmitter
Description copied from class:SerializerFactoryCreate a new XML Emitter. This method exists so that it can be overridden in a subclass.- Overrides:
newXMLEmitterin classSerializerFactory- Parameters:
properties- the output properties- Returns:
- the newly created XML emitter.
-
newHTMLEmitter
Description copied from class:SerializerFactoryCreate a new HTML Emitter. This method exists so that it can be overridden in a subclass.- Overrides:
newHTMLEmitterin classSerializerFactory- Parameters:
properties- the output properties- Returns:
- the newly created HTML emitter.
-
newAttributeSorter
Create a new AttributeSorter, responsible for sorting of attributes into a specified order. This method exists so that it can be overridden in a subclass.- Overrides:
newAttributeSorterin classSerializerFactory- Parameters:
next- the next receiver in the pipelineoutputProperties- the serialization parameters- Returns:
- the newly created attribute sorter.
-
newNamespaceSorter
Create a new NamespaceSorter, responsible for sorting of namespaces into a specified order.- Overrides:
newNamespaceSorterin classSerializerFactory- Parameters:
next- the next receiver in the pipelineoutputProperties- the serialization parameters- Returns:
- the newly created filter.
-
newXHTMLEmitter
Create a new XHTML Emitter. This method exists so that it can be overridden in a subclass.- Overrides:
newXHTMLEmitterin classSerializerFactory- Parameters:
properties- the output properties- Returns:
- the newly created XHTML emitter.
-
addTextOutputFilter
Add a filter to the text output method pipeline. This does nothing unless overridden in a superclass- Overrides:
addTextOutputFilterin classSerializerFactory- Parameters:
next- the next receiver (typically the TextEmitter)properties- the output properties- Returns:
- the receiver to be used in place of the "next" receiver
- Throws:
XPathException- if the operation fails
-
prepareNextStylesheet
public SequenceReceiver prepareNextStylesheet(PipelineConfiguration pipe, String href, String baseURI, Result result) throws XPathException Prepare another stylesheet to handle the output of this one.This method is intended for internal use, to support the
saxon:next-in-chainextension.- Overrides:
prepareNextStylesheetin classSerializerFactory- Parameters:
pipe- the pipeline for the current transformationhref- URI of the next stylesheet to be appliedbaseURI- base URI for resolving href if it's a relative URIresult- the output destination of the current stylesheet- Returns:
- a replacement destination for the current stylesheet
- Throws:
XPathException- if any dynamic error occurs
-
checkOutputProperty
Check that a supplied output property is valid, and normalize the value (specifically in the case of boolean values where yes|true|1 are normalized to "yes", and no|false|0 are normalized to "no").- Overrides:
checkOutputPropertyin classSerializerFactory- Parameters:
key- the name of the property, in Clark formatvalue- the value of the property. This may be set to null, in which case no validation takes place. The value must be in JAXP format, that is, with lexical QNames expanded to Clark names- Returns:
- normalized value of the property, or null if the supplied value is null
- Throws:
XPathException- if the property name or value is invalid
-
checkExtensions
- Overrides:
checkExtensionsin classSerializerFactory
-
getPropertySorter
Get a Comparator that sorts key values in a map into the order implied by the serialization property saxon:property-order- Overrides:
getPropertySorterin classSerializerFactory- Parameters:
propertyOrder- the value of the saxon:property-order serialization property- Returns:
- a Comparator that implements the requested property order
-