Adding JavaScript and XSL Files
The wiki server supports the use of custom JavaScript and Extensible Stylesheet Language (XSL) files. JavaScript and XSL change the content you’re displaying, whereas CSS controls the presentation of content. For example, you use could use JavaScript or XSL to add a “digg it” link to your blog entries, which would then tie the blog entries to digg.com.
Carefully choose whether you want to use JavaScript, XSL, or both.
JavaScript has these advantages:
ÂÂ Unlike custom XSL files, JavaScript files continue to work after doing a software update. The wiki server includes XSL files, which can be changed during a software update. If these files change, then an error occurs because the file versions of included files no longer match the file versions of custom XSL files.
ÂÂ JavaScript can allow you more control over a document than XSL if you have access to information on the server that isn’t provided in the XSL context.
XSL has this advantage:
ÂÂ XSL transformations are performed on the wiki server, so the user’s browser isn’t required to support and run it.
To add JavaScript files or XSL files to a theme:
1Put JavaScript (.js) files or XSL (.xsl) files in this folder:
/Library/Application Support/Apple/WikiServer/Themes/theme_name/ Replace theme_name with the name of the theme.
/Library/Application Support/Apple/WikiServer/Themes/
theme_name/
JavaScript files
XSL files
Chapter 1 Customizing How the Wiki Looks
25