Home Forums DITA and XMetaL Discussion Reuse inside (book)map titles Reply To: Reuse inside (book)map titles

Derek Read

Reply to: Reuse inside (book)map titles

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.

Workaround:
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 into a standard DITA topic file saved to the same folder as the map (so the paths will be the same), then copy and paste that element into your map file with the map open in TagsOn view (aka: “XML View of Map”). XMetaL does not perform the referenced content checks during a paste. However, you will be notified of this issue at a later time for other events that trigger this check (by default opening a document runs this check as well as selecting the 'Refresh All References' option on the Edit menu or pressing F11).

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.

Reply

Products
Downloads
Support