public class XLIFFDialect extends DefaultXMLDialect
Modifier and Type | Field and Description |
---|---|
protected XLIFFOptions.ID_TYPE |
altTransIDType
Sets whether alternative translations are identified by previous and next paragraphs or by <trans-unit> ID
|
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 and Description |
---|
XLIFFDialect() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
constructShortcuts(java.util.List<Element> elements,
java.util.List<ProtectedPart> protectedParts)
Returns shortcut string representation of the entry source.
|
void |
defineDialect(XLIFFOptions options)
Actually defines the dialect.
|
void |
handleXMLTag(XMLTag tag,
boolean translated)
Handle <target state="..."> attribute according to filter settings.
|
java.lang.Boolean |
validateContentBasedTag(java.lang.String tag,
Attributes atts)
For a given tag, return wether the content of this tag should be
translated, depending on the content of one attribute and the presence or
absence of other attributes.
|
java.lang.Boolean |
validateIntactTag(java.lang.String tag,
Attributes atts)
In the XLKIFF filter, content shouldn't be translated if translate="no"
http://docs.oasis-open.org/xliff/v1.2/os/xliff-core.html#translate
|
java.lang.Boolean |
validatePreformatTag(java.lang.String tag,
Attributes atts)
In the XLIFF filter, the tag <mrk> is a preformat tag when the
attribute "mtype" contains "seg".
|
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, resolveEntity, setClosingTagRequired, setForceSpacePreserving, setTagsAggregationEnabled, validateParagraphTag, validateTranslatableTag, validateTranslatableTagAttribute
protected XLIFFOptions.ID_TYPE altTransIDType
public void defineDialect(XLIFFOptions options)
public java.lang.Boolean validatePreformatTag(java.lang.String tag, Attributes atts)
validatePreformatTag
in interface XMLDialect
validatePreformatTag
in class DefaultXMLDialect
tag
- An XML tagatts
- The attributes associated with the tagtrue
if this tag should be a preformat tag,
false
otherwisepublic java.lang.Boolean validateIntactTag(java.lang.String tag, Attributes atts)
validateIntactTag
in interface XMLDialect
validateIntactTag
in class DefaultXMLDialect
tag
- An XML tagatts
- The attributes associated with the tagfalse
if the content of this tag should be
translated, true
otherwisepublic java.lang.Boolean validateContentBasedTag(java.lang.String tag, Attributes atts)
XMLDialect
validateContentBasedTag
in interface XMLDialect
validateContentBasedTag
in class DefaultXMLDialect
tag
- The tag that could be translatedatts
- The list of the tag attributestrue
or false
public void handleXMLTag(XMLTag tag, boolean translated)
handleXMLTag
in interface XMLDialect
handleXMLTag
in class DefaultXMLDialect
tag
- XML tag to be processed.translated
- is the value considered translated?public java.lang.String constructShortcuts(java.util.List<Element> elements, java.util.List<ProtectedPart> protectedParts)
DefaultXMLDialect
Here's <b>bold text</b>
should return
Here's <b0>bold text</b0>
.constructShortcuts
in interface XMLDialect
constructShortcuts
in class DefaultXMLDialect