margin.note.properties.xml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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="margin.note.properties">
  7. <refmeta>
  8. <refentrytitle>margin.note.properties</refentrytitle>
  9. <refmiscinfo class="other" otherclass="datatype">attribute set</refmiscinfo>
  10. </refmeta>
  11. <refnamediv>
  12. <refname>margin.note.properties</refname>
  13. <refpurpose>Attribute set for margin.note properties</refpurpose>
  14. </refnamediv>
  15. <refsynopsisdiv>
  16. <src:fragment xml:id="margin.note.properties.frag">
  17. <xsl:attribute-set name="margin.note.properties">
  18. <xsl:attribute name="font-size">90%</xsl:attribute>
  19. <xsl:attribute name="text-align">start</xsl:attribute>
  20. </xsl:attribute-set>
  21. </src:fragment>
  22. </refsynopsisdiv>
  23. <refsection><info><title>Description</title></info>
  24. <para>The styling for margin notes.
  25. By default, margin notes are not implemented for any
  26. element. A stylesheet customization is needed to make
  27. use of this attribute-set.</para>
  28. <para>You can use a template named <quote>floater</quote>
  29. to create the customization.
  30. That template can create side floats by specifying the
  31. content and characteristics as template parameters.
  32. </para>
  33. <para>For example:</para>
  34. <programlisting>&lt;xsl:template match="para[@role='marginnote']"&gt;
  35. &lt;xsl:call-template name="floater"&gt;
  36. &lt;xsl:with-param name="position"&gt;
  37. &lt;xsl:value-of select="$margin.note.float.type"/&gt;
  38. &lt;/xsl:with-param&gt;
  39. &lt;xsl:with-param name="width"&gt;
  40. &lt;xsl:value-of select="$margin.note.width"/&gt;
  41. &lt;/xsl:with-param&gt;
  42. &lt;xsl:with-param name="content"&gt;
  43. &lt;xsl:apply-imports/&gt;
  44. &lt;/xsl:with-param&gt;
  45. &lt;/xsl:call-template&gt;
  46. &lt;/xsl:template&gt;</programlisting>
  47. </refsection>
  48. </refentry>