Home Forums DITA and XMetaL Discussion Reusable Component Question: Why the stragglers? Reply To: Reusable Component Question: Why the stragglers?

tonys

Reply to: Reusable Component Question: Why the stragglers?

Hi,

This is a consequence of the way conrefs work. When you have an element like:

This text is always ignored

it tells a DITA processor to ignore whatever is inside the element, and instead to use the contents of the

element identified by “XXX”. The situation with attributes is a bit more complex; you can see a description in section 2.1.3.5 of the DITA 1.2 standard. One thing this states is that the id attribute is never copied from the referenced element. There's a good reason for this: since it may be referenced many times it could lead to duplicate identifiers. For the same reason, id attributes should be avoided within reusable content.

The content that XMetaL is adding is purely for the convenience of the user, so something appears where the replacement will occur – it has nothing to do with the content that is actually referenced.

I'm not sure what sort of validation you are doing, but to be correct it should either ignore the content within the conref element, or replace it with the referenced content.

Reply

Products
Downloads
Support