Apple Computer Hardware Computer Hardware User Manual


 
Chapter 1 Customizing How the Wiki Looks 25
Adding JavaScript and XSL Files
The wiki server supports the use of custom JavaScript and Extensible Stylesheet
Language (XSL) les. 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 les, JavaScript les continue to work after doing a software Â
update. The wiki server includes XSL les, which can be changed during a software
update. If these les change, then an error occurs because the le versions of
included les no longer match the le versions of custom XSL les.
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 les or XSL les to a theme:
1 Put JavaScript (.js) les or XSL (.xsl) les 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