Separate legalnotice

The default title pages in HTML include the legalnotice element in its entirety. Sometimes this element can be quite long, and it becomes intrusive when it appears between the document title and the table of contents in HTML output.

You can still include your legalnotice but put it in a separate HTML file, with a link to it from the title page. You can do that by simply setting the parameter to 1 instead of the default zero. This works for both the chunking and nonchunking HTML stylesheets.

In your customization layer, set this parameter:

<xsl:param name="" select="1"/>

When processed, the title of the legalnotice element will appear on the HTML title page, and it will link to a separate HTML file. If the legalnotice has no title, then the text Legal Notice is used instead. This default link text is generated using the gentext machinery, so it will be in the appropriate language.

Filename of the legalnotice chunk

The name of the legalnotice chunk file is generated from a combination of the prefix ln-, plus the id attribute value of the legalnotice element, plus the .html filename extension. If the element has no id attribute, then a unique id is generated for it. A generated id is different each time the document is processed. If you want a stable filename so you can cross reference to it, say from the copyright notice you add to your footer, be sure to add an id attribute to the legalnotice element.

If you want to get rid of the ln- prefix, then you will need to customize the template that starts with:

<xsl:template match="legalnotice" mode="titlepage.mode">

in the stylesheet file html/titlepage.xsl. You'll want to change the parameter in the call to make-relative-filename. You also need to change this line that references the filename so the link works:

<a href="{concat('ln-',$id,$html.ext)}">

Replace the concat() expression with one that matches the filename you want.

More than one legalnotice

It is perfectly legal to have more than one legalnotice in your document. You will find that they are processed in sequence, each generating a separate chunk file with its own link on the title page. You will probably want to give each one a different title element so the reader knows from the link text what the different legal notices are for.