Table of Contents
Table of Contents
Declare an object which controls whether the site is produced in 'development mode', i.e. whether icons for editing the source files are provided. Change this to false() to produce a production site.
For Object w:mode replacement:<sk:replace> <sk:declare> <xsl:param name="dev-mode" select="true()"/> </sk:declare> </sk:replace>
The background color is #cccccc with #99cccc for the navigation pane. Markers: ideally these would be graphics, but you can use characters. If you change the character used, change w:other-marker as well.
First, for the tabular format.
For Object w:current-marker replacement:w:current-marker[@style='tabular']<sk:replace match="w:current-marker[@style='tabular']">></sk:replace>
For Object w:other-marker replacement:w:other-marker[@style='tabular']<sk:replace match="w:other-marker[@style='tabular']"><font color="#99cccc">></font></sk:replace>
And now the plain style. We only have a marker for the current page here.
For Object w:current-marker replacement:w:current-marker[@style='plain']<sk:replace match="w:current-marker[@style='plain']">@</sk:replace>
The Web Sock produces two different formats of HTML from the same content. The index page welcomes the browser to the site and invites them to select the format they prefer.
Define the headers and footers. We use the same text regardless of format for the footer, but use the type attribute to select something more colourful for the header on the tabular format.
For Object w:header replacement:w:header[@style='tabular']<sk:replace match="w:header[@style='tabular']"> <p align="right" style="color: #800000; font-size: 18pt; font-family: sans-serif; font-weight: bold">Web Example</p> </sk:replace>
For Object w:header replacement:w:header[@style!='tabular']<sk:replace match="w:header[@style!='tabular']"> <center><h2>Web Example</h2></center> </sk:replace>
For Object w:footer replacement:<sk:replace>Site developed using Sock, <w:link href="http://www.melvaig.co.uk"/></sk:replace>
The site is laid out as a tree with the home page at the top. Each page has a body and possibly sub-pages.