Sophie

Sophie

distrib > Mageia > 7 > i586 > media > core-release > by-pkgid > 6e019a662639ac6470f50dea3a4d8157 > files > 810

docbook-style-xsl-doc-1.79.2-4.mga7.noarch.rpm

<html><head>
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
   <title>webhelp.tree.cookie.id</title><link rel="stylesheet" type="text/css" href="../reference.css"><meta name="generator" content="DocBook XSL Stylesheets V1.79.2"><link rel="home" href="../index.html" title="DocBook XSL Stylesheets: Reference&nbsp;Documentation"><link rel="up" href="webhelp.html" title="WebHelp"><link rel="prev" href="webhelp.start.filename.html" title="webhelp.start.filename"><link rel="next" href="javahelp.html" title="JavaHelp"><link rel="copyright" href="copyright.html" title="License"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">webhelp.tree.cookie.id</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="webhelp.start.filename.html">Prev</a>&nbsp;</td><th width="60%" align="center">WebHelp</th><td width="20%" align="right">&nbsp;<a accesskey="n" href="javahelp.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="webhelp.tree.cookie.id"></a><div class="titlepage"></div><div class="refnamediv"><h2><span class="refentrytitle">webhelp.tree.cookie.id</span></h2><p>webhelp.tree.cookie.id &#8212; Controls how the cookie that stores the webhelp toc state is named.</p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><a name="webhelp.tree.cookie.id.frag"></a><pre class="programlisting">
&lt;xsl:param name="webhelp.tree.cookie.id" select="concat( 'treeview-', count(//node()) )"&gt;&lt;/xsl:param&gt;
</pre></div><div class="refsection"><a name="d0e11148"></a><h2>Description</h2><p>The webhelp output does not use a frameset. Instead, the table of contents is a div on each page. To preserve the state of the table of contents as the user navigates from page to page, webhelp stores the state in a cookie and reads that cookie when you get to the next page. If you've published several webhelp documents on the same domain, it is important that each cookie have a unique id. In lieu of calling on a GUID generator, by default this parameter is just set to the number of nodes in the document on the assumption that it is unlikely that you will have more than one document with the exact number of nodes. A more optimal solution would be for the user to pass in some unique, stable identifier from the build system to use as the webhelp cookie id. For example, if you have safeguards in place to ensure that the xml:id of the root element of each document will be unique on your site, then you could set webhelptree.cookie.id as follows:
</p><pre class="programlisting">
  &lt;xsl:param name="webhelp.tree.cookie.id"&gt;
    &lt;xsl:choose&gt;
      &lt;xsl:when test="/*/@xml:id"&gt;
	&lt;xsl:value-of select="concat('treeview-',/*/@xml:id)"/&gt;
      &lt;/xsl:when&gt;
      &lt;xsl:otherwise&gt;
	&lt;xsl:value-of select="concat( 'treeview-', count(//node()) )"/&gt;
      &lt;/xsl:otherwise&gt;
    &lt;/xsl:choose&gt;
  &lt;/xsl:param&gt;
  </pre><p>
 </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="webhelp.start.filename.html">Prev</a>&nbsp;</td><td width="20%" align="center"><a accesskey="u" href="webhelp.html">Up</a></td><td width="40%" align="right">&nbsp;<a accesskey="n" href="javahelp.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">webhelp.start.filename&nbsp;</td><td width="20%" align="center"><a accesskey="h" href="../index.html">Home</a></td><td width="40%" align="right" valign="top">&nbsp;JavaHelp</td></tr></table></div></body></html>