java.io.Serializablepublic class Configuration
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field | Description |
|---|---|---|
protected java.lang.String |
altText |
default text for alt attribute.
|
static int |
ASCII |
Deprecated.
|
protected boolean |
asciiChars |
convert quotes and dashes to nearest ASCII char.
|
static int |
BIG5 |
Deprecated.
|
protected boolean |
bodyOnly |
output BODY content only.
|
protected boolean |
breakBeforeBR |
o/p newline before br or not?
|
protected boolean |
burstSlides |
create slides on each h2 element.
|
protected java.lang.String |
cssPrefix |
CSS class naming for -clean option.
|
protected int |
definedTags |
track what types of tags user has defined to eliminate unnecessary searches.
|
static int |
DOCTYPE_AUTO |
treatment of doctype: auto.
|
static int |
DOCTYPE_LOOSE |
treatment of doctype: loose.
|
static int |
DOCTYPE_OMIT |
treatment of doctype: omit.
|
static int |
DOCTYPE_STRICT |
treatment of doctype: strict.
|
static int |
DOCTYPE_USER |
treatment of doctype: user.
|
protected int |
docTypeMode |
see doctype property.
|
protected java.lang.String |
docTypeStr |
user specified doctype.
|
protected boolean |
dropEmptyParas |
discard empty p elements.
|
protected boolean |
dropFontTags |
discard presentation tags.
|
protected boolean |
dropProprietaryAttributes |
discard proprietary attributes.
|
protected int |
duplicateAttrs |
Keep first or last duplicate attribute.
|
protected boolean |
emacs |
if true format error output for GNU Emacs.
|
protected boolean |
encloseBlockText |
if yes text in blocks is wrapped in p's.
|
protected boolean |
encloseBodyText |
if yes text at body is wrapped in p's.
|
protected java.lang.String |
errfile |
file name to write errors to.
|
protected boolean |
escapeCdata |
replace CDATA sections with escaped text.
|
protected boolean |
fixBackslash |
fix URLs by replacing \ with /.
|
protected boolean |
fixComments |
fix comments with adjacent hyphens.
|
protected boolean |
fixUri |
properly escape URLs.
|
protected boolean |
forceOutput |
output document even if errors were found.
|
protected boolean |
hideComments |
hides all (real) comments in output.
|
protected boolean |
hideEndTags |
suppress optional end tags.
|
protected boolean |
htmlOut |
output plain-old HTML, even for XHTML input.
|
protected boolean |
indentAttributes |
newline+indent before each attribute.
|
protected boolean |
indentCdata |
indent CDATA sections.
|
protected boolean |
indentContent |
indent content of appropriate tags.
|
static int |
ISO2022 |
Deprecated.
|
protected boolean |
joinClasses |
join multiple class attributes.
|
protected boolean |
joinStyles |
join multiple style attributes.
|
static int |
KEEP_FIRST |
Keep first duplicate attribute.
|
static int |
KEEP_LAST |
Keep last duplicate attribute.
|
protected boolean |
keepFileTimes |
if yes last modied time is preserved.
|
protected java.lang.String |
language |
RJ language property.
|
static int |
LATIN1 |
Deprecated.
|
protected boolean |
literalAttribs |
if true attributes may use newlines.
|
protected boolean |
logicalEmphasis |
replace i by em and b by strong.
|
protected boolean |
lowerLiterals |
folds known attribute values to lower case.
|
static int |
MACROMAN |
Deprecated.
|
protected boolean |
makeBare |
Make bare HTML: remove Microsoft cruft.
|
protected boolean |
makeClean |
remove presentational clutter.
|
protected boolean |
ncr |
allow numeric character references.
|
protected char[] |
newline |
bytes for the newline marker.
|
protected boolean |
numEntities |
use numeric entities.
|
protected boolean |
onlyErrors |
if true normal output is suppressed.
|
protected boolean |
quiet |
no 'Parsing X', guessed DTD or summary.
|
protected boolean |
quoteAmpersand |
output naked ampersand as &.
|
protected boolean |
quoteMarks |
output " marks as ".
|
protected boolean |
quoteNbsp |
output non-breaking space as entity.
|
static int |
RAW |
Deprecated.
use
Tidy.setRawOut(true) for raw output |
protected boolean |
rawOut |
Avoid mapping values > 127 to entities.
|
protected boolean |
replaceColor |
replace hex color attribute values with names.
|
protected java.lang.String |
replacementCharEncoding |
char encoding used when replacing illegal SGML chars, regardless of specified encoding.
|
protected Report |
report |
Report instance.
|
static int |
SHIFTJIS |
Deprecated.
|
protected int |
showErrors |
number of errors to put out.
|
protected boolean |
showWarnings |
however errors are always shown.
|
protected java.lang.String |
slidestyle |
Deprecated.
does nothing
|
protected boolean |
smartIndent |
does text/block level content effect indentation.
|
protected int |
spaces |
default indentation.
|
protected int |
tabsize |
default tab size (8).
|
protected boolean |
tidyMark |
add meta element indicating tidied doc.
|
protected boolean |
trimEmpty |
trim empty elements.
|
protected TagTable |
tt |
TagTable associated with this Configuration.
|
protected boolean |
upperCaseAttrs |
output attributes in upper not lower case.
|
protected boolean |
upperCaseTags |
output tags in upper not lower case.
|
static int |
UTF16 |
Deprecated.
|
static int |
UTF16BE |
Deprecated.
|
static int |
UTF16LE |
Deprecated.
|
static int |
UTF8 |
Deprecated.
|
static int |
WIN1252 |
Deprecated.
|
protected boolean |
word2000 |
draconian cleaning for Word2000.
|
protected boolean |
wrapAsp |
wrap within ASP pseudo elements.
|
protected boolean |
wrapAttVals |
wrap within attribute values.
|
protected boolean |
wrapJste |
wrap within JSTE pseudo elements.
|
protected int |
wraplen |
default wrap margin (68).
|
protected boolean |
wrapPhp |
wrap within PHP pseudo elements.
|
protected boolean |
wrapScriptlets |
wrap within JavaScript string literals.
|
protected boolean |
wrapSection |
wrap within CDATA section tags.
|
protected boolean |
writeback |
if true then output tidied markup.
|
protected boolean |
xHTML |
output extensible HTML.
|
protected boolean |
xmlOut |
create output as XML.
|
protected boolean |
xmlPi |
add
<?xml?> for XML docs. |
protected boolean |
xmlPIs |
If set to yes PIs must end with
?>. |
protected boolean |
xmlSpace |
if set to yes adds xml:space attr as needed.
|
protected boolean |
xmlTags |
treat input as XML.
|
| Modifier | Constructor | Description |
|---|---|---|
protected |
Configuration(Report report) |
Instantiates a new Configuration.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
addProps(java.util.Properties p) |
adds configuration Properties.
|
void |
adjust() |
Ensure that config is self consistent.
|
protected java.lang.String |
convertCharEncoding(int code) |
Convert a char encoding from the deprecated tidy constant to a standard java encoding name.
|
protected java.lang.String |
getInCharEncodingName() |
Getter for
inCharEncodingName. |
protected java.lang.String |
getOutCharEncodingName() |
Getter for
outCharEncodingName. |
static boolean |
isKnownOption(java.lang.String name) |
Is the given String a valid configuration flag?
|
void |
parseFile(java.lang.String filename) |
Parses a property file.
|
protected void |
setInCharEncoding(int encoding) |
Deprecated.
use setInCharEncodingName(String)
|
protected void |
setInCharEncodingName(java.lang.String encoding) |
Setter for
inCharEncodingName. |
protected void |
setInOutEncodingName(java.lang.String encoding) |
Setter for
inOutCharEncodingName. |
protected void |
setOutCharEncoding(int encoding) |
Deprecated.
use setOutCharEncodingName(String)
|
protected void |
setOutCharEncodingName(java.lang.String encoding) |
Setter for
outCharEncodingName. |
public static final int RAW
Tidy.setRawOut(true) for raw outputpublic static final int ASCII
public static final int LATIN1
public static final int UTF8
public static final int ISO2022
public static final int MACROMAN
public static final int UTF16LE
public static final int UTF16BE
public static final int UTF16
public static final int WIN1252
public static final int BIG5
public static final int SHIFTJIS
public static final int DOCTYPE_OMIT
public static final int DOCTYPE_AUTO
public static final int DOCTYPE_STRICT
public static final int DOCTYPE_LOOSE
public static final int DOCTYPE_USER
public static final int KEEP_LAST
public static final int KEEP_FIRST
protected int spaces
protected int wraplen
protected int tabsize
protected int docTypeMode
protected int duplicateAttrs
protected java.lang.String altText
protected java.lang.String slidestyle
protected java.lang.String language
protected java.lang.String docTypeStr
protected java.lang.String errfile
protected boolean writeback
protected boolean onlyErrors
protected boolean showWarnings
protected boolean quiet
protected boolean indentContent
protected boolean smartIndent
protected boolean hideEndTags
protected boolean xmlTags
protected boolean xmlOut
protected boolean xHTML
protected boolean htmlOut
protected boolean xmlPi
<?xml?> for XML docs.protected boolean upperCaseTags
protected boolean upperCaseAttrs
protected boolean makeClean
protected boolean makeBare
protected boolean logicalEmphasis
protected boolean dropFontTags
protected boolean dropProprietaryAttributes
protected boolean dropEmptyParas
protected boolean fixComments
protected boolean trimEmpty
protected boolean breakBeforeBR
protected boolean burstSlides
protected boolean numEntities
protected boolean quoteMarks
protected boolean quoteNbsp
protected boolean quoteAmpersand
protected boolean wrapAttVals
protected boolean wrapScriptlets
protected boolean wrapSection
protected boolean wrapAsp
protected boolean wrapJste
protected boolean wrapPhp
protected boolean fixBackslash
protected boolean indentAttributes
protected boolean xmlPIs
?>.protected boolean xmlSpace
protected boolean encloseBodyText
protected boolean encloseBlockText
protected boolean keepFileTimes
protected boolean word2000
protected boolean tidyMark
protected boolean emacs
protected boolean literalAttribs
protected boolean bodyOnly
protected boolean fixUri
protected boolean lowerLiterals
protected boolean replaceColor
protected boolean hideComments
protected boolean indentCdata
protected boolean forceOutput
protected int showErrors
protected boolean asciiChars
protected boolean joinClasses
protected boolean joinStyles
protected boolean escapeCdata
protected boolean ncr
protected java.lang.String cssPrefix
protected java.lang.String replacementCharEncoding
protected TagTable tt
protected Report report
protected int definedTags
protected char[] newline
protected boolean rawOut
protected Configuration(Report report)
report - Report instancepublic void addProps(java.util.Properties p)
p - Propertiespublic void parseFile(java.lang.String filename)
filename - file namepublic static boolean isKnownOption(java.lang.String name)
name - configuration parameter nametrue if the given String is a valid config optionpublic void adjust()
protected java.lang.String getInCharEncodingName()
inCharEncodingName.protected void setInCharEncodingName(java.lang.String encoding)
inCharEncodingName.encoding - The inCharEncodingName to set.protected java.lang.String getOutCharEncodingName()
outCharEncodingName.protected void setOutCharEncodingName(java.lang.String encoding)
outCharEncodingName.encoding - The outCharEncodingName to set.protected void setInOutEncodingName(java.lang.String encoding)
inOutCharEncodingName.encoding - The CharEncodingName to set.protected void setOutCharEncoding(int encoding)
outCharEncoding.encoding - The outCharEncoding to set.protected void setInCharEncoding(int encoding)
inCharEncoding.encoding - The inCharEncoding to set.protected java.lang.String convertCharEncoding(int code)
code - encoding code