preprocess-topicpull.dita 2.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE concept PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
  3. <!-- This file is part of the DITA Open Toolkit project. See the accompanying LICENSE file for applicable license. -->
  4. <concept id="preprocess-topicpull" xml:lang="en-US">
  5. <title>Pull content into topics (topicpull)</title>
  6. <shortdesc>The <codeph>topicpull</codeph> step pulls content into <xmlelement>xref</xmlelement> and
  7. <xmlelement>link</xmlelement> elements. This step is implemented in XSLT.</shortdesc>
  8. <prolog>
  9. <metadata>
  10. <keywords>
  11. <indexterm><xmlelement>xref</xmlelement></indexterm>
  12. <indexterm><xmlelement>link</xmlelement></indexterm>
  13. <indexterm><xmlelement>desc</xmlelement></indexterm>
  14. <indexterm><xmlelement>linktext</xmlelement></indexterm>
  15. <indexterm>preprocessing<indexterm><codeph>topicpull</codeph></indexterm></indexterm>
  16. <indexterm><codeph>topicpull</codeph></indexterm>
  17. <indexterm>XSLT<indexterm><codeph>topicpull</codeph></indexterm></indexterm>
  18. </keywords>
  19. </metadata>
  20. </prolog>
  21. <conbody>
  22. <section><p>If an <xmlelement>xref</xmlelement> element does not contain link text, the target is examined and the link text is
  23. pulled. For example, a reference to a topic pulls the title of the topic; a reference to a list item pulls the
  24. number of the item. If the <xmlelement>xref</xmlelement> element references a topic that has a short
  25. description, and the <xmlelement>xref</xmlelement> element does not already contain a child
  26. <xmlelement>desc</xmlelement> element, a <xmlelement>desc</xmlelement> element is created that contains the
  27. text from the topic short description.</p><p>The process is similar for <xmlelement>link</xmlelement> elements. If the <xmlelement>link</xmlelement> element does
  28. not have a child <xmlelement>linktext</xmlelement> element, one is created with the appropriate link text.
  29. Similarly, if the <xmlelement>link</xmlelement> element does not have a child <xmlelement>desc</xmlelement>
  30. element, and the short description of the target can be determined, a <xmlelement>desc</xmlelement> element is
  31. created that contains the text from the topic short description.</p></section>
  32. </conbody>
  33. </concept>