Package net.sf.saxon.event
Class NamePoolConverter
- java.lang.Object
-
- net.sf.saxon.event.SequenceReceiver
-
- net.sf.saxon.event.ProxyReceiver
-
- net.sf.saxon.event.NamePoolConverter
-
public class NamePoolConverter extends ProxyReceiver
This class is a filter that passes all Receiver events through unchanged, except that it changes namecodes to allow for the source and the destination using different NamePools. This is necessary when a stylesheet has been constructed as a general document (e.g. as the result of a transformation) and is passed to newTemplates() to be compiled as a stylesheet.The type annotations of nodes passed through this filter must be built-in types in the XSD namespace, because user-defined types belong to a specific Configuration and cannot readily be transferred. In practice the class is used only for untyped trees.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) NamePoolnewPool(package private) NamePoololdPool-
Fields inherited from class net.sf.saxon.event.ProxyReceiver
nextReceiver
-
Fields inherited from class net.sf.saxon.event.SequenceReceiver
pipelineConfiguration, previousAtomic, systemId
-
Fields inherited from interface javax.xml.transform.Result
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING
-
-
Constructor Summary
Constructors Constructor Description NamePoolConverter(Receiver next, NamePool oldPool, NamePool newPool)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidattribute(NodeName name, SimpleType type, CharSequence value, Location location, int properties)Handle an attributevoidstartElement(NodeName name, SchemaType type, Location location, int properties)Output element start tag-
Methods inherited from class net.sf.saxon.event.ProxyReceiver
append, characters, close, comment, endDocument, endElement, getNamePool, getNextReceiver, namespace, open, processingInstruction, setPipelineConfiguration, setSystemId, setUnderlyingReceiver, setUnparsedEntity, startContent, startDocument, usesTypeAnnotations
-
Methods inherited from class net.sf.saxon.event.SequenceReceiver
append, decompose, flatten, getConfiguration, getErrorCodeForDecomposingFunctionItems, getPipelineConfiguration, getSystemId, handlesAppend
-
-
-
-
Method Detail
-
startElement
public void startElement(NodeName name, SchemaType type, Location location, int properties) throws XPathException
Output element start tag- Specified by:
startElementin interfaceReceiver- Overrides:
startElementin classProxyReceiver- Parameters:
name- integer code identifying the name of the element within the name pool.type- the element's type annotation.location- a location associated with the event (typically either a location in the source document or the stylesheet)properties- properties of the element node- Throws:
XPathException- if an error occurs
-
attribute
public void attribute(NodeName name, SimpleType type, CharSequence value, Location location, int properties) throws XPathException
Handle an attribute- Specified by:
attributein interfaceReceiver- Overrides:
attributein classProxyReceiver- Parameters:
name- The name of the attributetype- The type of the attributevalue- the string value of the attributelocation- The location of the nodeproperties- Bit significant value. The following bits are defined:- DISABLE_ESCAPING
- Disable escaping for this attribute
- NO_SPECIAL_CHARACTERS
- Attribute value contains no special characters
- Throws:
XPathException- if an error occurs
-
-