| java.lang.Object org.w3c.tidy.PPrint
PPrint | public class PPrint (Code) | | Pretty print parse tree. Block-level and unknown elements are printed on new lines and their contents indented 2
spaces Inline elements are printed inline. Inline content is wrapped on spaces (except in attribute values or
preformatted text, after start tags and before end tags.
author: Dave Raggett dsr@w3.org author: Andy Quick ac.quick@sympatico.ca (translation to Java) author: Fabrizio Giustina version: $Revision: 1.60 $ ($Author: fgiust $) |
Method Summary | |
public void | addTransitionEffect(Lexer lexer, Node root, double duration) Add meta element for page transition effect, this works on IE but not NS. | int | cWrapLen(int ind) | public void | condFlushLine(Out fout, int indent) | public int | countSlides(Node node) Split parse tree by h2 elements and output to separate files. | public void | createSlides(Lexer lexer, Node root) Creates slides from h2. | public void | flushLine(Out fout, int indent) | public static int | getUTF8(byte[] str, int start, int[] ch) return one less than the number of bytes used by the UTF-8 byte sequence. | static boolean | hasCDATA(Lexer lexer, Node node) | void | printBody(Out fout, Lexer lexer, Node root, boolean xml) Print just the content of the body element. | public void | printSlide(Out fout, short mode, int indent, Lexer lexer) Called from printTree to print the content of a slide from the node slidecontent. | public void | printTree(Out fout, short mode, int indent, Lexer lexer, Node node) | public void | printXMLTree(Out fout, short mode, int indent, Lexer lexer, Node node) | public static int | putUTF8(byte[] buf, int start, int c) store char c as UTF-8 encoded byte stream. |
PPrint | public PPrint(Configuration configuration)(Code) | | Instantiates a new PPrint.
Parameters: configuration - configuration |
addTransitionEffect | public void addTransitionEffect(Lexer lexer, Node root, double duration)(Code) | | Add meta element for page transition effect, this works on IE but not NS.
Parameters: lexer - Parameters: root - Parameters: duration - |
cWrapLen | int cWrapLen(int ind)(Code) | | Parameters: ind - |
condFlushLine | public void condFlushLine(Out fout, int indent)(Code) | | Parameters: fout - Parameters: indent - |
countSlides | public int countSlides(Node node)(Code) | | Split parse tree by h2 elements and output to separate files. Counts number of h2 children (if any) belonging to
node.
Parameters: node - root node number of slides (number of h2 elements) |
createSlides | public void createSlides(Lexer lexer, Node root)(Code) | | Creates slides from h2.
Parameters: lexer - Lexer Parameters: root - root node |
flushLine | public void flushLine(Out fout, int indent)(Code) | | Parameters: fout - Parameters: indent - |
getUTF8 | public static int getUTF8(byte[] str, int start, int[] ch)(Code) | | return one less than the number of bytes used by the UTF-8 byte sequence. The Unicode char is returned in ch.
Parameters: str - points to the UTF-8 byte sequence Parameters: start - starting offset in str Parameters: ch - initialized to 1st byte, passed as an array to allow modification one less that the number of bytes used by UTF-8 char |
hasCDATA | static boolean hasCDATA(Lexer lexer, Node node)(Code) | | Does the current node contain a CDATA section?
Parameters: lexer - Lexer Parameters: node - Node true if node contains a CDATA section |
printBody | void printBody(Out fout, Lexer lexer, Node root, boolean xml)(Code) | | Print just the content of the body element. Useful when you want to reuse material from other documents.
Parameters: fout - Parameters: lexer - Parameters: root - Parameters: xml - |
printSlide | public void printSlide(Out fout, short mode, int indent, Lexer lexer)(Code) | | Called from printTree to print the content of a slide from the node slidecontent. On return slidecontent points
to the node starting the next slide or null. The variables slide and count are used to customise the navigation
bar.
Parameters: fout - Parameters: mode - Parameters: indent - Parameters: lexer - |
printTree | public void printTree(Out fout, short mode, int indent, Lexer lexer, Node node)(Code) | | Parameters: fout - Parameters: mode - Parameters: indent - Parameters: lexer - Parameters: node - |
printXMLTree | public void printXMLTree(Out fout, short mode, int indent, Lexer lexer, Node node)(Code) | | Parameters: fout - Parameters: mode - Parameters: indent - Parameters: lexer - Parameters: node - |
putUTF8 | public static int putUTF8(byte[] buf, int start, int c)(Code) | | store char c as UTF-8 encoded byte stream.
Parameters: buf - Parameters: start - Parameters: c - |
|
|