In the descriptions below, the word target always refers to the element referenced by a
conref attribute.There are three possible functions using the conaction attribute: replacing an
element, pushing content before an element, and pushing content after an element. The
@@ -48,45 +40,9 @@
Replacing content in another topic
When the conaction attribute is set to pushreplace, the
- source element will replace the target specified on the conref attribute.
- The pushed content remains in the source topic where it was originally authored.
- For example, assume that a task in example.dita has the
- id set to example, and it contains a
- step element with the id set to
- b:
- <task id="example" xml:lang="en">
- <title>Example topic</title>
- <taskbody>
- <steps>
- <step id="a"><cmd>A</cmd></step>
- <step id="b"><cmd>B</cmd></step>
- <step id="c"><cmd>C</cmd></step>
- </steps>
- </taskbody>
-</task>
- In order to replace the step with id="b", another topic must combine a
- conaction value of pushreplace with a
- conref attribute that references this
- step:<!-- Steps element within another task -->
-<steps>
- <step conaction="pushreplace"
- conref="example.dita#example/b">
- <cmd>Updated B</cmd>
- </step>
-</steps>
-</task>
- The result will be an updated version of example.dita which contains
- the pushed
- step:<task id="example" xml:lang="en">
- <title>Example topic</title>
- <taskbody>
- <steps>
- <step id="a"><cmd>A</cmd></step>
- <step id="b"><cmd>Updated B</cmd></step>
- <step id="c"><cmd>C</cmd></step>
- </steps>
- </taskbody>
-</task>
+ referencing element will replace the referenced element specified by the
+ conref attribute. The pushed content remains in the source topic where it
+ was originally authored.
When resolving a conref push action, attributes are resolved using the same precedence as
for normal conref, with one exception. Attributes on the element with the
conref attribute (in this case, the source doing the push) will take
@@ -103,97 +59,50 @@
element to be pushed before the element referenced by the conref attribute.
Likewise, setting the conaction attribute to pushafter
allows an element to be pushed after the element referenced by the conref
- attribute. Multiple sources can push content before or after the same target; the order in
- which that content is pushed is undefined.
- When an element is pushed before or after a target, the resulting document will have at
- least two of that element. Because this is not always valid, a document attempting to push
- content before or after a target must take an extra step to ensure that the result will be
- valid. The extra step makes use of the conaction="mark" value.
+ attribute. Multiple sources can push content before or after the same referenced element;
+ the order in which that content is pushed is undefined.
+ When an element is pushed before or after a referenced element, the resulting document will
+ have at least two of that element. Because this is not always valid, a document attempting
+ to push content before or after a target must take an extra step to ensure that the result
+ will be valid. The extra step makes use of the conaction="mark" value. For
+ example, this restriction prevents a topic from trying to push a
+ body element before or after another
+ body element, because it is not valid to have two body elements
+ in sequence.
When pushing before, the conref attribute itself looks just as it did when
- replacing, but the conaction attribute is set to mark because it
- is marking the target element. This element remains empty; its purpose is to ensure that it
- is legal to have more than one of the current element. Immediately before the element which
- marks the target, you will place the content that you actually want to push. This element
- will set the conaction attribute to pushbefore.
+ replacing, but the conaction attribute is set to mark
+ because it is marking the referenced element. This element remains empty; its purpose is to
+ ensure that it is legal to have more than one of the current element. The element
+ immediately before the marking element is the content that will actually be pushed. This
+ element will set the conaction attribute to
+ pushbefore.
When pushing after, the procedure is the same, except that the order of the elements is
reversed. The element with conaction="pushafter" comes immediately after
the element which marks the target.
Attributes on the element which is pushed (the one with
- conaction="pushbefore") must be retained on the target, apart from the
- conaction attribute itself. If this causes the result document to end up
- with duplicate IDs, an application can recover by dropping the duplicate ID, modifying it to
- ensure uniqueness, or warning the user.
+ conaction="pushbefore" or conaction="pushafter") must be
+ retained on the target, apart from the conaction attribute itself. If this
+ causes the result document to end up with duplicate IDs, an application can recover by
+ changing the id, warning the user, or implementing another strategy.
The following restrictions apply when pushing content before or after an element:
- The elements that use conaction="mark" and
conaction="pushbefore" are the same type as each other and appear in
- sequence. This restriction prevents a topic from trying to push a
- body element before or after another
- body element, because it is not valid to have two body
- elements in sequence.
+ sequence.
- Either the container elements of the source and target match, or the container of the
- source element is be a specialization of the target's container. This is also to ensure
+ source element is a specialization of the target's container. This is also to ensure
validity of the target; for example, while it is possible to include multiple titles in
a section, it is not possible to do so in a figure. Comparing
the parents prevents a second section title from being pushed
- before a figure title (the resulting figure would not be valid DITA). This restriction
- only applies to the pushbefore or pushafter
- actions, not to the pushreplace action.
+ before a figure title. This restriction only applies to the
+ pushbefore or pushafter actions, not to the
+ pushreplace action.
When content is pushed from one topic to another, it is still rendered in the original
- context. Processors might delete the empty element that has the
+ context. Processors might choose not to render the empty element that has the
conaction="mark" attribute. In order to push content from a topic without
actually rendering that topic on its own, the topic should be referenced from the map with
the processing-role attribute set to "resource-only".
-
Combining conaction with conkeyref or
conrefend
diff --git a/specification/archSpec/base/theconkeyrefattribute.dita b/specification/archSpec/base/theconkeyrefattribute.dita
index 7ecd3698..20768d37 100644
--- a/specification/archSpec/base/theconkeyrefattribute.dita
+++ b/specification/archSpec/base/theconkeyrefattribute.dita
@@ -4,8 +4,8 @@
The conkeyref attribute
The conkeyref attribute provides an indirect content reference to
- topic elements, map elements, or elements within maps or topics. When the DITA content is
- processed, the key references are resolved using key definitions from DITA maps.
+ topic elements, map elements, or elements within maps or topics. It allows the referencing
+ element to use a key in place of a file name when referencing another topic or map.
@@ -14,29 +14,18 @@
-
- This topic is moving into the arch spec,
- but needs further editing to split overview / conceptual info from processing info; this and
- other conref-attribute topics currently have a bunch of processing info that is missing from
- the actual "Processing conref" arch spec topics.
-
- For content references from map elements to map elements or topic elements to topic
- elements, the value of the conkeyref attribute is a key name, where the key
- must be bound to a map element (for references from map elements) or a topic element (for
- references from topic elements). For all other elements, the value of the
- conkeyref attribute is a key name, an optional slash ("/"), and the ID of the target element, where the key name must be bound to
- the map or topic that contains the topic element.
+ When the target of a content reference is an element within a topic or map, the value of
+ the conkeyref attribute is a key name, followed by a slash ("/"), followed
+ by the ID of the referenced element. The key name must be bound to the topic or map that
+ contains the referenced element.
+ When the target of a content reference is a topic or map, the value of the
+ conkeyref attribute is a key name that directly resolves to that topic or
+ map.
When the key name specified by the conkeyref attribute is not defined and
the element also specifies a conref attribute, the conref
- attribute is used to determine the content reference relationship. If no
- conref attribute is specified there is no content reference relationship.
- Processors SHOULD issue a warning when a
- conkeyref reference cannot be resolved and there is no
- conref attribute to use as a fallback. Processors MAY issue a warning when a conkeyref cannot
- be resolved to an element and a specified conref is used as a fallback.
+ attribute is used to determine the referenced element. If no conref
+ attribute is specified there is no content reference relationship.
The conrefend attribute, which defines the end of a conref range, cannot
include a key. Instead the map or topic element addressed by the key name component of the
conkeyref is used in place of whatever map or topic element is addressed
diff --git a/specification/archSpec/base/theconrefattribute.dita b/specification/archSpec/base/theconrefattribute.dita
index 82523b56..721c3573 100644
--- a/specification/archSpec/base/theconrefattribute.dita
+++ b/specification/archSpec/base/theconrefattribute.dita
@@ -13,17 +13,11 @@
-
- This topic is moving into the arch spec,
- but needs further editing to split overview / conceptual info from processing info; this and
- other conref-attribute topics currently have a bunch of processing info that is missing from
- the actual "Processing conref" arch spec topics.
-
-The value of the conref attribute must be a URI reference to a DITA element. See
+The value of the conref attribute is a URI reference to a DITA element. See
for details on specifying URI
- references to DITA elements. As with other DITA references, a conref
- attribute that references a resource without an ID is treated as a reference to the first
- topic or map in the document.
When using the conref attribute on an element, the content of that element is
+ references to DITA elements. As with other DITA references, a conref
+ attribute that references a resource without an ID is treated as a reference to the first
+ topic or map in the document.
When using the conref attribute on an element, the content of that element is
ignored. For example, if a phrase is marked up like
this:<ph conref="#topic/ph">Something</ph> the
word "Something" will be replaced by the content of the referenced
diff --git a/specification/archSpec/base/theconrefendattribute.dita b/specification/archSpec/base/theconrefendattribute.dita
index 2ec8db16..476b3130 100644
--- a/specification/archSpec/base/theconrefendattribute.dita
+++ b/specification/archSpec/base/theconrefendattribute.dita
@@ -14,12 +14,6 @@
-
- This topic is moving into the arch spec,
- but needs further editing to split overview / conceptual info from processing info; this and
- other conref-attribute topics currently have a bunch of processing info that is missing from
- the actual "Processing conref" arch spec topics.
-
Using conref together with
conrefend
The following markup rules apply when using or implementing conrefend:
@@ -34,25 +28,25 @@
referencing element.
In addition, several other items must be taken into account:
- - Processors will resolve the range by pulling in the start target and following sibling
- XML nodes across to and including the end target.
+ - Processors will resolve the range by pulling in the starting referenced element and
+ following sibling XML nodes across to and including the ending referenced element.
- As with conref, if the conrefend references a more
specialized version of the referencing element, applications should generalize the target
- when resolving.
- - It is not valid to use conrefend to reference a more general version of
- an element (such as using step to reference an
- li element).
+ when resolving.
+ - As with conref, it is not valid to use conrefend to
+ reference a more general version of an element (such as using
+ step to reference an li element).
- Other nodes (such as elements or text) between the start and end of a range do not have
to match the referencing element.
- With single conref, an id attribute from the referenced element will
not be preserved on the resolved content. With a range, an id on both the
start and the end elements will not be preserved. id attributes on
intermediate or child nodes should be preserved; if this results in duplicate
- id values, an application can recover by changing the
- id, warning the user, or implementing another strategy.
- - With a single conref, attributes specified on the referencing elementcan be
- used to override attributes on the referenced element. With a conref range, the same is
- true, with the following clarifications:
+ id values, an application can recover by changing the
+ id, warning the user, or implementing another strategy.
+ - With a single conref, attributes specified on the referencing element can be used to
+ override attributes on the referenced element. With a conref range, the same is true, with
+ the following clarifications:
- When an id attribute is specified on the referencing element, it
will only be preserved on the first element of the resolved range.
- When other attributes are specified, they will only apply to referenced elements of
@@ -64,98 +58,6 @@
ol elements in that range.
-
- Example: reusing a set of list items
-
- List example: Source topic.dita with ids
- <topic id="x">
- <title>Sample file topic.dita</title>
- <body>
- <ol>
- <li id="apple">A</li>
- <li id="bear">B</li>
- <li id="cat">C</li>
- <li id="dog">D</li>
- <li id="eel">E</li>
- </ol>
- </body>
-</topic>
-
-
- List example: Reusing topic with conrefs
- <topic id="y">
- <title>Sample file reusing content</title>
- <body>
- <ol>
- <li>My own first item</li>
- <li conref="topic.dita#x/bear" conrefend="topic.dita#x/dog"/>
- <li>And a different final item</li>
- </ol>
- </body>
-</topic>
-
-
- List example: Processed result of reusing topic
- <topic id="y">
- <title>Sample file reusing content</title>
- <body>
- <ol>
- <li>My own first item</li>
- <li>B</li>
- <li id="cat">C</li>
- <li>D</li>
- <li>And a different final item</li>
- </ol>
- </body>
-</topic>
-
-
-
- Example: Reusing a set of blocks
-
- Block level example: Source topic.dita with ids
- <topic id="x">
- <title>Sample file topic.dita</title>
- <body>
- <p id="p1">First para</p>
- <ol id="mylist">
- <li id="apple">A</li>
- <li id="bear">B</li>
- <li id="cat">C</li>
- <li id="dog">D</li>
- <li id="eel">E</li>
- </ol>
- <p id="p2">Second para</p>
- </body>
-</topic>
-
-
- Block level example: Reusing topic with conrefs
- <topic id="y">
- <title>Sample file reusing content</title>
- <body>
- <p conref="topic.dita#x/p1" conrefend="topic.dita#x/p2"/>
- </body>
-</topic>
-
-
- Block level example: Processed result of reusing topic
- <topic id="y">
- <title>Sample file reusing content</title>
- <body>
- <p>First para</p>
- <ol id="mylist">
- <li id="apple">A</li>
- <li id="bear">B</li>
- <li id="cat">C</li>
- <li id="dog">D</li>
- <li id="eel">E</li>
- </ol>
- <p>Second para</p>
- </body>
-</topic>
-
-
Using conrefend together with conkeyref
When the conkeyref attribute is used in place of conref,
@@ -172,114 +74,5 @@
the conref attribute itself is not present for fallback, the
conrefend attribute is ignored.
-
- Example: Combining conrefend with conkeyref
-
- Defining and referencing a key with conkeyref
- In this example the key xmp is defined as the first topic in the file
- examples.dita.
- <map>
- <!-- ... -->
- <keydef keys="xmp" href="examples.dita"/>
- <!-- ... -->
-</map>
- <!-- examples.dita: -->
-<topic id="examples">
- <title>These are examples</title>
- <body>
- <ul>
- <li id="first">A first example</li>
- <li>Another trivial example</li>
- <li id="last">Final example</li>
- </ul>
- </body>
-</topic>
- To reuse these list items by using the key, the conkeyref attribute
- combines the key itself with the sub-topic id (first) to define the start of the range.
- The conrefend attribute defines a default high-level object along with
- the sub-topic id (last) that ends the
- range: <li conkeyref="xmp/first"
- conrefend="default.dita#default/last"/>
- The conkeyref attribute uses a key to reference the first topic in
- examples.dita, so the range begins with the object
- examples.dita#examples/first. The high-level object in the
- conrefend attribute (default.dita#default) is replaced
- with the object represented by the key (the first topic in
- examples.dita), resulting in a range that ends with the object
- examples.dita#examples/last.
-
-
- Combining conref, conkeyref, and
- conrefend
- When conref, conkeyref, and conrefend
- are all specified, the key value takes priority.
- <li conkeyref="thisconfig/start"
- conref="standardconfig.dita#config/start"
- conrefend="standardconfig.dita#config/end"/>
-
- - If the key thisconfig is defined as
- mySpecialConfig.dita#myconfig, then the range will go from the list
- item with id="start" to the list item withid="end" in
- the topic mySpecialConfig.dita#myconfig.
- - If the key thisconfig is defined as myConfig.dita,
- then the range will go from the list item with id="start" to the list
- item with id="end" within the first topic in
- myConfig.dita.
- - If the key thisconfig is not defined, then the unchanged
- conref and conrefend attributes are used as
- fallback. In that case, the range will go from the list item with
- id="start" to the list item with id="end" within the
- topic standardconfig.dita#config.
-
-
-
-
- Error conditions
- When encountering an error condition, an implementation can issue an error message.
-
-
-
-
-
-
- Condition or Issue
- Result
-
-
-
-
- The conref attribute cannot be resolved in the
- target document (the target element might have been removed or its id has
- changed).
- The conref is ignored.
-
-
- The conrefend attribute cannot be resolved in
- the target document (the target element might have been removed or its id
- has changed).
- Range cannot be resolved, optional recovery processes the result
- as a simple conref.
-
-
- Start and end elements are not siblings in the target
- document.
- If the start element exists, optional recovery processes the
- result as a simple conref.
-
-
- End element occurs before the start element in the target
- document.
- If the start element exists, optional recovery processes the
- result as a simple conref.
-
-
- An element has a conrefend attribute but is
- missing the conref attribute.
- No result.
-
-
-
-
-
diff --git a/specification/common/conref-file.dita b/specification/common/conref-file.dita
index dc6b3737..a7930298 100644
--- a/specification/common/conref-file.dita
+++ b/specification/common/conref-file.dita
@@ -17,8 +17,8 @@
reference
DITA maps are documents that organize topics and
other resources into structured collections of information. DITA maps specify hierarchy
- and the relationships among the topics; they also provide the contexts in which
- keys are defined and resolved.
+ and the relationships among the topics; they also provide the contexts in which keys are
+ defined and resolved.
Information typing is the practice
of identifying types of topics, such as concept, reference, and task, to clearly
distinguish between different types of information. Topics that answer different reader
@@ -42,10 +42,9 @@
an abbreviated fragment-identifier syntax that can be used when addressing non-topic
elements from within the same topic.
The DITA conref,
- conkeyref, conrefend, and conaction attributes provide mechanisms for reusing content within DITA topics
- or maps. These mechanisms can be used both to pull and push content.
+ conkeyref, conrefend, and conaction
+ attributes provide mechanisms for reusing content within DITA topics or maps. These
+ mechanisms can be used both to pull and push content.
Conditional processing is the filtering or flagging of
information based on processing-time