|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.nwalsh.saxon6.LineCountEmitter
Saxon extension to count the lines in a result tree fragment.
$Id: LineCountEmitter.java,v 1.2 2000/11/28 23:05:55 ndw Exp $
Copyright (C) 2000 Norman Walsh.
This class provides a Saxon 6.* implementation to count the number of lines in a result tree fragment.
The general design is this: the stylesheets construct a result tree fragment for some verbatim environment. That result tree fragment is "replayed" through the LineCountEmitter; the LineCountEmitter watches characters go by and counts the number of line feeds that it sees. That number is then returned.
Change Log:
Initial release.
Verbatim
Constructor Summary | |
LineCountEmitter()
Construct a new LineCountEmitter. |
Method Summary | |
void |
characters(char[] chars,
int start,
int len)
Process characters. |
void |
comment(char[] chars,
int start,
int length)
Discarded. |
void |
endDocument()
Discarded. |
void |
endElement(int nameCode)
Discarded. |
int |
lineCount()
Return the number of lines. |
void |
processingInstruction(java.lang.String name,
java.lang.String data)
Discarded. |
void |
reset()
Reset the number of lines. |
void |
setCharacterSet(com.icl.saxon.output.CharacterSet charset)
Discarded. |
void |
setDocumentLocator(org.xml.sax.Locator locator)
Discarded. |
void |
setEscaping(boolean escaping)
Discarded. |
void |
setNamePool(com.icl.saxon.om.NamePool namePool)
Discarded. |
void |
setOutputDetails(com.icl.saxon.output.OutputDetails details)
Discarded. |
void |
setUnparsedEntity(java.lang.String name,
java.lang.String uri)
Discarded. |
void |
setWriter(java.io.Writer writer)
Discarded. |
void |
startDocument()
Discarded. |
void |
startElement(int nameCode,
org.xml.sax.Attributes attributes,
int[] namespaces,
int nscount)
Discarded. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public LineCountEmitter()
Method Detail |
public void reset()
public int lineCount()
public void characters(char[] chars, int start, int len) throws org.xml.sax.SAXException
public void comment(char[] chars, int start, int length) throws org.xml.sax.SAXException
public void endDocument() throws org.xml.sax.SAXException
public void endElement(int nameCode) throws org.xml.sax.SAXException
public void processingInstruction(java.lang.String name, java.lang.String data) throws org.xml.sax.SAXException
public void setCharacterSet(com.icl.saxon.output.CharacterSet charset) throws org.xml.sax.SAXException
public void setDocumentLocator(org.xml.sax.Locator locator)
public void setEscaping(boolean escaping) throws org.xml.sax.SAXException
public void setNamePool(com.icl.saxon.om.NamePool namePool)
public void setOutputDetails(com.icl.saxon.output.OutputDetails details) throws org.xml.sax.SAXException
public void setUnparsedEntity(java.lang.String name, java.lang.String uri) throws org.xml.sax.SAXException
public void setWriter(java.io.Writer writer) throws org.xml.sax.SAXException
public void startDocument() throws org.xml.sax.SAXException
public void startElement(int nameCode, org.xml.sax.Attributes attributes, int[] namespaces, int nscount) throws org.xml.sax.SAXException
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |