/cfg/resource/thirdparty/docbook/xsl/params/prefer.internal.olink.xml

http://github.com/easyb/easyb-core · XML · 73 lines · 64 code · 9 blank · 0 comment · 0 complexity · c039b62d930f6e331fb691b2aebf4ccf MD5 · raw file

  1. <refentry id="prefer.internal.olink">
  2. <refmeta>
  3. <refentrytitle>prefer.internal.olink</refentrytitle>
  4. <refmiscinfo role="type">boolean</refmiscinfo>
  5. </refmeta>
  6. <refnamediv>
  7. <refname>prefer.internal.olink</refname>
  8. <refpurpose>Prefer a local olink reference to an external reference</refpurpose>
  9. </refnamediv>
  10. <refsynopsisdiv>
  11. <src:fragment id='prefer.internal.olink.frag'>
  12. <xsl:param name="prefer.internal.olink" select="0"/>
  13. </src:fragment>
  14. </refsynopsisdiv>
  15. <refsect1><title>Description</title>
  16. <para>If you are re-using XML content modules in multiple documents,
  17. you may want to redirect some of your olinks. This parameter
  18. permits you to redirect an olink to the current document.
  19. </para>
  20. <para>For example: you are writing documentation for a product,
  21. which includes 3 manuals: a little installation
  22. booklet (booklet.xml), a user
  23. guide (user.xml), and a reference manual (reference.xml).
  24. All 3 documents begin with the same introduction section (intro.xml) that
  25. contains a reference to the customization section (custom.xml) which is
  26. included in both user.xml and reference.xml documents.
  27. </para>
  28. <para>How do you write the link to custom.xml in intro.xml
  29. so that it is interpreted correctly in all 3 documents?</para>
  30. <itemizedlist>
  31. <listitem><para>If you use xref, it will fail in user.xml.</para>
  32. </listitem>
  33. <listitem><para>If you use olink (pointing to reference.xml),
  34. the reference in user.xml
  35. will point to the customization section of the reference manual, while it is
  36. actually available in user.xml.</para>
  37. </listitem>
  38. </itemizedlist>
  39. <para>If you set the <parameter>prefer.internal.olink</parameter>
  40. parameter to a non-zero value, then the processor will
  41. first look in the olink database
  42. for the olink's <sgmltag>targetptr</sgmltag> attribute value
  43. in document matching the <parameter>current.docid</parameter>
  44. parameter value. If it isn't found there, then
  45. it tries the document in the database
  46. with the <sgmltag>targetdoc</sgmltag>
  47. value that matches the olink's <sgmltag>targetdoc</sgmltag>
  48. attribute.
  49. </para>
  50. <para>This feature permits an olink reference to resolve to
  51. the current document if there is an element
  52. with an id matching the olink's <sgmltag>targetptr</sgmltag>
  53. value. The current document's olink data must be
  54. included in the target database for this to work.</para>
  55. <caution>
  56. <para>There is a potential for incorrect links if
  57. the same <sgmltag>id</sgmltag> attribute value is used for different
  58. content in different documents.
  59. Some of your olinks may be redirected to the current document
  60. when they shouldn't be. It is not possible to control
  61. individual olink instances.</para>
  62. </caution>
  63. </refsect1>
  64. </refentry>