• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Learning DITA

Free DITA training

Free DITA training

  • Log in
  • Register
  • Newsletter
  • Profile
  • Privacy
  • Home
  • About
  • Courses
  • News
  • Resources
    • Recordings
  • Questions?
  • Contact

Conrefend

Posted on 12.02.16

Advanced reuse in DITA Lesson 3: Advanced conrefs Conrefend

The conref attribute is useful for pulling content from a single element into another topic. But what if you want to pull in content from a series of elements?

To pull a sequence of two or more elements into a topic, use the conrefend attribute in combination with the conref attribute. The two attributes specify the starting and ending elements in a sequence of elements. The starting element, the ending element, and all elements in between are pulled into the referencing topic.

For example, you might have a warehouse topic (named wh.dita) that contains this <ul> element:

<concept id="wh_elements">
   ... 
   <ul>
      <li id="food_insects">small insects</li>
      <li id="food_fish">small fish and fish eggs</li>
      <li id="food_crustaceans">crustaceans</li>
      <li id="food_snails">snails and mollusks</li>
      <li id="food_frogs">frogs and salamanders</li>
      <li id="food_fruit">berries and nuts</li>
   </ul>
</concept>

To pull the four list items from “fish” through “frogs” into a list in another topic, use this conref and conrefend combination:

<ul>
   <li>cracked corn</li>
   <li conref="wh.dita#wh_elements/food_fish" conrefend="wh.dita#wh_elements/food_frogs"/>
   ...
</ul>

If you use conrefend, keep in mind that:

  • Both of the elements identified by the conref and conrefend attributes must be the same element name as the referencing element. For instance, if the referencing element is a <p> element, the elements indicated by the conref and conrefend attributes must also be <p> elements.
  • The elements that occur between the elements indicated by the conref and conrefend attribute do not have to be the same type. For example, if the conref and conrefend attributes indicate <p> (paragraph) elements, and if there are non-<p> elements (such as <note> or <image>) between the conref and conrefend <p> elements, those elements will also be included in the content reference.

You can also use conrefend with conkeyrefs. If conrefend is combined with a conkeyref, the filename in the conrefend attribute is ignored and is replaced with the filename used by the key specified in the conkeyref.

Note: Not all CCMSs support the conrefend attribute. Test or check with your vendor before using this attribute.

Contributors
  • Simon Bate
  • Jake Campbell
  • Gretyl Kinsey
Previous Topic
Back to Lesson
Next Topic

sidebar

Blog Sidebar

  • Scriptorium logo
    Maximize the value of your content. Read more.
  • Scriptorium logo
    Already in DITA and need support? Contact us.
RSSLinkedin

Want to add content? Join the ditatraining GitHub repository.

  • Home
  • News
  • Contact
  • Privacy
  • Cookie Policy

Maintained by Scriptorium Publishing

Logo and site presentation © 2015–2023 Scriptorium Publishing. Content based on the open-source DITA training project.

Manage Cookie Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage vendors Read more about these purposes
View preferences
{title} {title} {title}
Manage Cookie Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage vendors Read more about these purposes
View preferences
{title} {title} {title}