preprocess-topicpull.dita 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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
  16. <indexterm><codeph>topicpull</codeph></indexterm></indexterm>
  17. <indexterm><codeph>topicpull</codeph></indexterm>
  18. <indexterm>XSLT
  19. <indexterm><codeph>topicpull</codeph></indexterm></indexterm>
  20. </keywords>
  21. </metadata>
  22. </prolog>
  23. <conbody>
  24. <section>
  25. <p>If an <xmlelement>xref</xmlelement> element does not contain link text, the target is examined and the link
  26. text is pulled. For example, a reference to a topic pulls the title of the topic; a reference to a list item
  27. pulls the number of the item. If the <xmlelement>xref</xmlelement> element references a topic that has a short
  28. description, and the <xmlelement>xref</xmlelement> element does not already contain a child
  29. <xmlelement>desc</xmlelement> element, a <xmlelement>desc</xmlelement> element is created that contains the
  30. text from the topic short description.</p>
  31. <p>The process is similar for <xmlelement>link</xmlelement> elements. If the <xmlelement>link</xmlelement> element
  32. does not have a child <xmlelement>linktext</xmlelement> element, one is created with the appropriate link text.
  33. Similarly, if the <xmlelement>link</xmlelement> element does not have a child <xmlelement>desc</xmlelement>
  34. element, and the short description of the target can be determined, a <xmlelement>desc</xmlelement> element is
  35. created that contains the text from the topic short description.</p></section>
  36. </conbody>
  37. </concept>