net.sf.saxon.event

Class 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.

Author: Michael Kay

Field Summary
NamePoolnewPool
NamePoololdPool
Constructor Summary
NamePoolConverter(NamePool oldPool, NamePool newPool)
Constructor
Method Summary
voidattribute(int nameCode, int typeCode, CharSequence value, int locationId, int properties)
Handle an attribute
voidnamespace(int namespaceCode, int properties)
Handle a namespace
voidsetUnderlyingReceiver(Receiver receiver)
Set the underlying emitter.
voidstartElement(int nameCode, int typeCode, int locationId, int properties)
Output element start tag

Field Detail

newPool

NamePool newPool

oldPool

NamePool oldPool

Constructor Detail

NamePoolConverter

public NamePoolConverter(NamePool oldPool, NamePool newPool)
Constructor

Method Detail

attribute

public void attribute(int nameCode, int typeCode, CharSequence value, int locationId, int properties)
Handle an attribute

namespace

public void namespace(int namespaceCode, int properties)
Handle a namespace

setUnderlyingReceiver

public void setUnderlyingReceiver(Receiver receiver)
Set the underlying emitter. This call is mandatory before using the Emitter. This version is modified from that of the parent class to avoid setting the namePool of the destination Receiver.

startElement

public void startElement(int nameCode, int typeCode, int locationId, int properties)
Output element start tag