Custom framework: copy&paste and auto id behavior
Posted: Mon Mar 31, 2014 3:08 pm
Hi,
I'm having some issues in my custom framework derived from DITA. I can't see what I'm doing differently form the standard dita framework - still there it works and in my framework it doesn't!?
1. Ids for new documents
When creating a new document from a template the ids are not generated through my own method generateUniqueIDFor - those for new elements do. I'm returning an instance of a class derived from DITAUniqueAttributesRecognizer in the following methods:
What am I missing?
2. Ids for copied elements
When adding content by copy&paste (for instance a topic) the pasted element gets no default attribute in my framework. Even when using the standard DITAExtensionsBundle it doesn't work. Thus, it seems to be no matter of my class!?
3. Rendering of copied elements
When adding content by copy&paste the new elements are not displayed correctly - just as if the default attributes are not used (all text in a single line). After saving and refresh it works. For testing I used the standard DITA css and extension bundle and had the same effect...
Any ideas, what I might be missing?
One difference I noticed is that my framwork uses an xsd rather than a dtd.
Thanks and regards,
Patrik
I'm having some issues in my custom framework derived from DITA. I can't see what I'm doing differently form the standard dita framework - still there it works and in my framework it doesn't!?
1. Ids for new documents
When creating a new document from a template the ids are not generated through my own method generateUniqueIDFor - those for new elements do. I'm returning an instance of a class derived from DITAUniqueAttributesRecognizer in the following methods:
Code: Select all
private GdvdlDitaUniqueAttributesRecognizer uniqueAttributesRecognizer;
@Override
public AuthorExtensionStateListener createAuthorExtensionStateListener() {
uniqueAttributesRecognizer = new GdvdlDitaUniqueAttributesRecognizer();
return uniqueAttributesRecognizer;
}
@Override
public ClipboardFragmentProcessor getClipboardFragmentProcessor() {
return uniqueAttributesRecognizer;
}
@Override
public UniqueAttributesRecognizer getUniqueAttributesIdentifier() {
return uniqueAttributesRecognizer;
}
2. Ids for copied elements
When adding content by copy&paste (for instance a topic) the pasted element gets no default attribute in my framework. Even when using the standard DITAExtensionsBundle it doesn't work. Thus, it seems to be no matter of my class!?
3. Rendering of copied elements
When adding content by copy&paste the new elements are not displayed correctly - just as if the default attributes are not used (all text in a single line). After saving and refresh it works. For testing I used the standard DITA css and extension bundle and had the same effect...
Any ideas, what I might be missing?
One difference I noticed is that my framwork uses an xsd rather than a dtd.
Thanks and regards,
Patrik