org.owasp.validator.css
public class CssHandler extends java.lang.Object implements org.w3c.css.sac.DocumentHandler
javax.swing.text.html.StyleSheet| Constructor and Description |
|---|
CssHandler(Policy policy,
java.util.LinkedList embeddedStyleSheets,
java.util.List<java.lang.String> errorMessages,
java.util.ResourceBundle messages)
Constructs a handler for stylesheets using the given policy and queue for
imported stylesheets.
|
CssHandler(Policy policy,
java.util.LinkedList embeddedStyleSheets,
java.util.List<java.lang.String> errorMessages,
java.lang.String tagName,
java.util.ResourceBundle messages)
Constructs a handler for inline style declarations using the given policy
and queue for imported stylesheets.
|
| Modifier and Type | Method and Description |
|---|---|
void |
comment(java.lang.String text) |
void |
endDocument(org.w3c.css.sac.InputSource source) |
void |
endFontFace() |
void |
endMedia(org.w3c.css.sac.SACMediaList media) |
void |
endPage(java.lang.String name,
java.lang.String pseudoPage) |
void |
endSelector(org.w3c.css.sac.SelectorList selectors) |
java.lang.String |
getCleanStylesheet()
Returns the cleaned stylesheet.
|
java.util.Collection |
getErrorMessages()
Returns the error messages generated during parsing.
|
void |
ignorableAtRule(java.lang.String atRule) |
void |
importStyle(java.lang.String uri,
org.w3c.css.sac.SACMediaList media,
java.lang.String defaultNamespaceURI) |
void |
namespaceDeclaration(java.lang.String prefix,
java.lang.String uri) |
void |
property(java.lang.String name,
org.w3c.css.sac.LexicalUnit value,
boolean important) |
void |
startDocument(org.w3c.css.sac.InputSource arg0) |
void |
startFontFace() |
void |
startMedia(org.w3c.css.sac.SACMediaList media) |
void |
startPage(java.lang.String name,
java.lang.String pseudoPage) |
void |
startSelector(org.w3c.css.sac.SelectorList selectors) |
public CssHandler(Policy policy, java.util.LinkedList embeddedStyleSheets, java.util.List<java.lang.String> errorMessages, java.util.ResourceBundle messages)
policy - the policy to useembeddedStyleSheets - the queue of stylesheets importedpublic CssHandler(Policy policy, java.util.LinkedList embeddedStyleSheets, java.util.List<java.lang.String> errorMessages, java.lang.String tagName, java.util.ResourceBundle messages)
policy - the policy to useembeddedStyleSheets - the queue of stylesheets importedtagName - the associated tag name with this inline stylepublic java.lang.String getCleanStylesheet()
public java.util.Collection getErrorMessages()
public void comment(java.lang.String text)
throws org.w3c.css.sac.CSSException
comment in interface org.w3c.css.sac.DocumentHandlerorg.w3c.css.sac.CSSExceptionpublic void ignorableAtRule(java.lang.String atRule)
throws org.w3c.css.sac.CSSException
ignorableAtRule in interface org.w3c.css.sac.DocumentHandlerorg.w3c.css.sac.CSSExceptionpublic void importStyle(java.lang.String uri,
org.w3c.css.sac.SACMediaList media,
java.lang.String defaultNamespaceURI)
throws org.w3c.css.sac.CSSException
importStyle in interface org.w3c.css.sac.DocumentHandlerorg.w3c.css.sac.CSSExceptionpublic void namespaceDeclaration(java.lang.String prefix,
java.lang.String uri)
throws org.w3c.css.sac.CSSException
namespaceDeclaration in interface org.w3c.css.sac.DocumentHandlerorg.w3c.css.sac.CSSExceptionpublic void startDocument(org.w3c.css.sac.InputSource arg0)
throws org.w3c.css.sac.CSSException
startDocument in interface org.w3c.css.sac.DocumentHandlerorg.w3c.css.sac.CSSExceptionpublic void endDocument(org.w3c.css.sac.InputSource source)
throws org.w3c.css.sac.CSSException
endDocument in interface org.w3c.css.sac.DocumentHandlerorg.w3c.css.sac.CSSExceptionpublic void startFontFace()
throws org.w3c.css.sac.CSSException
startFontFace in interface org.w3c.css.sac.DocumentHandlerorg.w3c.css.sac.CSSExceptionpublic void endFontFace()
throws org.w3c.css.sac.CSSException
endFontFace in interface org.w3c.css.sac.DocumentHandlerorg.w3c.css.sac.CSSExceptionpublic void startMedia(org.w3c.css.sac.SACMediaList media)
throws org.w3c.css.sac.CSSException
startMedia in interface org.w3c.css.sac.DocumentHandlerorg.w3c.css.sac.CSSExceptionpublic void endMedia(org.w3c.css.sac.SACMediaList media)
throws org.w3c.css.sac.CSSException
endMedia in interface org.w3c.css.sac.DocumentHandlerorg.w3c.css.sac.CSSExceptionpublic void startPage(java.lang.String name,
java.lang.String pseudoPage)
throws org.w3c.css.sac.CSSException
startPage in interface org.w3c.css.sac.DocumentHandlerorg.w3c.css.sac.CSSExceptionpublic void endPage(java.lang.String name,
java.lang.String pseudoPage)
throws org.w3c.css.sac.CSSException
endPage in interface org.w3c.css.sac.DocumentHandlerorg.w3c.css.sac.CSSExceptionpublic void startSelector(org.w3c.css.sac.SelectorList selectors)
throws org.w3c.css.sac.CSSException
startSelector in interface org.w3c.css.sac.DocumentHandlerorg.w3c.css.sac.CSSExceptionpublic void endSelector(org.w3c.css.sac.SelectorList selectors)
throws org.w3c.css.sac.CSSException
endSelector in interface org.w3c.css.sac.DocumentHandlerorg.w3c.css.sac.CSSExceptionpublic void property(java.lang.String name,
org.w3c.css.sac.LexicalUnit value,
boolean important)
throws org.w3c.css.sac.CSSException
property in interface org.w3c.css.sac.DocumentHandlerorg.w3c.css.sac.CSSExceptionCopyright © 2014. All Rights Reserved.