Sidar, principal.
>>contenido
Fundación Sidar - Acceso Universal
Seminario SIDAR
Principal >> Aplicación: UAW >> Documentación de las clases java

org.w3c.tidy
Class Lexer

java.lang.Object
  |
  +--org.w3c.tidy.Lexer

public class Lexer
extends java.lang.Object

Clase de Tidy adaptada a las necesidades del paquete uaw.


Nested Class Summary
private static class Lexer.W3CVersionInfo
Field Summary
short badAccess
short badChars
boolean badDoctype
short badForm
short badLayout
int columns
Configuration configuration
private static short DIGIT
int doctype
short errors
java.io.PrintWriter errout
boolean excludeBlocks
boolean exiled
static short IgnoreMarkup
static short IgnoreWhitespace
org.w3c.tidy.StreamIn in
org.w3c.tidy.Node inode
int insert
boolean insertspace
java.util.Stack istack
int istackbase
boolean isvoyager
private static short LETTER
private static short LEX_ASP
private static short LEX_CDATA
private static short LEX_COMMENT
private static short LEX_CONTENT
private static short LEX_DOCTYPE
private static short LEX_ENDCOMMENT
private static short LEX_ENDTAG
private static short LEX_GT
private static short LEX_JSTE
private static short LEX_PHP
private static short LEX_PROCINSTR
private static short LEX_SECTION
private static short LEX_STARTTAG
byte[] lexbuf
int lexlength
private static short[] lexmap
int lexsize
int lines
private static short LOWERCASE
static short MixedContent
private static short NAMECHAR
private static short NEWLINE
private java.util.Vector nodeList
static short Preformatted
boolean pushed
protected int seenBodyEndTag
short state
org.w3c.tidy.Style styles
org.w3c.tidy.Node token
int txtend
int txtstart
private static short UPPERCASE
short versions
private static java.lang.String voyager_frameset
private static java.lang.String voyager_loose
private static java.lang.String voyager_strict
private static Lexer.W3CVersionInfo[] W3CVersion
short warnings
boolean waswhite
private static short WHITE
private static java.lang.String XHTML_NAMESPACE
Constructor Summary
Lexer (org.w3c.tidy.StreamIn in, Configuration configuration)
Method Summary
void addByte (int c)
void addCharToLexer (int c)
boolean addGenerator (org.w3c.tidy.Node root)
void addStringLiteral (java.lang.String str)
void addStringToLexer (java.lang.String str)
short apparentVersion ()
boolean canPrune (org.w3c.tidy.Node element)
void changeChar (byte c)
boolean checkDocTypeKeyWords (org.w3c.tidy.Node doctype)
org.w3c.tidy.AttVal cloneAttributes (org.w3c.tidy.AttVal attrs)
org.w3c.tidy.Node cloneNode (org.w3c.tidy.Node node)
void deferDup ()
boolean endOfInput ()
static boolean expectsContent (org.w3c.tidy.Node node)
private static boolean findBadSubString (java.lang.String s, java.lang.String p, int len)
short findGivenVersion (org.w3c.tidy.Node doctype)
boolean fixDocType (org.w3c.tidy.Node root)
void fixHTMLNameSpace (org.w3c.tidy.Node root, java.lang.String profile)
void fixId (org.w3c.tidy.Node node)
boolean fixXMLPI (org.w3c.tidy.Node root)
static char foldCase (char c, boolean tocaps, boolean xmlTags)
static byte[] getBytes (java.lang.String str)
org.w3c.tidy.Node getCDATA (org.w3c.tidy.Node container)
static java.lang.String getString (byte[] bytes, int offset, int length)
org.w3c.tidy.Node getToken (short mode)
short HTMLVersion ()
java.lang.String HTMLVersionName ()
org.w3c.tidy.Node inferredTag (java.lang.String name)
int inlineDup (org.w3c.tidy.Node node)
org.w3c.tidy.Node insertedToken ()
private static boolean isDigit (char c)
private static boolean isLetter (char c)
boolean isPushed (org.w3c.tidy.Node node)
static boolean isValidAttrName (java.lang.String attr)
private static boolean isWhite (char c)
private static short MAP (char c)
private static void mapStr (java.lang.String str, short code)
org.w3c.tidy.Node newLineNode ()
org.w3c.tidy.Node newNode ()
org.w3c.tidy.Node newNode (short type, byte[] textarray, int start, int end)
org.w3c.tidy.Node newNode (short type, byte[] textarray, int start, int end, java.lang.String element)
org.w3c.tidy.Node parseAsp ()
java.lang.String parseAttribute (org.w3c.tidy.MutableBoolean isempty, org.w3c.tidy.MutableObject asp, org.w3c.tidy.MutableObject php)
org.w3c.tidy.AttVal parseAttrs (org.w3c.tidy.MutableBoolean isempty)
void parseEntity (short mode)
org.w3c.tidy.Node parsePhp ()
int parseServerInstruction ()
char parseTagName ()
java.lang.String parseValue (java.lang.String name, boolean foldCase, org.w3c.tidy.MutableBoolean isempty, org.w3c.tidy.MutableInteger pdelim)
void popInline (org.w3c.tidy.Node node)
void pushInline (org.w3c.tidy.Node node)
boolean setXHTMLDocType (org.w3c.tidy.Node root)
private static char toLower (char c)
private static char toUpper (char c)
void ungetToken ()
protected void updateNodeTextArrays (byte[] oldtextarray, byte[] newtextarray)
static int wstrcasecmp (java.lang.String s1, java.lang.String s2)
static int wstrcaselexcmp (java.lang.String s1, java.lang.String s2)
static boolean wsubstr (java.lang.String s1, java.lang.String s2)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

