|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.icl.saxon.output.Emitter
com.nwalsh.saxon.CopyEmitter
com.nwalsh.saxon.UnwrapLinksEmitter
Saxon extension to unwrap links in a result tree fragment.
$Id: UnwrapLinksEmitter.java,v 1.1 2002/06/26 11:02:05 nwalsh Exp $
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:
Initial release.
Field Summary | |
protected java.util.Stack |
elementStack
A stack for the preserving information about open elements. |
protected boolean |
foStylesheet
Is the stylesheet currently running an FO stylesheet? |
protected static java.lang.String |
foURI
The FO namespace name. |
protected int |
htmlAFingerprint
|
protected boolean |
inSkip
|
protected int |
linkDepth
Are we currently in a link? How deep? |
protected java.util.Stack |
saveStack
|
protected int |
skipDepth
|
protected boolean |
tryAgain
|
protected int |
xhtmlAFingerprint
|
protected static java.lang.String |
xhURI
The XHTML namespace name. |
Fields inherited from class com.nwalsh.saxon.CopyEmitter |
namePool, rtf, rtfEmitter |
Fields inherited from class com.icl.saxon.output.Emitter |
locator, outputProperties, outputStream, systemId, writer |
Fields inherited from interface javax.xml.transform.Result |
PI_DISABLE_OUTPUT_ESCAPING, PI_ENABLE_OUTPUT_ESCAPING |
Constructor Summary | |
UnwrapLinksEmitter(Controller controller,
NamePool namePool,
boolean foStylesheet)
Constructor for the UnwrapLinksEmitter. |
Method Summary | |
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()
|
Methods inherited from class com.nwalsh.saxon.CopyEmitter |
characters, comment, endDocument, getResultTreeFragment, processingInstruction, setDocumentLocator, setEscaping, setNamePool, setUnparsedEntity, setWriter, startDocument |
Methods inherited from class com.icl.saxon.output.Emitter |
getNamePool, getOutputProperties, getOutputStream, getSystemId, getWriter, makeEmitter, setOutputProperties, setOutputStream, setSystemId, usesWriter |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.Stack elementStack
protected java.util.Stack saveStack
protected static java.lang.String foURI
protected static java.lang.String xhURI
protected boolean foStylesheet
protected int linkDepth
protected int skipDepth
protected int htmlAFingerprint
protected int xhtmlAFingerprint
protected boolean inSkip
protected boolean tryAgain
Constructor Detail |
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?Method Detail |
public void startElement(int nameCode, org.xml.sax.Attributes attributes, int[] namespaces, int nscount) throws javax.xml.transform.TransformerException
startElement
in class CopyEmitter
javax.xml.transform.TransformerException
public void endElement(int nameCode) throws javax.xml.transform.TransformerException
endElement
in class CopyEmitter
javax.xml.transform.TransformerException
public boolean tryAgain() throws javax.xml.transform.TransformerException
javax.xml.transform.TransformerException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |