generate.consistent.ids.xml 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <refentry xmlns="http://docbook.org/ns/docbook"
  2. xmlns:xlink="http://www.w3.org/1999/xlink"
  3. xmlns:xi="http://www.w3.org/2001/XInclude"
  4. xmlns:src="http://nwalsh.com/xmlns/litprog/fragment"
  5. xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  6. version="5.0" xml:id="generate.consistent.ids">
  7. <refmeta>
  8. <refentrytitle>generate.consistent.ids</refentrytitle>
  9. <refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo>
  10. </refmeta>
  11. <refnamediv>
  12. <refname>generate.consistent.ids</refname>
  13. <refpurpose>Generate consistent id values if document is unchanged</refpurpose>
  14. </refnamediv>
  15. <refsynopsisdiv>
  16. <src:fragment xml:id="generate.consistent.ids.frag">
  17. <xsl:param name="generate.consistent.ids" select="0"/>
  18. </src:fragment>
  19. </refsynopsisdiv>
  20. <refsection><info><title>Description</title></info>
  21. <para>When the stylesheet assigns an id value to an output element,
  22. the generate-id() function may be used. That function may not
  23. produce consistent values between runs. Version control
  24. systems may misidentify the changing id values as changes
  25. to the document.</para>
  26. <para>If you set this parameter's value to 1, then the
  27. template named <literal>object.id</literal> will replace
  28. the use of the function generate-id() with
  29. <literal>&lt;xsl:number level="multiple" count="*"/&gt;</literal>.
  30. This counts preceding elements to generate a unique number for
  31. the id value.</para>
  32. <caution>
  33. <para>This param does not associate permanent unique id values
  34. with particular elements.
  35. The id values are consistent only as long as the document
  36. structure does not change.
  37. If the document structure changes, then the counting
  38. of elements changes, and all id values after
  39. the first such change may be different, even when there is
  40. no change to the element itself or its output.
  41. </para>
  42. </caution>
  43. <para>The default value of this parameter is zero, so generate-id() is used
  44. by default.</para>
  45. </refsection>
  46. </refentry>