Package org.omegat.filters3.xml.xhtml
Class XHTMLDialect
java.lang.Object
org.omegat.filters3.xml.DefaultXMLDialect
org.omegat.filters3.xml.xhtml.XHTMLDialect
- All Implemented Interfaces:
XMLDialect
This class specifies XHTML dialect of XML.
-
Field Summary
Fields inherited from interface org.omegat.filters3.xml.XMLDialect
CONSTRAINT_DOCTYPE, CONSTRAINT_DOCTYPE_UNBOXED, CONSTRAINT_PUBLIC_DOCTYPE, CONSTRAINT_PUBLIC_DOCTYPE_UNBOXED, CONSTRAINT_ROOT, CONSTRAINT_ROOT_UNBOXED, CONSTRAINT_SYSTEM_DOCTYPE, CONSTRAINT_SYSTEM_DOCTYPE_UNBOXED, CONSTRAINT_XMLNS, CONSTRAINT_XMLNS_UNBOXED -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckDoSkipMetaTag(String key, String value) voiddefineDialect(XHTMLOptions options) Actually defines the dialect.@Nullable Pattern@Nullable InputSourceresolveEntity(@Nullable String publicId, String systemId) Resolves external entites if child filter needs it.validateIntactTag(String tag, @Nullable Attributes atts) In the XHTML filter, content should be translated in the following condition: The pair attribute-value should not have been declared as untranslatable in the optionsvalidateTranslatableTagAttribute(String tag, String attribute, @Nullable Attributes atts) Returns for a given attribute of a given tag if the attribute should be translated with the given other attributes present.Methods inherited from class org.omegat.filters3.xml.DefaultXMLDialect
constructShortcuts, defineConstraint, defineContentBasedTag, defineIntactTag, defineIntactTags, defineOutOfTurnTag, defineOutOfTurnTags, defineParagraphTag, defineParagraphTags, definePreformatTag, definePreformatTags, defineShortcut, defineShortcuts, defineTranslatableAttribute, defineTranslatableAttributes, defineTranslatableTagAttribute, defineTranslatableTagAttributes, defineTranslatableTagsAttribute, getClosingTagRequired, getConstraints, getContentBasedTags, getForceSpacePreserving, getIntactTags, getOutOfTurnTags, getParagraphTags, getPreformatTags, getShortcuts, getTagsAggregationEnabled, getTranslatableAttributes, getTranslatableTagAttributes, handleXMLTag, setClosingTagRequired, setForceSpacePreserving, setTagsAggregationEnabled, validateContentBasedTag, validateParagraphTag, validatePreformatTag, validateTranslatableTag
-
Constructor Details
-
XHTMLDialect
public XHTMLDialect()
-
-
Method Details
-
resolveEntity
Resolves external entites if child filter needs it. Default implementation returnsnull.- Specified by:
resolveEntityin interfaceXMLDialect- Overrides:
resolveEntityin classDefaultXMLDialect
-
defineDialect
Actually defines the dialect. It cannot be done during creation, because options are not known at that step. -
validateTranslatableTagAttribute
public Boolean validateTranslatableTagAttribute(String tag, String attribute, @Nullable Attributes atts) Returns for a given attribute of a given tag if the attribute should be translated with the given other attributes present. If the tagAttribute is returned by getTranslatable(Tag)Attributes(), this function is called to further test the attribute within its context. This allows for example the XHTML filter to not translate the value attribute of an input-element, except when it is a button or submit or reset.- Specified by:
validateTranslatableTagAttributein interfaceXMLDialect- Overrides:
validateTranslatableTagAttributein classDefaultXMLDialect
-
getSkipRegExpPattern
-
getSkipMetaAttributes
-
checkDoSkipMetaTag
-
validateIntactTag
In the XHTML filter, content should be translated in the following condition: The pair attribute-value should not have been declared as untranslatable in the options- Specified by:
validateIntactTagin interfaceXMLDialect- Overrides:
validateIntactTagin classDefaultXMLDialect- Parameters:
tag- An XML tagatts- The attributes associated with the tag- Returns:
falseif the content of this tag should be translated,trueotherwise
-