in

public org.w3c.tidy.StreamIn in

errout

public java.io.PrintWriter errout

badAccess

public short badAccess

badLayout

public short badLayout

badChars

public short badChars

badForm

public short badForm

warnings

public short warnings

errors

public short errors

lines

public int lines

columns

public int columns

waswhite

public boolean waswhite

pushed

public boolean pushed

insertspace

public boolean insertspace

excludeBlocks

public boolean excludeBlocks

exiled

public boolean exiled

isvoyager

public boolean isvoyager

versions

public short versions

doctype

public int doctype

badDoctype

public boolean badDoctype

txtstart

public int txtstart

txtend

public int txtend

state

public short state

token

public org.w3c.tidy.Node token

lexbuf

public byte[] lexbuf

lexlength

public int lexlength

lexsize

public int lexsize

inode

public org.w3c.tidy.Node inode

insert

public int insert

istack

public java.util.Stack istack

istackbase

public int istackbase

styles

public org.w3c.tidy.Style styles

configuration

public Configuration configuration

seenBodyEndTag

protected int seenBodyEndTag

nodeList

private java.util.Vector nodeList

IgnoreWhitespace

public static final short IgnoreWhitespace
See Also:
Constant Field Values

MixedContent

public static final short MixedContent
See Also:
Constant Field Values

Preformatted

public static final short Preformatted
See Also:
Constant Field Values

IgnoreMarkup

public static final short IgnoreMarkup
See Also:
Constant Field Values

DIGIT

private static final short DIGIT
See Also:
Constant Field Values

LETTER

private static final short LETTER
See Also:
Constant Field Values

NAMECHAR

private static final short NAMECHAR
See Also:
Constant Field Values

WHITE

private static final short WHITE
See Also:
Constant Field Values

NEWLINE

private static final short NEWLINE
See Also:
Constant Field Values

LOWERCASE

private static final short LOWERCASE
See Also:
Constant Field Values

UPPERCASE

private static final short UPPERCASE
See Also:
Constant Field Values

LEX_CONTENT

private static final short LEX_CONTENT
See Also:
Constant Field Values

LEX_GT

private static final short LEX_GT
See Also:
Constant Field Values

LEX_ENDTAG

private static final short LEX_ENDTAG
See Also:
Constant Field Values

LEX_STARTTAG

private static final short LEX_STARTTAG
See Also:
Constant Field Values

LEX_COMMENT

private static final short LEX_COMMENT
See Also:
Constant Field Values

LEX_DOCTYPE

private static final short LEX_DOCTYPE
See Also:
Constant Field Values

LEX_PROCINSTR

private static final short LEX_PROCINSTR
See Also:
Constant Field Values

LEX_ENDCOMMENT

private static final short LEX_ENDCOMMENT
See Also:
Constant Field Values

LEX_CDATA

private static final short LEX_CDATA
See Also:
Constant Field Values

LEX_SECTION

private static final short LEX_SECTION
See Also:
Constant Field Values

LEX_ASP

private static final short LEX_ASP
See Also:
Constant Field Values

LEX_JSTE

private static final short LEX_JSTE
See Also:
Constant Field Values

LEX_PHP

private static final short LEX_PHP
See Also:
Constant Field Values

lexmap

private static short[] lexmap

voyager_loose

private static final java.lang.String voyager_loose
See Also:
Constant Field Values

voyager_strict

private static final java.lang.String voyager_strict
See Also:
Constant Field Values

voyager_frameset

private static final java.lang.String voyager_frameset
See Also:
Constant Field Values

XHTML_NAMESPACE

private static final java.lang.String XHTML_NAMESPACE
See Also:
Constant Field Values

W3CVersion

private static Lexer.W3CVersionInfo[] W3CVersion
Constructor Detail

Lexer

public Lexer(org.w3c.tidy.StreamIn in,
             Configuration configuration)
