Module io.sf.carte.css4j
Package io.sf.carte.doc.style.css.om
Class DefaultStyleDeclarationErrorHandler
java.lang.Object
io.sf.carte.doc.style.css.om.DefaultStyleDeclarationErrorHandler
- All Implemented Interfaces:
StyleDeclarationErrorHandler
public class DefaultStyleDeclarationErrorHandler
extends Object
implements StyleDeclarationErrorHandler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcompatWarning(String propertyName, String cssText) A warning due to the processing of IE-compatible values was issued.voidbooleanHas any error been reported?booleanHave value warnings been reported to this error handler?voidmalformedURIValue(String uri) An URI CSS value contained a malformed URI.voidmissingRequiredProperty(String propertyName) A required property was missing when processing a shorthand.voidnoContainingBlock(String containedNode, Node ownerNode) Unable to find containing block forcontainedNode.voidreset()Reset this handler and prepare it to handle a new declaration.voidsacError(CSSParseException exception, int previousIndex) Reports a SAC error as per the SAC ErrorHandler.voidsacFatalError(CSSParseException exception, int previousIndex) Reports a SAC fatal error as per the SAC ErrorHandler.voidsacWarning(CSSParseException exception, int previousIndex) Reports a SAC warning as per the SAC ErrorHandler.voidshorthandError(String shorthandName, String message) Generic error while processing a shorthand.voidshorthandSyntaxError(String shorthandName, String message) When processing a shorthand, a syntax error was found.voidshorthandWarning(String shorthandName, String valueText) A shorthand could be processed, but was found to be browser-unsafe.voidsyntaxWarning(String message) A syntax issue was found, but not serious enough to trigger an error.toString()voidunassignedShorthandValue(String shorthandName, String valueCss) When processing a shorthand, an individual value could not be properly assigned to any subproperty.voidunassignedShorthandValues(String shorthandName, String[] unassignedProperties, LexicalUnit[] unassignedValues) When processing a shorthand, some values could not be assigned.voidunknownIdentifier(String propertyName, String ident) An unrecognized CSS identifier value was found for propertypropertyName.voidvoidwrongSubpropertyCount(String shorthandName, int count) The number of subproperty values found in a shorthand is wrong.voidwrongValue(String propertyName, CSSPropertyValueException e) The propertypropertyNamehas a wrong value.
-
Constructor Details
-
DefaultStyleDeclarationErrorHandler
public DefaultStyleDeclarationErrorHandler()
-
-
Method Details
-
malformedURIValue
Description copied from interface:StyleDeclarationErrorHandlerAn URI CSS value contained a malformed URI.- Specified by:
malformedURIValuein interfaceStyleDeclarationErrorHandler- Parameters:
uri- the malformed uri.
-
shorthandError
Description copied from interface:StyleDeclarationErrorHandlerGeneric error while processing a shorthand.- Specified by:
shorthandErrorin interfaceStyleDeclarationErrorHandler- Parameters:
shorthandName- the shorthand name.message- error message.
-
shorthandSyntaxError
Description copied from interface:StyleDeclarationErrorHandlerWhen processing a shorthand, a syntax error was found.- Specified by:
shorthandSyntaxErrorin interfaceStyleDeclarationErrorHandler- Parameters:
shorthandName- the name of the shorthand property being processed.message- a message describing the error.
-
shorthandWarning
Description copied from interface:StyleDeclarationErrorHandlerA shorthand could be processed, but was found to be browser-unsafe.- Specified by:
shorthandWarningin interfaceStyleDeclarationErrorHandler- Parameters:
shorthandName- the name of the shorthand property.valueText- the unsafe value text.
-
unassignedShorthandValues
public void unassignedShorthandValues(String shorthandName, String[] unassignedProperties, LexicalUnit[] unassignedValues) Description copied from interface:StyleDeclarationErrorHandlerWhen processing a shorthand, some values could not be assigned.- Specified by:
unassignedShorthandValuesin interfaceStyleDeclarationErrorHandler- Parameters:
shorthandName- the name of the shorthand property being processed.unassignedProperties- a string array with the names of the subproperties that went without an assigned value and were reset to default values.unassignedValues- the array of unassigned lexical unit values.
-
wrongSubpropertyCount
Description copied from interface:StyleDeclarationErrorHandlerThe number of subproperty values found in a shorthand is wrong.- Specified by:
wrongSubpropertyCountin interfaceStyleDeclarationErrorHandler- Parameters:
shorthandName- the name of the shorthand property being processed.count- the number of values found.
-
unknownIdentifier
Description copied from interface:StyleDeclarationErrorHandlerAn unrecognized CSS identifier value was found for propertypropertyName.- Specified by:
unknownIdentifierin interfaceStyleDeclarationErrorHandler- Parameters:
propertyName- the property name.ident- the unrecognized identifier.
-
missingRequiredProperty
Description copied from interface:StyleDeclarationErrorHandlerA required property was missing when processing a shorthand.- Specified by:
missingRequiredPropertyin interfaceStyleDeclarationErrorHandler- Parameters:
propertyName- the missing property name.
-
wrongValue
Description copied from interface:StyleDeclarationErrorHandlerThe propertypropertyNamehas a wrong value.- Specified by:
wrongValuein interfaceStyleDeclarationErrorHandler- Parameters:
propertyName- the property name.e- the exception describing the problem.
-
syntaxWarning
Description copied from interface:StyleDeclarationErrorHandlerA syntax issue was found, but not serious enough to trigger an error.- Specified by:
syntaxWarningin interfaceStyleDeclarationErrorHandler- Parameters:
message- a message describing the problem.
-
compatWarning
Description copied from interface:StyleDeclarationErrorHandlerA warning due to the processing of IE-compatible values was issued.- Specified by:
compatWarningin interfaceStyleDeclarationErrorHandler- Parameters:
propertyName- the property name.cssText- the faulty cssText.
-
noContainingBlock
Unable to find containing block forcontainedNode.- Specified by:
noContainingBlockin interfaceStyleDeclarationErrorHandler- Parameters:
containedNode- the contained node.ownerNode- the owner node.
-
unassignedShorthandValue
Description copied from interface:StyleDeclarationErrorHandlerWhen processing a shorthand, an individual value could not be properly assigned to any subproperty.- Specified by:
unassignedShorthandValuein interfaceStyleDeclarationErrorHandler- Parameters:
shorthandName- the name of the shorthand property being processed.valueCss- the css text of the unassigned value.
-
hasErrors
public boolean hasErrors()Has any error been reported?- Specified by:
hasErrorsin interfaceStyleDeclarationErrorHandler- Returns:
trueif some error was reported,falseotherwise. Unassigned subproperties aren't considered an error.
-
hasWarnings
public boolean hasWarnings()Description copied from interface:StyleDeclarationErrorHandlerHave value warnings been reported to this error handler?- Specified by:
hasWarningsin interfaceStyleDeclarationErrorHandler- Returns:
trueif value warnings were reported,falseotherwise.
-
getMalformedURIs
-
getShorthandsWithErrors
-
getUnassignedSubproperties
-
getWrongSubpropertyCount
-
getMissingRequiredValues
-
getUnknownIdentifiers
-
getWrongValues
-
getNoContainingBlock
-
getUnassignedValues
-
getSyntaxWarnings
-
reset
public void reset()Description copied from interface:StyleDeclarationErrorHandlerReset this handler and prepare it to handle a new declaration.- Specified by:
resetin interfaceStyleDeclarationErrorHandler
-
sacWarning
Description copied from interface:StyleDeclarationErrorHandlerReports a SAC warning as per the SAC ErrorHandler.- Specified by:
sacWarningin interfaceStyleDeclarationErrorHandler- Parameters:
exception- the parse exception.previousIndex- the index for the previously set property in the properties collection, or -1 if the problem occurred with the first property or before that.
-
sacError
Description copied from interface:StyleDeclarationErrorHandlerReports a SAC error as per the SAC ErrorHandler.- Specified by:
sacErrorin interfaceStyleDeclarationErrorHandler- Parameters:
exception- the parse exception.previousIndex- the index for the previously set property in the properties collection, or -1 if the problem occurred with the first property or before that.
-
sacFatalError
Description copied from interface:StyleDeclarationErrorHandlerReports a SAC fatal error as per the SAC ErrorHandler.- Specified by:
sacFatalErrorin interfaceStyleDeclarationErrorHandler- Parameters:
exception- the parse exception.previousIndex- the index for the previously set property in the properties collection, or -1 if the problem occurred with the first property or before that.
-
getSACWarnings
-
getSACErrors
-
getSACFatalErrors
-
errorSummary
-
warningSummary
-
toString
-