[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: New topic about "Map-to-map cascading"
I've authored a new topic about "Map-to-map
cascading," based on review comments from Jeff Ogden, Dave Helfinstine,
Paul Grosso, and Robert Anderson. I'll copy and paste an HTML version
below; you also can grab the file
(map-to-map-cascading-of-metadata.dita) from the archSpec subdirectory
in SVN. Can whoever authored feature proposal #12055 review this, please? Thanks. -------------------- Map-to-map cascading behaviorsWhen a DITA map is referenced by another DITA map, by default, certain rules apply. These rules pertain to the cascading behaviors of attributes and metadata elements. Cascading of attributesWhen a <topicref> element references a DITA map,
the referencing map sets certain attributes. For example, consider the
following code snippet from test.ditamap:
When test.ditamap is processed, the
following behavior occurs:
<map> <topicref="a.ditamap" format="ditamap" toc="no"/> <topicref="b.ditamap" format="ditamap" audience="developer"/> <topicref="c.ditamap" format="ditamap" scope="peer"/> <topicref="d.ditamap" format="ditamap" print="no"/> </map>
Other attributes set in the referencing map do not
override those specified in the referenced DITA map. These attributes
include all attributes that (by definition) do not cascade.
Cascading of metadata elementsElements that are contained within <topicmeta> or <metadata> follow the same rules for cascading as apply within a single DITA map. For example, consider the following code snippets: Figure 1. test-2.ditamap
<map> <topicref href="a.ditamap" format="ditamap"> <topicmeta> <shortdesc>This map contains information about Acme defects.</shortdesc> </topicmeta> </topicref> <topicref href="b.ditamap" format="ditamap"> <topicmeta> <audience type="programmer"/> </topicmeta> </topicref> <mapref href="c.ditamap" format="ditamap"/> <mapref href="d.ditamap" format="ditamap"/> </map> Figure 2. b.ditamap
<map> <topicmeta> <audience type="writer"/> </topicmeta> <topicref href="b-1.dita/> <topicref href="b-2.dita/>" </map> When test-2.ditamap is
processed, the following behavior occurs:
Note: It is possible
that a specialization might define metadata that should replace rather
than add to metadata in the referenced map, but DITA (by default) does
not currently support this behavior.
Cascading in specialized mapsWhen a <topicref> element or a specialization of a <topicref> element references a DITA resource, it defines a role for that resource. In simple maps this is straight-forward; a <topicref> element references a DITA topic, and a <mapref> element references a DITA map. However, consider the scenario of a <chapter>
element that references a DITA map. This scenario could take several
forms:
In each of the above cases, resource referenced by the <chapter> element is treated as a like element. In situations where this should not happen, the non-default behaviour should be clearly specified. As an example, a <mapref> element is a convenience element; the top-level <topicref> elements in the map referenced by a <mapref> element should not be processed as if they are <mapref> elements. In some cases, preserving the role of the referencing element might result in out-of-context content. For example, a <chapter> element that references a bookmap might pull in <part> elements that contain nested <chapter> elements. The result is implementation specific; processors may or may not choose to treat this as an error, issue a warning, or simply assign new roles to the problematic elements. Parent topic: DITA metadata
Previous topic: Cascading of attributes and
metadata in a DITA map
Next topic: Reconciling topic and
map metadata
Best, Kris Kristen James Eberlein Principal consultant, Eberlein Consulting Secretary, OASIS DITA Technical Committee Charter member, OASIS DITA Adoption Committee www.eberleinconsulting.com +1 919 682-2290; keberlein (skype) |
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]