Introducing XWeb

Stylesheet Parameters

The XSLT stylesheet we use for rendering the pages has a number of options that can be controlled by giving parameters when calling it. XWeb can give parameters to a stylesheet by attaching an additional element <parameter> to the <xsl> node of a <documentStyle> like this:

  <xsl stylesheet="layout/generic.xsl" navigationElement="html">
    <parameter name="nav.main.pos" value="left"/>
    <parameter name="nav.sec.pos" value="below"/>
  </xsl>

Any number of parameters is allowed, which name and value combinations are allowed depends on the stylesheet used, but you have always to give both attributes. If you add these two lines into your makefile and run XWeb again you should get the same result as before -- parameters have often default values and the two values shown here are the default values for the two parameters.

To see what the parameters can do change the value "left" for the first one to "top" or the second value from "below" to "nested". If you run XWeb again you get different layouts for the navigation, the exact behaviour will be described on the next page. Note that changing both, i.e. using the combination of "top" and "nested" is valid but not necessarily useful.