Copyright © 2004, 2005, 2006 MarkupWare
Permission is granted to copy, distribute and/or modify SilkPage Documentation under the terms of the GNU Free Documentation License, Version 1.1 or any later version published by the Free Software Foundation. A copy of the license is available at http://www.gnu.org/copyleft/fdl.html
Table of Contents
List of Examples
This document contains useful information to assist you during the installation, customization and usage of SilkPage.
SilkPage is an XML based Web publishing framework that has evolved from the Docbook Website. With strong foundations in XML, it is a publishing framework with a focus on web standards and usability. SilkPage provides a framework for publishing structured and standard compliant websites in XML. It is particularly suited to publish personal websites, though it is by no means limited to them.
There is a systematic usage of typography and highlighting in this document. Different styles are defined as follows:
Typography Styles
elementAn XML element.
attributeAn XML attribute.
Paths, directory and file names.
Programs and software application names.
command
synopsis
Shell commands that are executed by the user
User
InputText that the user has to type.
Computer
outputText displayed by the computer on the command line.
CPU. Intel® Pentium® II or higher processor
Memory. 32 MB RAM
Disk Space. 20 MB
Network. Internet connection and a Web Browser
Prior to installing SilkPage, you must first install the following application software and middleware. Detailed instructions for installing and using the below mentioned applications are beyond the scope of this document. However, you'll find appropriate instructions in the corresponding URL(s).
Download and Install Java (J2SE)
Download and Install Ant
Download and Install DocBook XSL Stylesheets (optional)
Download and Install DocBook Website (optional)
Download Latest Version of SilkPage
This section covers the SilkPage installation tasks. VERSION corresponds to the current
version of the SilkPage software.
SilkPage comes in two bundles:
silkpage-VERSION.zip only includes
SilkPage distribution. If you choose this download file, you also
need to download the required DocBook resources mentioned in
Section 2, “Prerequisite
Software”.
silkpage-VERSION-plus.zip in addition to
SilkPage distribution, it also includes the required DocBook
resources. It's recommended that you choose this download file as
it includes all the required DocBook resources.
To install SilkPage you only need to unpack the SilkPage
distribution file. Unpacking the download file should result the
directory structure shown in Section 3.3,
“SilkPage Directory Structure”. Once unpacked, you
can test the SilkPage installation by running the config target as shown in Example 1.1,
“Installing SilkPage”.
Example 1.1. Installing SilkPage
unzip silkpage-VERSION-plus.zip
cd silkpage-VERSION
ant -f
src/xml/build/tasks.xml config
config:
[echo] SilkPage (VERSION)
[echo] user.name: jhe
[echo] os.name: Linux
[echo] temp.dir: /tmp
[echo] DocBook Website installed ? true
[echo] DocBook XSL installed ? true
Refer to Appendix C, Command Line Options for detailed information about SilkPage command line options. For troubleshooting, refer to Q & A D.3, “Installation”.
This section gives an overview of the SilkPage directories and
the files they contain. Assuming the SilkPage software is installed
at silkpage-VERSION, here are some of the
most important directories:
[siklpage-VERSION] - $SILKPAGE_HOME
|
+-------------+------------+------------------------+
| | | |
[cfg] [docs] [share] [src]
| |
catalog.xml +------+-----+ +----------+----------+
| | | | |
tidy.properties [lib] [tools] [css] [xml] [xsl]
SilkPage Directories
$SILKPAGE_HOMEThe installation directory of SilkPage software, refered to as
$SILKPAGE_HOME here after.
The configuration directory of the SilkPage software.
catalog.xml used in order to perform Entity and URI resolution.
tidy.properties contains Tidy properties that are fed to Tidy when it's run by SilkPage to validate the XHTML output.
Contains SilkPage User Guide and documentation.
Contains resource files used by SilkPage.
lib/ contains code libraries.
tools/ contains middleware and tools including DocBook Website and DocBook XSL stylesheets.
Contains SilkPage source files.
css/ contains a set of CSS stylesheets that are used to control the XHTML style and presentation.
xml/ contains Ant based build instructions used to generate your Website.
xsl/ contains a set of XSL stylesheets used to output XHTML.
This chapter contains step-by-step instructions for getting started with SilkPage. The following steps summarize the overall process of creating and publishing a Website using SilkPage.
Section 1.1, “Create Site Scratch” Create a brand new site from scratch
Section 1.2, “Create Site Layout” Structure your Website by organizing your XML content
Section 1.3, “Create Site Pages” Create XML source pages and content
Section 3, “Site Publishing” Publish your Website
Section 4.1, “Site Customization” Customize your Website elements and appearance to fit your specific needs
A website is a collection of XML pages organized, for the purposes of navigation, into one or more hierarchies. That is the Website blueprint. This section describes the process of making a blueprint for your Website.
To begin, you need to have your Website basic skeleton. To
create the skeleton of your Website, you need to run the SilkPage
with the scratch target.
When running the SilkPage with the scratch target, you also need to
provide a site.id as shown
in Example 2.1,
“Create Site Scratch”.
Example 2.1. Create Site Scratch
cd silkpage-VERSION
ant -f
src/xml/build/tasks.xml -Dsite.id="coolsite" scratch
This section gives an overview of your scratch Website
directories that are generated by SilkPage using the scratch target. Assuming that
has been
provided as the value of the coolsitesite.id, here is the directory
structure that is generated by SilkPage.
[coolsite] - $SITE_HOME
|
+--------------+-------------+------------+----------------+
| | | | |
build.properties build.xml [src] [img] [cfg]
| catalog.xml
+----------------+----------------+
| | |
[css] [xml] [xsl]
coolsite.css | config.xsl
[en] param.xsl
index.xml rdf.xsl
about.xml
layout.xml
sitemap.xml
glossary.xml
contact.xml
contact-send.php
contact-sent.xml
search.xml
feeds.xml
projects.xml
docs.xml
Scratch Website Directories
$SITE_HOMEis the root directory of the generated directory structure. This
directory is refered to as $SITE_HOME here after.
and your Website themes in terms of CSS and XSL stylesheets.
Contains build properties of your Website such as your Website URL and your website themes in terms of CSS and XSL stylesheets.
Contains build instructions used by Ant
to build your Website. It contains the required targets that let
you preview, publish and upload your Website.
The root directory for your Website content where all source files are kept.
css/
siteid.css for your main Website CSS stylesheet to control your Website style.
xml/ The root directory for your Website XML content.
en/ The root directory for your Website XML content in English. Of course, you could translate your Website content in other languages. For example, to add the French translation, you need to translate your XML content in French and put it under the fr/ ditrctory.
index.xml your Website main index page.
layout.xml describes the layout and structure of your Website as well as your Website navigation.
sitemap.xml contains instructions to generate your Website sitemap based on the layout.xml.
glossary.xml contains a collection of your web site terms
and brief descriptions or definitions of those terms. Once you
refer to a term in your site content, SilkPage transforms it to an
HTML acronym. For example to refere to XML as an acronym, you write
acronym XML /acronym. Also see silkpage.acronyms.database.document
configuration parameter.
search.xml, contact.xml, feeds.xml, etc. also exist in this directory, serving as webpage examples.
xsl/
config.xsl contains XSL based customization templates.
param.xsl contains XSL based configuration parameters.
rdf.xsl is used as a driver stylesheet to generate RDF metadata for each XML source.
The directory for build configuration files
The directory graphical images of the website
After generating the scratch version of your Website, you need
to layout your Website and define your required structure. The site
layout feature provides a mapping between the XML source files and
the generated HTML files. The XML source files can be stored in
multiple directories. Note that, the physical location of the XML
source files do not reflect the site logical hierarchy. The
dir attribute of the
tocentry element can be used
to create any set of directory structure for the HTML output. As
shown in Section 1.1.1,
“Scratch Website Directory Structure”, there is a
scratch layout file (layout.xml) generated for your Website
that can be used as the basis to define the structure of your
Website.
layout: the root element of
the site table of content.
config: optional elements
specifying global configuration information for the whole site. A
config element is defined by a
pair of param and
value. This is a global
element. That is it applies to every page of the Website.
copyright: defines
copyright information in the footer of each page. This is a global
element. That is it applies to every page of the Website.
style: specifies a CSS
stylesheet used by all HTML pages of the site. This is a global
element. That is it applies to every page of the Website.
toc: the site layout top
level element. It specifies the site home page.
tocentry: the hierarchy of
tocentry elements in a
toc describes the logical
navigation hierarchy of the Website. Each entry must identify the
XML document (containing a webpage) that it represents and may
identify the directory and filename where the file will appear in
the HTML Website.
page: attribute specifies
the XML source file used to generate the corresponding HTML
file.
filename: specifies the
HTML output filename. If a filename is not specified, index.html
will be used.
dir: specifies the output
directory where the HTML output is generated. if dir is not specified, the files will
appear in the currently inherited directory (or in the root, if no
directory is specified anywhere in the tocentry ancestry).
notoc: pages identified
with notoc elements instead of
tocentry will be in the
Website but will not appear in any hierarchy.
dir attribute can be
specified using relative or absolute paths. If relative path is
used, it's taken as relative to the dir value of any ancestor tocentry elements. However, if the
absolute path is chosen, it's taken as relative to the output-root parameter whose value is
set to "." by default.
Example 2.2. Site Layout
<!DOCTYPE layout PUBLIC "-//Norman Walsh//DTD Website Layout V2.4.0//EN" "http://docbook.sourceforge.net/release/Website/2.4.0/schema/dtd/layout.dtd"> <layout> <config param="footlink" value="sitemap" altval="Sitemap"/> <config param="footlink" value="aboutContact" altval="Contact"/> <config param="title" value="SilkPage"/> <copyright> <year>2004</year> <holder role="aboutLicense">SilkPage</holder> </copyright> <headlink rel="icon" href="graphics/gif/silkpage_icon.gif" type="image/gif"/> <style src="css/silkpage.css" type="text/css"/> <toc page="index.xml" filename="index.html"> <tocentry page="about/index.xml" dir="about" filename="index.html"> <tocentry page="about/colophon.xml" filename="colophon.html"/> <tocentry page="about/contact.xml" filename="contact.html"/> </tocentry> <tocentry page="docs/index.xml" dir="docs" filename="index.html"/> <tocentry page="downloads/index.xml" dir="downloads" filename="index.html"/> </toc> <notoc page="sitemap.xml" filename="sitemap.html"/> </layout>
The above layout.xml file, specifies seven pages for its Website. Using this layout file, the hierarchical structure of the Website is a main page index.html with three subordinate (about, docs and downloads) pages that are:
[root_dir]
|
+--------------+-------------+---------------+---------------+
| | | | |
index.html sitemap.xml [about] [docs] [downloads]
index.html index.html index.html
colophon.html
contact.html
index.html generated from index.xml content.
about/index.html generated from about/index.xml content.
about/colophon.html generated from about/colophon.xml content.
about/contact.html generated from about/contact.xml content.
docs/index.html generated from docs/index.xml conent.
downloads/index.html generated from downloads/index.xml conent.
sitemap.html generated from sitemap.xml.
Once your Website structure and layout is defined, you need to create the corresponding pages in XML. That is your Website content. A SilkPage page is written using DocBook and Website elements. For each Web page there is a corresponding XML file. Each page consists primarily of three sections:
Root: must start with
webpage and followed by any
optional config elements.
Head: header information.
Body: page content marked up with DocBook and Website elements.
webpage: specifies the page
root element; its id must be
unique in the scope of the site.
config: specifies metadata
information in the generated HTML output.
head: contains the page
head information:
title: specifies the title
of the generated HTML page.
summary: used in the title
attribute of the generated HTML page with the exception of the home
page.
keyword: specifies metadata
information for the page.
Example 2.3. Page Head
<?xml version="1.0">
<!DOCTYPE webpage ...>
<webpage id="home">
<config param="rcsdate" value="$Date: 2006/04/17 16:26:47 $"/>
<head>
<title>SilkPage</title>
<summary>An XML based Publishing Framework for Web</summary>
<keywords>Markup, web standards, W3C, XML, XSL, CSS, XHTML</keywords>
</head>
</webpage>
In the above example, the header information of the SilkPage Website is specified as follows:
home is the unique
identifier of the home page.
rcsdate specifies the
last modification date of the page. The value of this parameter is
set to $Date: 2006/04/17 16:26:47
$ that is a CVS
substitution keyword. Using this approach, SilkPage generates the
last modification timestamp of the home page at the bottom of the
XHTML output page.
title specifies the page
main title.
summary provides a short
description for the SilkPage framework.
keyword provides some
metadata information used by some search engines.
In addition to what's specified in the above example, SilkPage generates several other optional links in the XHTML output page as follows:
XML Source. Links to the XML source of the page. The lable of this link can be changed by setting the value of the configuration parameter sources.xml.
RDF metadata. Links to the RDF metadata of the page. The lable of this link can be changed by setting the value of the configuration parameter sources.rdf.
RSS Feed. Links to the RSS feed of the page. The lable of this link can be changed by setting the value of the configuration parameter sources.rss10.
Atom Feed. Links to the Atom feed(s) of the page. The lable of this link can be changed by setting the value of the configuration parameter sources.atom.
DOAP Source. Links to the DOAP source, included in the XML source. The lable of this link can be changed by setting the value of the configuration parameter sources.doap.
URFM. Links to the URFM file included in the XML source. The lable of this link can be changed by setting the value of the configuration parameter sources.urfm.
FOAF. Links to the FOAF file included in the XML source. The lable of this link can be changed by setting the value of the configuration parameter sources.foaf.
The page content is marked up using DocBook Website elements defined in website.dtd. Refer to the online documentation of Simplified DocBook DTD for avilable elements and their syntax.
Example 2.4. Page Body
<?xml version="1.0">
<!DOCTYPE webpage ...>
<webpage id="home">
<config param="desc" value="The home index page"/>
<config param="rcsdate" value="$Date: 2006/04/17 16:26:47 $"/>
<head>
<title>SilkPage</title>
<summary>An XML based Publishing Framework for Web</summary>
<keywords>Markup, web standards, W3C, XML, XSL, CSS, XHTML</keywords>
</head>
<para>
SilkPage is an XML based Web publishing framework that has evolved from
the Docbook Website. With strong foundations in XML, it is a publishing
framework with a focus on web standards and usability.
SilkPage provides a framework for publishing structured and standrad
compliant websites in XML. It is particularly suited to publish personal
websites, though it is by no means limited to them.
</para>
<sidebar>
<variablelist>
<title>Key Features</title>
<varlistentry>
<term>Conent Management</term>
<listitem>
<para>
XML based content management.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>WaSP Compliant</term>
<listitem>
<para>
Web Standards (WaSP) compliant XHTML output in addition to XML and
PDF outputs.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Content Feeds Support</term>
<listitem>
<para>
Integrated XML and RSS feed generation.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Separate Presentation Model</term>
<listitem>
<para>
Customization via XSL and CSS customization layers.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>Cross Platform Support</term>
<listitem>
<para>
Cross platform support via industry standards.
</para>
</listitem>
</varlistentry>
</variablelist>
</sidebar>
</webpage>
In the above example the para element is used to describe the
SilkPage framework briefly. In addition, the sidebar element is used to list the key
features of the SilkPage framework.
SilkPage maintains metadata information about your site
architecture, pages and their links. This information is kept in
the layout.xml discussed in Section 1.2, “Create Site
Layout”. Using this approach, SilkPage separates, the
site content from its logical structure. Site pages and documents
are linked using olink that
makes it possible to locate the target element in the site content
and generate the site links automatically. olinks are resolved from a database of
targets that is maintained by SilkPage. This solution reduces link
maintenance of your Website significantly.
olink: the main element for
linking pages and elements.
targetdoc the
id of the target
webpage that must exist and
its id must be unique.
targetptr the
id attribute value of the
target element within the target webpage. In order to link to the top of a
given page, the value of the targetptr must be the same as the
targetdoc.
ulink: mainly used to
directly link to external HTML pages and documents. Such links are
not verified while processing, so they require manual maintainance
in order to be valid URLs. Therefore, it's bad idea to use
ulink to link directly to the
generated XHTML pages; if you change the hierarchy or rename a
page, the link will become stale. With olink this won't happen.
url the URL of the target
HTML document.
Example 2.5. Linking Content Pages and Elements
<para> SilkPage is an XML based Web publishing framework that has evolved from the <ulink url="http://sourceforge.net/projects/docbook">Docbook Website</ulink>. With strong foundations in XML, it is a publishing framework with a focus on web standards and usability. It's mainly used to publish personal and Websites. Refer to the SilkPage <olink targetdoc="docs">User Guide</olink> for more information. </para>
In the above example, a ulink is used to link to the DocBook Website. However, to link to the main
index page of the documentation, a olink is used. Note that you don't have to
do anything special to the page you're linking to. The only
important thing is a valid entity id, in this case docs.
SilkPage uses Ant to automate your site generation, validation and upload.
Based on your XML content, SilkPage generates XHTML output.
SilkPage uses Tidy to validate and eventually fix the generated XHTML.
SilkPage facilitates the upload of your Website by using a
FTP based file transfer. Assuming
that you have used the scratch target like it was shown in
Example 2.1,
“Create Site Scratch”, you need to run SilkPage
with the preview target to
have the draft version of your Website generated.
As shown in the above example, you can generate a draft version
of your Website locally. This local version will be used to upload
your Website when running SilkPage with the publish target. In order to publish
your Website online, you need to run SilkPage with the publish target, as shown in Example 2.7,
“Publishing your Website Online”.
Refer to Appendix C, Command Line Options for detailed information about SilkPage command line options.
As Web sites become increasingly sophisticated, they demand advanced requirements such as XML Feed integration, metadata rendering, etc. SilkPage is designed so that it's easy to customize to fit your special requirements. You can customize SilkPage at XSL and CSS layers. This section covers SilkPage customization and advanced features such as XML and Feed integration.
SilkPage allows stylesheet customization for a particular Website. That is customizing with XSL as well as CSS stylesheets. These customizations are integrated to SilkPage via themes. SilkPage provides two types of themes:
XSL Theme: a set of XSL stylesheet grouped into a directory. This directory name is used by SilkPage to identify the desired XSL theme and use it when generating XHTML output.
CSS Theme: a set of CSS stylesheet grouped into a directory. directory name is used by SilkPage to identify the desired CSS theme and use it when presenting XHTML output.
As indicated in the previous section, you can define and your own XSL theme and have SilkPage use it to generate your Website.
Write your desired XSL stylesheets and put them in a directory. The name of this directory is used to identify your newly created XSL theme.
install it by copying the directory to $SILKPAGE_HOME/src/xsl . Note that $SILKPAGE_HOME is the install directory of the
SilkPage software.
set the value of the configuration parameter: silkpage.adapt.xsl.theme to your newly created theme.
Like XSL themes, a new CSS theme can be defined and used as follows:
Write your desired CSS stylesheets and put them in a directory. The name of this directory is used to identify your newly created CSS theme.
install it by copying the directory to $SILKPAGE_HOME/src/css. Note that
$SILKPAGE_HOME is the install
directory of the SilkPage software.
set the value of the configuration parameter: silkpage.adapt.css.theme to your newly created theme.
A feed is a wrapper for pieces of regularly and sequentially-updated content such as news headlines, articles, weblog posts, and so on. Atom and RSS are the two flavours of XML feeds. They are both supported by SilkPage. Once integrated into your site, a news reader application such as Bloglines, RSSOwl, or even FireFox can be used to automatically check your list of feeds. This enables your visitors to know what's new on your site.
RSS is an application of XML, that provides an open method of syndicating and aggregating Web content. Using RSS files, you can create a data feed that supplies headlines, links, and article summaries from your Website.
Example 2.8. RSS 1.0 Feed
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel rdf:about="http://www.markupware.com/">
<title>MarkupWare Projects</title>
<link>http://www.markupware.com/projects/</link>
<description>MarkupWare project portfolio</description>
<dc:language>en-us</dc:language>
<dc:rights>Copyright © MarkupWare</dc:rights>
<items>
<rdf:Seq>
<rdf:li rdf:resource="http://www.markupware.com/projects#silkpage"/>
</rdf:Seq>
</items>
</channel>
<item rdf:about="http://www.markupware.com/projects#silkpage">
<title>SilkPage Project</title>
<link>http://silkpage.markupware.com</link>
<dc:date>2004-09-04</dc:date>
<description>
SilkPage is an XML based Web publishing framework that has evolved from
the Docbook Website. With strong foundations in XML, it is a publishing
framework with a focus on web standards and usability. SilkPage provides
a framework for publishing structured and standard compliant websites in
XML. It is particularly suited to publish personal websites, though it
is by no means limited to them.
</description>
</item>
</rdf:RDF>
The above example, defines a RSS 1.0 compliant feed for the project section of the MarkupWare Website. Based on the above source, SilkPage generates proper XHTML output page with a link to the RSS feed. The label of this link can be changed by setting the value of the configuration parameter sources.rss10.
RSS is an application of XML, that provides an open method of syndicating and aggregating Web content. Using RSS files, you can create a data feed that supplies headlines, links, and article summaries from your Website.
Example 2.9. Atom Feed
<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>MarkupWare Projects</title>
<subtitle>MarkupWare project portfolio</subtitle>
<link rel="alternate" type="text/html"
href="http://www.markupware.com/projects/"/>
<link rel="self" type="application/atom+xml"
href="http://www.markupware.com/feeds/projects.xml"/>
<id>http://www.markupware.com/feeds/projects.xml</id>
<updated>2006-01-26T11:26:54+01:00</atom:updated>
<author>
<atom:name>MarkupWare Team</atom:name>
</atom:author>
<dc:language>en-us</dc:language>
<dc:rights>Copyright © MarkupWare</dc:rights>
<entry>
<title type="text">SilkPage</title>
<id>http://www.markupware.com/projects#silkpage</id>
<link rel="alternate" type="text/html"
href="http://silkpage.markupware.com/"/>
<published>2004-12-20T20:19:41+01:00</published>
<updated>2005-07-15T23:34:34+01:00</updated>
<content type="text">
SilkPage is an XML based Web publishing framework that has evolved from
the Docbook Website. With strong foundations in XML, it is a publishing
framework with a focus on web standards and usability. SilkPage provides
a framework for publishing structured and standard compliant websites in
XML. It is particularly suited to publish personal websites, though it
is by no means limited to them.
</content>
</entry>
</feed>
The above example, defines an Atom compliant feed for the project section of the MarkupWare Website. Based on the above source, SilkPage generates proper XHTML output page with a link to the Atom feed. The label of this link can be changed by setting the value of the configuration parameter sources.atom.
RDF is the World-Wide Web, specification, data (RDF). A specification being developed in 2000 by the W3C as a foundation for processing meta-data regarding resources on the Internet, including the World-Wide Web. SilkPage generates RDF (along with a link pointed to the generated RDF) for each page of your Website based on the XML content of the page. The label of the RDF link can be changed by setting the value of the configuration parameter sources.rdf.
Sitemap is an important help for your Website visitors to find
their way around your site. SilkPage generates and maintains your
Website sitemap. A config
element should be added to the layout.xml in order to have
the sitemap generated (See Example 2.2,
“Site Layout”). SilkPage maintains and provides a
link to your Website sitemap.
A tocentry or notoc must be added to the
layout.xml, pointing to sitemap.xml contained in your
Website source directory.
This section describe each of the global configuration parameter used in SilkPage. This information is most useful when configuring SilkPage globally after the installation.
It is a catalog of public resources such as DTDs or entities that are referenced in an XML document. It's typically used to make web references to resources point to a locally cached copy of the resource. SilkPage uses this catalog to perform Entity and URI resolution. Please refer to the Catalogs Specification for more information about the usage and syntax of cfg/ catalog.xml.
This section describe each of the configuration parameter used by SilkPage to publish an instance of your website. This information is most useful when publishing a particular instance of a Website.
$SITE_HOME /build.properties contains
main configuration of an instance website.
This section covers the customization and configuration parameters at the XSL and CSS layers. SilkPage uses SilkPage XSL Themes to process and generate your website. You may either use the default XSL themes or plug in yours. Likewise, SilkPage CSS Themes are used in order to present your website. Again, you may either use default SilkPage CSS Themes or define and use yours.
silkpage.adapt.xsl.main
— XSL configuration parameters and customization
templates
silkpage.adapt.xsl.main=
${user.xsl.dir}/config.xsl
Specifies the main XSL configuration parameters and customization templates used when generating your website. Refer to config.xsl and param.xsl to learn about the configuration parameters and templates of this file.
silkpage.adapt.xsl.rdf
— XSL configuration parameters related to RDF output
silkpage.adapt.xsl.rdf=
${user.xsl.dir}/rdf.xsl
Specifies the main XSL configuration parameters used when generating your RDF metadata for your website. Refer to rdf.xsl to learn about the configuration parameters of this file.
silkpage.adapt.css.theme
— Specifies the CSS Theme used to generate your website.
SilkPage comes with some pre-defined CSS Themes that you can
select. However, you can write your own CSS Theme and install it
under $SILKPAGE_HOME/src/css .
Note that $SILKPAGE_HOME is the install
directory of the SilkPage software. Currently, SilkPage includes
the following CSS themes.
silkpage.adapt.css.theme=CSS Theme
silkpage.adapt.xsl.theme
— Specifies the XSL Theme used to generate your website.
SilkPage comes with some pre-defined XSL Themes that you can
select. However, you can write your own XSL Theme and install it
under $SILKPAGE_HOME/src/xsl.
Note that $SILKPAGE_HOME is the install
directory of the SilkPage software. Currently, SilkPage includes
the following XSL themes.
silkpage.adapt.xsl.theme=XSL Theme
This section covers configuration parameters related to DocBook resources. That is the installation directories of the required DocBook resources.
docbook.xsl.home —
Docbook XSL Stylesheets
installation directory.
docbook.xsl.home=fullpath
docbook.website.home
— Docbook Website DTD and
Stylesheets installation directory.
docbook.website.home=fullpath
silkpage.website.database.document
— An internal database for resolving links.
silkpage.website.database.document=fullfilename
This section covers the configuration parameters used by the FTP
task. This task is used when running SilkPage with the publish target. That is when
publishing your Website online.
ftp.remotedir —
Specifying where your website will be located the ftp server
ftp.remotedir=path
ftp.depends —
Transfers only new or changed files if set to "yes". Defaults to
"no".
ftp.depends=yes|no
ftp.passive —
Specifies passive-mode ("yes") transfers. Defaults to "no".
ftp.passive=yes|no
ftp.binary —
Specifies binary-mode ("yes") or text-mode ("no") transfers.
Defaults to "yes".
ftp.binary=yes|no
This section covers the general configuration parameters that are used when running SilkPage with variuos targets.
default.encoding —
The encoding used by various tasks. Defaults to UTF-8. Please refer to Character Sets and Encoding to learn more about avaiable
encoding.
default.encoding=encoding
default.lang — The
ISO language code used to locate the XML source files.
default.lang=ISO Language Code
The ISO language code used to locate the XML source files.
Defaults to en. Please
refer to Code for the representation of names of languages to
learn more about avaiable ISO 639 language codes.
When running SilkPage with the scratch target, it generates (among
other things) a default CSS stylesheet for your Website. The name
of the CSS styleshhet is based on the siteid argument that you provide when
running SilkPage with the scratch target. This styleshhet
contains one import declaration that
is an instruction to import some other default style sheets from
the SilkPage CSS Themes .
You may modify the import declaration
and instruct it to import your own CSS stylesheets. You can even
add your CSS stylesheets globally by defining your own CSS Theme
and instruct SilkPage to use your CSS themes instead of its
default. Refer to Section 1.1,
“XSL and CSS Customization Parameters” to learn how
you can customize SilkPage by adding your CSS themes.
$SITE_HOME /src/xsl/param.xsl is the
main XSL configuration parameter file used by SilkPage when
processing your XML sources.
SilkPage can generate a Google based seearch field for your Website. This section covers this search field and its associated parameters.
pages.search-box —
Enables/Disables the generation of the search field for your
Website. Defaults to 1, that is enabled.
<xsl:param name="pages.search-box" select="1"/>
If instructed, SilkPage generates link items for XML source and RDF metadata for each generated Webpage and link items for Atom feeds when specified, in XHTML format. This section covers the configuration parameters for these link items.
sources.rdf —
Specifies the text for the RDF metadata link item. Defaults to
"RDF" label.
<xsl:param name="sources.rdf" select="RDF"/>
sources.rss10 —
Specifies the text for the RSS feed link item.
<xsl:param name="sources.rss10" select="RSS"/>
sources.xml —
Specifies the text for the XML source link item.
<xsl:param name="sources.xml" select="XML"/>
sources.urfm —
Specifies the text for the URFM source link item.
<xsl:param name="sources.urfm" select="URFM"/>
sources.doap —
Specifies the text for the DOAP source link item.
<xsl:param name="sources.doap" select="DOAP"/>
sources.foaf —
Specifies the text for the FOAF source link item.
<xsl:param name="sources.foaf" select="FOAF"/>
$SITE_HOME /src/xsl/config.xsl is the
main XSL customization templates file used by SilkPage when
processing your XML sources.
user.search-box —
Defines an XSL template containing your Website specific
information that is used by Google when searhing your Website.
<xsl:template name="user.search-box"> ... </xsl:template>
Defines an XSL template containing your Website specific information that is used by Google when searhing your Website. By default, the URL of your Website specified in default.url is used in this template.
$SITE_HOME /src/xsl/rdf.xsl is used
as a driver stylesheet to generate RDF metadata for each XML
source.
It is a catalog of public resources such as DTDs or entities that are referenced in an XML document. It's typically used to make web references to resources point to a locally cached copy of the resource. SilkPage uses this catalog to perform Entity and URI resolution. Please refer to the Catalogs Specification for more information about the usage and syntax of cfg/ catalog.xml.
This section covers the complete list of command line targets and options of SilkPage used to publish websites. SilkPage command is based on Ant. Before running SilkPage tragets, make sure that you have installed the Prerequisite software listed in Section 2, “Prerequisite Software”. Moreover, refer to Section 1, “ build.properties” in order to learn about parameters' configuration that may effect the command line targets.
ant — Processes SilkPage command line targets options used for generating and publishing websites.
ant [config] [preview] [publish]
[scratch]
scratchuses the pre-defined SilkPage templates to generate the first
draft of your website in XML format. This target must be executed
in the $SILKPAGE_HOME directory and takes two
arguments:
-f src/xml/build/tasks.xml
-Dsite.id=identifier
Once executed, it generates the directory structure shown in Section 1.1.1, “Scratch Website Directory Structure” that can be used as a start point for your website development.
ant -f
src/xml/build/tasks.xml -Dsite.id= scratchidentifier
previewAfter executing the the section called “scratch” target, you need
to change directory to $SITE_HOME and execute the preview target in
order to generate and install a local copy of your website in XHTML
format. The local website is installed relative to the
temp.dir directory. If not specified, the local host
default temp dir is
used.
ant preview
publishgenerates a local copy of your website and publishes it online
by uploading the generated files. Before executing this target,
make sure that you have set the configuration parameters of
Section 1.3, “FTP
Parameters”. This target must be executed in the $SITE_HOME
directory and takes two arguments that are the login and password
of the FTP server of your website:
-Dftp.userid=login
-Dftp.password=password
ant -Dftp.userid= login-Dftp.password= publishpassword
configprints configuration information about the SilkPage and its
prerequisite software mentioned in Section 2, “Prerequisite
Software”. This target must be executed in $SILKPAGE_HOME directory and takes the
following argument:
-f src/xml/build/tasks.xml
ant -f
src/xml/build/tasks.xml config
This FAQ is provided with the hopes to be helpful for users using SilkPage. The information is updated as the questions and answers becomes appearant to the SilkPage team.
D.1. General Information |
|
|
What is SilkPage |
|
|
Refer to Section 1, “What is SilkPage?” section. |
|
|
For whom is SilkPage intended |
|
|
SilkPage is for everyone who believes in Open Standards, XML and quality. The only pre-requisite to use SilkPage is some basic knowledge of XML, to be able to encode your website content. While the SilkPage software is well documented, it's (cuurently) based on a command line executions. If you can't sand command line executions, then SilkPage is not for you. |
|
|
I don't know anything about XML, can I still use SilkPage |
|
|
No, to use SilkPage, you need to provide your Website content in XML format. Therefore, you need to know the XML (very) basics. Refer to A Technical Introduction to XML to get started. |
|
|
What are the differeces between SilkPage and DocBook Website |
|
|
SilkPage is based on DocBook Website. Both applications share almost the identical features, such as Website publishing. However, SilkPage provides some extra features:
|
|
|
On what is SilkPage based |
|
|
SilkPage is mainly based on DocBook Website. |
|
|
What is the relation between SilkPage releases and DocBook Website |
|
|
Piror to every release, SilkPage team takes the current version of DocBook Website releases, makes modifications (if necessary), and prepares its own release. The DocBook Website output may have a different look/feel than SilkPage output. Moreover, SilkPage provides extra features not present in DocBook Website. |
|
D.2. Usage and Customization |
|
|
|
|
How do I create my first Website |
|
|
|
|
How do I migerate my website from DocBook Website to SilkPage |
|
|
SilkPage is based on DocBook
Website. The only thing you need to do to port your website to
SilkPage is to copy the content of your website under |
|
|
How can I change the link labels of the footer items generated by SilkPage |
|
|
Refer to Section 3.2, “Page Source Link Items Parameters” to learn how you can control this feature. |
|
|
SilkPage generates a Google based search field for my website, how can I turn it off |
|
|
Refer to Section 3.1, “Search Field Parameters” to learn how you can control this feature. |
|
|
What is RSS |
|
|
RSS is a format for syndicating news and the content of news-like sites, including major news sites like Wired, news-oriented community sites like Slashdot, and personal weblogs. Refer to All About RSS for a complete desciption. |
|
|
What are all RSS formats and versions ? Which one should I choose |
|
|
There are 0.90 and 0.91 by Netscape , 1.0 by RSS-DEV and 0.9x and 2.0 by UserLand Software . Refer to the What's RSS Article to find out more. |
|
D.3. Installation |
|
|
What is required to run SilkPage |
|
|
Refer to Section 1, “System Requirement”. |
|
|
How do I install the SilkPage software |
|
|
It's simple, for all platforms you can download the .zip archive file and unpack it on the hard disk using your favorite tool. See Section 3.2, “Installing SilkPage Distribution” for more information. |
|
|
On what platforms SilkPage can be installed and run |
|
|
Any operating system supporting Java (J2SE), Standard Edition. However, it should be mentioned that we use GNU/Linux as our reference operating system. |
|
|
I can't even run SilkPage with the |
|
|
The most common hiccup is when
In addition, make sure that Section 1.2, “DocBook Parameters” are set correctly. |
|
This appendix provides the resource references mentioned explicitly in this document. In addition, a sampling of resources for additional information about XML, XSL and CSS is provided.
The most recent version of SilkPage Software and its guide (that is this document) can be found at:
SilkPage Core distribution.
The most up-to-date version of this document.
SilkPage Templates distribution.
Apache Ant is a Java-based build tool. In theory, it is kind of like Make, but without Make's wrinkles.
Java Platform, Standard Edition (Java SE, formerly known as J2SE) offers a complete environment for application development and deployment on desktops and servers.
The DocBook XSL stylesheets are a set of stylesheets for use with an XSLT engine (such as xsltproc or Saxon) for transforming DocBook XML documents into other DocBook output formats, such as HTML, PDF, Microsoft HTML Help, and man pages.
Saxon is an Open Source Java XSLT and XQuery processor created by Michael Kay.
An XML Entity and URI Resolver donated by Norman Walsh to the Apache Software Foundation.
JTidy is a Java port of HTML Tidy, a syntax checker and pretty printer for HTML.
Specifies level 1 of the Cascadin