From: Michael(tm) S. <xm...@us...> - 2006-04-27 08:59:44
|
Update of /cvsroot/docbook/xsl/params In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4855/params Modified Files: generate.legalnotice.link.xml Added Files: html.head.legalnotice.link.multiple.xml html.head.legalnotice.link.types.xml Log Message: Added two new params: html.head.legalnotice.link.types and html.head.legalnotice.link.multiple. If the value of the generate.legalnotice.link is non-zero, then the stylesheet generates (in the head section of the HTML source) either a single HTML link element or, if the value of the html.head.legalnotice.link.multiple is non-zero, one link element for each link type specified. Each link has the following attributes: - a rel attribute whose value is derived from the value of html.head.legalnotice.link.types - an href attribute whose value is set to the URL of the file containing the legalnotice - a title attribute whose value is set to the title of the corresponding legalnotice (or a title programatically determined by the stylesheet) For example: <link rel="copyright" href="ln-id2524073.html" title="Legal Notice"> Closes #1476450. Thanks to Sam Steingold. --- NEW FILE --- <refentry id="html.head.legalnotice.link.multiple"> <refmeta> <refentrytitle>html.head.legalnotice.link.multiple</refentrytitle> <refmiscinfo role="type">boolean</refmiscinfo> </refmeta> <refnamediv> <refname>html.head.legalnotice.link.multiple</refname> <refpurpose>Generate multiple link instances in html head for legalnotice?</refpurpose> </refnamediv> <refsynopsisdiv> <src:fragment id='html.head.legalnotice.link.multiple.frag'><xsl:param name="html.head.legalnotice.link.multiple" select="1"/></src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> <para>If <parameter>html.head.legalnotice.link.multiple</parameter> is non-zero and the value of <parameter>html.head.legalnotice.link.types</parameter> contains multiple link types, then the stylesheet generates (in the <literal>head</literal> section of the HTML source) one <literal>link</literal> element for each link type specified. For example, if the value of <parameter>html.head.legalnotice.link.types</parameter> is â<literal>copyright license</literal>â: <screen> <link rel="copyright" href="ln-id2524073.html" title="Legal Notice"> <link rel="license" href="ln-id2524073.html" title="Legal Notice"></screen> Otherwise, the stylesheet generates generates a single <literal>link</literal> instance; for example: <screen> <link rel="copyright license" href="ln-id2524073.html" title="Legal Notice"></screen> </para> </refsect1> </refentry> --- NEW FILE --- <refentry id="html.head.legalnotice.link.types"> <refmeta> <refentrytitle>html.head.legalnotice.link.types</refentrytitle> <refmiscinfo role="type">string</refmiscinfo> </refmeta> <refnamediv> <refname>html.head.legalnotice.link.types</refname> <refpurpose>Specifies link types for legalnotice link in html head</refpurpose> </refnamediv> <refsynopsisdiv> <src:fragment id='html.head.legalnotice.link.types.frag'> <xsl:param name="html.head.legalnotice.link.types">copyright</xsl:param> </src:fragment> </refsynopsisdiv> <refsect1><title>Description</title> <para>The value of <parameter>html.head.legalnotice.link.types</parameter> is a space-separated list of link types, as described in <ulink url="http://www.w3.org/TR/html401/types.html#type-links" >Section 6.12 of the HTML 4.01 specification</ulink>. If the value of the <parameter>generate.legalnotice.link</parameter> parameter is non-zero, then the stylesheet generates (in the <literal>head</literal> section of the HTML source) either a single HTML <literal>link</literal> element or, if the value of the <parameter>html.head.legalnotice.link.multiple</parameter> is non-zero, one <literal>link</literal> element for each link type specified. Each <literal>link</literal> has the following attributes: <itemizedlist> <listitem> <para>a <sgmltag class="attribute">rel</sgmltag> attribute whose value is derived from the value of <parameter>html.head.legalnotice.link.types</parameter></para> </listitem> <listitem> <para>an <sgmltag class="attribute">href</sgmltag> attribute whose value is set to the URL of the file containing the <sgmltag>legalnotice</sgmltag></para> </listitem> <listitem> <para>a <sgmltag class="attribute">title</sgmltag> attribute whose value is set to the title of the corresponding <sgmltag>legalnotice</sgmltag> (or a title programatically determined by the stylesheet)</para> </listitem> </itemizedlist> For example: <screen> <link rel="license" href="ln-id2524073.html" title="Legal Notice"></screen> </para> <refsect2> <title>About the default value</title> <para>In an ideal world, the default value of <parameter>html.head.legalnotice.link.types</parameter> would probably be â<literal>license</literal>â, since the content of the DocBook <sgmltag>legalnotice</sgmltag> is typically license information, not copyright information. However, the default value is â<literal>copyright</literal>â for pragmatic reasons: because thatâs among the set of ârecognized link typesâ listed in <ulink url="http://www.w3.org/TR/html401/types.html#type-links" >Section 6.12 of the HTML 4.01 specification</ulink>, and because certain browsers and browser extensions are preconfigured to recognize that value.</para> </refsect2> </refsect1> </refentry> Index: generate.legalnotice.link.xml =================================================================== RCS file: /cvsroot/docbook/xsl/params/generate.legalnotice.link.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -U2 -r1.3 -r1.4 --- generate.legalnotice.link.xml 24 Jun 2005 02:17:22 -0000 1.3 +++ generate.legalnotice.link.xml 27 Apr 2006 08:59:37 -0000 1.4 @@ -15,8 +15,29 @@ <refsect1><title>Description</title> -<para>If non-zero, the contents of <tag>legalnotice</tag> are written -to a separate HTML file and a link to the file is -generated. Otherwise, <tag>legalnotice</tag> contents are rendered on -the title page.</para> +<para>If the value of <parameter>generate.legalnotice.link</parameter> +is non-zero, the stylesheet: + +<itemizedlist> + <listitem> + <para>writes the contents of <tag>legalnotice</tag> to a separate + HTML file</para> + </listitem> + <listitem> + <para>inserts a hyperlink to the <tag>legalnotice</tag> file</para> + </listitem> + <listitem> + <para>adds (in the HTML <literal>head</literal>) either a single + <literal>link</literal> or element or multiple + <literal>link</literal> elements (depending on the value of the + <parameter>html.head.legalnotice.link.multiple</parameter> + parameter), with the value or values derived from the + <parameter>html.head.legalnotice.link.types</parameter> + parameter</para> + </listitem> + </itemizedlist> + + Otherwise, if <parameter>generate.legalnotice.link</parameter> is + zero, <tag>legalnotice</tag> contents are rendered on the title + page.</para> </refsect1> |