Apple Computer Hardware Computer Hardware User Manual


 
28 Chapter 1 Customizing How the Wiki Looks
If you edit a copy of the default.xsl le, you must also make copies of all of the XSL les
that include the original default.xsl le, and then change them to include the edited
default.xsl le.
Viewing Dynamic XML
The wiki server dynamically generates XML content, which is called context. Context is
transformed by XSL les into HTML.
Before you view context, familiarize yourself with the XSL les located in:
/usr/share/wikid/lib/apple_templates/
The XSL les correspond to specic pages in the wiki. For example, a group’s wiki
homepage uses grouphome.xsl, while a typical wiki page uses content_entry.xsl. To
view context, create an XSL le that displays context and put it in your theme’s folder.
This overrides the XSL les in /usr/share/wikid/lib/apple_templates/ and changes the
output for the pages that they correspond to.
To view context:
1 Create a plain text le with the following content:
<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output
method="html"
version="1.0"
encoding="UTF-8"
indent="yes"
doctype-public="-//W3C//DTD HTML 4.01//EN"
doctype-system="http://www.w3.org/TR/html4/strict.dtd"/>
<xsl:template match="page">
<xsl:copy-of select="context"/>
</xsl:template>
</xsl:stylesheet>
2 Save the le in this location:
/Library/Application Support/Apple/WikiServer/Themes/theme_name/
Use the same lename as any of the XSL les located in:
/usr/share/wikid/lib/apple_templates/
Choose a lename based on the page with the context you want to view. For
example, to view the context for the group’s wiki homepage, change the lename to
grouphome.xsl.