The value -dita-use-conref-target is available on enumerated attributes and may also be specified on other attributes. When an element uses conref to pull in content, for any of its attributes assigned a value of "-dita-use-conref-target", the resulting value for those attributes should also be pulled in from the referenced element.
Ordinarily, when an element uses conref, any other attributes specified locally will be preserved when the reference is resolved. This causes problems when attributes are required, because required attributes must be specified regardless of whether the conref attribute is present. The purpose of the -dita-use-conref-target value is to allow the author to specify a value for a required attribute while still allowing the conref resolution process to use the matching attribute from the referenced element. The value has the same result when the attribute is not required.
This example shows a map where the topichead element uses conref. It specifies the navtitle attribute as well as the toc attribute. In the resolved element, navtitle is not preserved because it uses -dita-use-conref-target; the toc attribute overrides the toc attribute on the referenced element using normal conref resolution rules.
<map><title>Conref demonstration</title> <topichead id="heading" navtitle="This is a heading" toc="yes" print="yes"> <topicref href="topic.dita" navtitle="content"/> </topichead> <topichead conref="#heading" navtitle="-dita-use-conref-target" toc="no"> </topichead> </map>
<map><title>Conref demonstration</title> <topichead id="heading" navtitle="This is a heading" toc="yes" print="yes"> <topicref href="topic.dita" navtitle="content"/> </topichead> <topichead navtitle="This is a heading" toc="no" print="yes"> <topicref href="topic.dita" navtitle="content"/> </topichead> </map>
Return to main page.
DITA v1.2 CS 01
Copyright © OASIS Open 2005, 2010. All Rights Reserved.