Adding javascript and xsl files, 25 adding javascript and xsl files – Apple Mac OS X Server (Extending Your Wiki Server For Version 10.5 Leopard) User Manual

Page 25

Advertising
background image

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) 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:

1

Put 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

Advertising