Method Detail

newNode

public org.w3c.tidy.Node newNode()

newNode

public org.w3c.tidy.Node newNode(short type,
                                 byte[] textarray,
                                 int start,
                                 int end)

newNode

public org.w3c.tidy.Node newNode(short type,
                                 byte[] textarray,
                                 int start,
                                 int end,
                                 java.lang.String element)

cloneNode

public org.w3c.tidy.Node cloneNode(org.w3c.tidy.Node node)

cloneAttributes

public org.w3c.tidy.AttVal cloneAttributes(org.w3c.tidy.AttVal attrs)

updateNodeTextArrays

protected void updateNodeTextArrays(byte[] oldtextarray,
                                    byte[] newtextarray)

newLineNode

public org.w3c.tidy.Node newLineNode()

getBytes

public static byte[] getBytes(java.lang.String str)

getString

public static java.lang.String getString(byte[] bytes,
                                         int offset,
                                         int length)

endOfInput

public boolean endOfInput()

addByte

public void addByte(int c)

changeChar

public void changeChar(byte c)

addCharToLexer

public void addCharToLexer(int c)

addStringToLexer

public void addStringToLexer(java.lang.String str)

parseEntity

public void parseEntity(short mode)

parseTagName

public char parseTagName()

addStringLiteral

public void addStringLiteral(java.lang.String str)

HTMLVersion

public short HTMLVersion()

HTMLVersionName

public java.lang.String HTMLVersionName()

addGenerator

public boolean addGenerator(org.w3c.tidy.Node root)

findBadSubString

private static boolean findBadSubString(java.lang.String s,
                                        java.lang.String p,
                                        int len)

checkDocTypeKeyWords

public boolean checkDocTypeKeyWords(org.w3c.tidy.Node doctype)

findGivenVersion

public short findGivenVersion(org.w3c.tidy.Node doctype)

fixHTMLNameSpace

public void fixHTMLNameSpace(org.w3c.tidy.Node root,
                             java.lang.String profile)

setXHTMLDocType

public boolean setXHTMLDocType(org.w3c.tidy.Node root)

apparentVersion

public short apparentVersion()

fixDocType

public boolean fixDocType(org.w3c.tidy.Node root)

fixXMLPI

public boolean fixXMLPI(org.w3c.tidy.Node root)

inferredTag

public org.w3c.tidy.Node inferredTag(java.lang.String name)

expectsContent

public static boolean expectsContent(org.w3c.tidy.Node node)

getCDATA

public org.w3c.tidy.Node getCDATA(org.w3c.tidy.Node container)

ungetToken

public void ungetToken()

getToken

public org.w3c.tidy.Node getToken(short mode)

parseAsp

public org.w3c.tidy.Node parseAsp()

parsePhp

public org.w3c.tidy.Node parsePhp()

parseAttribute

public java.lang.String parseAttribute(org.w3c.tidy.MutableBoolean isempty,
                                       org.w3c.tidy.MutableObject asp,
                                       org.w3c.tidy.MutableObject php)

parseServerInstruction

public int parseServerInstruction()

parseValue

public java.lang.String parseValue(java.lang.String name,
                                   boolean foldCase,
                                   org.w3c.tidy.MutableBoolean isempty,
                                   org.w3c.tidy.MutableInteger pdelim)

isValidAttrName

public static boolean isValidAttrName(java.lang.String attr)

parseAttrs

public org.w3c.tidy.AttVal parseAttrs(org.w3c.tidy.MutableBoolean isempty)

pushInline

public void pushInline(org.w3c.tidy.Node node)

popInline

public void popInline(org.w3c.tidy.Node node)

isPushed

public boolean isPushed(org.w3c.tidy.Node node)

inlineDup

public int inlineDup(org.w3c.tidy.Node node)

insertedToken

public org.w3c.tidy.Node insertedToken()

wstrcasecmp

public static int wstrcasecmp(java.lang.String s1,
                              java.lang.String s2)

wstrcaselexcmp

public static int wstrcaselexcmp(java.lang.String s1,
                                 java.lang.String s2)

wsubstr

public static boolean wsubstr(java.lang.String s1,
                              java.lang.String s2)

canPrune

public boolean canPrune(org.w3c.tidy.Node element)

fixId

public void fixId(org.w3c.tidy.Node node)

deferDup

public void deferDup()

mapStr

private static void mapStr(java.lang.String str,
                           short code)

MAP

private static short MAP(char c)

isWhite

private static boolean isWhite(char c)

isDigit

private static boolean isDigit(char c)

isLetter

private static boolean isLetter(char c)

toLower

private static char toLower(char c)

toUpper

private static char toUpper(char c)

foldCase

public static char foldCase(char c,
                            boolean tocaps,
                            boolean xmlTags)