The ro.sync.ecss.extensions.api.UniqueAttributesRecognizer interface can be
implemented if you want to provide for your framework the following features:
- Automatic ID generation - You can automatically generate unique IDs for newly
inserted elements. Implementations are already available for the DITA and DocBook frameworks. The following methods can be
implemented to accomplish this: assignUniqueIDs(int startOffset, int endOffset),
isAutoIDGenerationActive()
- Avoiding copying unique attributes when "Split" is called inside an element - You
can split the current block
element by pressing the "Enter" key and then choosing "Split". This is a
very useful way to create new paragraphs, for example. All attributes are by default copied
on the new element but if those attributes are IDs you sometimes want to avoid creating
validation errors in the editor. Implementing the following method, you can decide whether
or not an attribute should be copied during the split: boolean
copyAttributeOnSplit(String attrQName, AuthorElement element)