本文整理匯總了Java中org.w3c.tidy.Tidy.setDropProprietaryAttributes方法的典型用法代碼示例。如果您正苦於以下問題:Java Tidy.setDropProprietaryAttributes方法的具體用法?Java Tidy.setDropProprietaryAttributes怎麽用?Java Tidy.setDropProprietaryAttributes使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.w3c.tidy.Tidy
的用法示例。
在下文中一共展示了Tidy.setDropProprietaryAttributes方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: JTidyBookProcessor
import org.w3c.tidy.Tidy; //導入方法依賴的package包/類
public JTidyBookProcessor()
{
tidy = new Tidy();
// tidy.setConfigurationFromFile(JTidyBookProcessor.class.getResource("/jtidy.properties").getFile());
tidy.setSpaces(2);
tidy.setIndentContent(true);
tidy.setSmartIndent(true);
tidy.setXHTML(true);
tidy.setQuoteMarks(false);
tidy.setQuoteAmpersand(true);
tidy.setDropEmptyParas(false);
tidy.setTidyMark(false);
tidy.setJoinClasses(true);
tidy.setJoinStyles(true);
tidy.setWraplen(0);
tidy.setDropProprietaryAttributes(true);
tidy.setEscapeCdata(true);
Properties props = new Properties();
props.put("new-blocklevel-tags", "svg image altGlyph altGlyphDef altGlyphItem animate animateColor animateMotion animateTransform circle clipPath color-profile cursor defs desc ellipse feBlend feColorMatrix feComponentTransfer feComposite feConvolveMatrix feDiffuseLighting feDisplacementMap feDistantLight feFlood feFuncA feFuncB feFuncG feFuncR feGaussianBlur feImage feMerge feMergeNode feMorphology feOffset fePointLight feSpecularLighting feSpotLight feTile feTurbulence filter font font-face font-face-format font-face-name font-face-src font-face-uri foreignObject g glyph glyphRef hkern image line linearGradient marker mask metadata missing-glyph mpath path pattern polygon polyline radialGradient rect script set stop style svg switch symbol text textPath title tref tspan use view vkern");
tidy.getConfiguration().addProps(props);
}
示例2: newTidy
import org.w3c.tidy.Tidy; //導入方法依賴的package包/類
/**
* Configures a new JTidy instance.
*/
private static Tidy newTidy() {
Tidy tidy = new Tidy();
tidy.setMessageListener(new TidyMessageListener() {
@Override
public void messageReceived(TidyMessage msg) {
logger.warn(String.format("HTML warning at %s:%s: %s", msg.getLine(), msg.getColumn(), msg.getMessage()));
}
});
tidy.setDropEmptyParas(false);
tidy.setDropFontTags(false);
tidy.setDropProprietaryAttributes(false);
tidy.setTrimEmptyElements(false);
tidy.setXHTML(true);
tidy.setIndentAttributes(false);
tidy.setIndentCdata(false);
tidy.setIndentContent(false);
tidy.setQuiet(true);
tidy.setShowWarnings(!Options.isQuietEnabled());
tidy.setShowErrors(0);
tidy.setEncloseBlockText(false);
tidy.setEscapeCdata(false);
tidy.setDocType("omit");
tidy.setInputEncoding("UTF-8");
tidy.setRawOut(true);
tidy.setOutputEncoding("UTF-8");
tidy.setFixUri(false);
Properties prop = new Properties();
prop.put("new-blocklevel-tags", "canvas");
tidy.getConfiguration().addProps(prop);
return tidy;
}
示例3: Beautifier
import org.w3c.tidy.Tidy; //導入方法依賴的package包/類
public Beautifier() {
tidy = new Tidy();
tidy.setWraplen(0);
//tidy.setDropEmptyParas(false);
tidy.setDropFontTags(false);
tidy.setDropProprietaryAttributes(false);
tidy.setIndentContent(true);
}