com.nwalsh.saxon
Class UnwrapLinksEmitter
com.icl.saxon.output.Emitter
public class UnwrapLinksEmitter
Saxon extension to unwrap links in a result tree fragment.
$Id: UnwrapLinksEmitter.java 1731 2002-06-26 11:03:05Z nwalsh $
Copyright (C) 2000, 2002 Norman Walsh.
This class provides the guts of a
Saxon 6.*
implementation of a link unwrapper.
The general design is this: the stylesheets construct a result tree
fragment for some environment. Then the result tree fragment
is "replayed" through the UnwrapLinksEmitter; the UnwrapLinksEmitter
builds a
new result tree fragment from this event stream with top-level links unwrapped.
That RTF is returned. Note that only a
single level of unwrapping
is performed. This is clearly a crude implementation.
Change Log:
UnwrapLinksEmitter(Controller controller, NamePool namePool, boolean foStylesheet) - Constructor for the UnwrapLinksEmitter.
|
void | endElement(int nameCode) - Process end element events.
|
void | startElement(int nameCode, org.xml.sax.Attributes attributes, int[] namespaces, int nscount) - Process start element events.
|
boolean | tryAgain()
|
characters , comment , endDocument , endElement , getResultTreeFragment , processingInstruction , setDocumentLocator , setEscaping , setNamePool , setUnparsedEntity , setWriter , startDocument , startElement |
elementStack
protected Stack elementStack
A stack for the preserving information about open elements.
foStylesheet
protected boolean foStylesheet
Is the stylesheet currently running an FO stylesheet?
foURI
protected static String foURI
The FO namespace name.
htmlAFingerprint
protected int htmlAFingerprint
inSkip
protected boolean inSkip
linkDepth
protected int linkDepth
Are we currently in a link? How deep?
saveStack
protected Stack saveStack
skipDepth
protected int skipDepth
tryAgain
protected boolean tryAgain
xhURI
protected static String xhURI
The XHTML namespace name.
xhtmlAFingerprint
protected int xhtmlAFingerprint
UnwrapLinksEmitter
public UnwrapLinksEmitter(Controller controller,
NamePool namePool,
boolean foStylesheet)
Constructor for the UnwrapLinksEmitter.
namePool
- The name pool to use for constructing elements and attributes.foStylesheet
- Is this an FO stylesheet?
endElement
public void endElement(int nameCode)
throws TransformerException
Process end element events.
- endElement in interface CopyEmitter
startElement
public void startElement(int nameCode,
org.xml.sax.Attributes attributes,
int[] namespaces,
int nscount)
throws TransformerException
Process start element events.
- startElement in interface CopyEmitter
tryAgain
public boolean tryAgain()
throws TransformerException