Package ro.sync.ecss.extensions.html
Class HTML5CustomRuleMatcher
java.lang.Object
ro.sync.ecss.extensions.api.DocumentTypeAdvancedCustomRuleMatcher
ro.sync.ecss.extensions.html.HTML5CustomRuleMatcher
- All Implemented Interfaces:
DocumentTypeCustomRuleMatcher
,Extension
@API(type=INTERNAL,
src=PUBLIC)
public class HTML5CustomRuleMatcher
extends DocumentTypeAdvancedCustomRuleMatcher
Check if the document is an HTML5 document.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
matches
(String systemID, String rootNamespace, String rootLocalName, String doctypePublicID, String doctypeSystemID, Attributes rootAttributes, Map<String, String> queryParams, Reader contentReader) Check if the document type to which this custom rule belongs to should be used for the given document properties.Methods inherited from class ro.sync.ecss.extensions.api.DocumentTypeAdvancedCustomRuleMatcher
matches, matches
-
Constructor Details
-
HTML5CustomRuleMatcher
public HTML5CustomRuleMatcher()
-
-
Method Details
-
matches
public boolean matches(String systemID, String rootNamespace, String rootLocalName, String doctypePublicID, String doctypeSystemID, Attributes rootAttributes, Map<String, String> queryParams, Reader contentReader) Description copied from class:DocumentTypeAdvancedCustomRuleMatcher
Check if the document type to which this custom rule belongs to should be used for the given document properties. This method receives a reader over the entire content.- Overrides:
matches
in classDocumentTypeAdvancedCustomRuleMatcher
- Parameters:
systemID
- The system ID of the current file in an URL format with not allowed characters corrected. For example: "file:/C:/path/to/file/file.xml"rootNamespace
- The namespace of the root.rootLocalName
- The root local name.doctypePublicID
- The public id of the specified DTD if any.doctypeSystemID
- The system id of the specified DTD if any.rootAttributes
- The root attributes. The attributes are DOM level 2 and the namespaces are available for each one.queryParams
- The parameters which were set in the query string used to open this resource. May benull
.contentReader
- Reader over the entire XML content. Can be used for detection if all other parameters are not enough. The reader does not need to be reset or closed. It may benull
.- Returns:
true
if the document type to which this rule belongs to will be used for the current file.- See Also:
-
getDescription
- Returns:
- The description of the extension.
- See Also:
-