Reply to: Reuse inside (book)map titlesSeptember 3, 2009 at 6:37 pm
XMetaL Author Enterprise 5.1 and 5.5 use the following rules when checking referenced content.
[quote=XMetaL Author Enterprise Help]Validating referenced content
When you validate a document, referenced content is not checked for validity. Referenced content is checked for validity when you refresh references. If there is invalid local content and you jump to the validation error, the local content is displayed.
When a content reference is created, or the refresh process is run on a content reference, the reference is checked to ensure that it is valid in the current context.
Content references must conform to the following requirements:
- The target file specified must exist
- The target ID in the target file must exist
- The target document must be valid XML
- The target must be a different node than the source node, i.e., it must not be a circular reference
- The target element and the source element must be of the same type or the target element must be generalizable back to the source type
- The target domain set must be equal to or a subset of the source domain set
- The target element must be a descendent of a topic or a map
The assumption being made here by me is that you wish to reference content from a topic inside a map and these two file types have different domain attributes. This includes our “reusable component” specialization as well which is a specialization of the standard DITA Topic DTD.
I can see your point in wanting to reuse this type of content in maps, and some versions (perhaps all) of the DITA OT do not seem to check the target domain rule (second to last in the list above) and will happily produce output using such conref'd content without raising any errors or warnings despite what the DITA Architectural Specification states and our understanding of it (that this is not allowed, which one might argue is overly-protective)…
[quote=DITA Version 1.1 Architectural Specification OASIS Standard, 1 August 2007]If the referenced element is the same type as the referencing element and the list of domains in the
referenced topic instance (declared on the domains attribute) is the same as or a subset of the list of domains in the referencing document, the element set allowed in the referenced element is guaranteed to be the same as, or a subset of, the element set allowed in the placeholder element. In the preferred approach, a processor resolving a conref should tolerate specializations of valid elements and generalize elements in the content fragment as needed for the referencing context.
If you wish to take advantage of the current state of the DITA OT, one workaround you may try that will allow you to violate this rule using XMetaL Author Enterprise 5.1 and 5.5 is to first insert your conref'd
I cannot predict which consequences this workaround will have now or in the future. You may also wish to raise this with the DITA Technical Committee at OASIS.
It seems to me that in theory it might be possible for us to create a reusable component specialization that includes both the map and topic domains. I will raise that possibility with our development team.