Package ro.sync.ecss.extensions.dita
Class DITACustomRuleMatcher
java.lang.Object
ro.sync.ecss.extensions.dita.DITACustomRuleMatcher
- All Implemented Interfaces:
DocumentTypeCustomRuleMatcher
,Extension
- Direct Known Subclasses:
DITAMapCustomRuleMatcher
,DITATopicCustomRuleMatcher
@API(type=INTERNAL,
src=PUBLIC)
public abstract class DITACustomRuleMatcher
extends Object
implements DocumentTypeCustomRuleMatcher
DITA custom rule matcher abstract class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected static final String
getVersion
(Attributes rootAttributes) Get the value of the ditaarch version attributeboolean
matches
(String systemID, String rootNamespace, String rootLocalName, String doctypePublicID, Attributes rootAttributes) Try to find aDITAArchVersion
attribute in the root attributes.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ro.sync.ecss.extensions.api.Extension
getDescription
-
Constructor Details
-
DITACustomRuleMatcher
public DITACustomRuleMatcher()
-
-
Method Details
-
matches
public boolean matches(String systemID, String rootNamespace, String rootLocalName, String doctypePublicID, Attributes rootAttributes) Try to find aDITAArchVersion
attribute in the root attributes.- Specified by:
matches
in interfaceDocumentTypeCustomRuleMatcher
- 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.rootAttributes
- The root attributes. The attributes are DOM level 2 and the namespaces are available for each one.- Returns:
true
if the document type to which this rule belongs to will be used for the current file.- See Also:
-
getVersion
Get the value of the ditaarch version attribute- Parameters:
rootAttributes
- Root attributes.- Returns:
- the value or
null
-