Author: rgardler
Date: Mon Jun 11 08:37:20 2007
New Revision: 546173
URL: http://svn.apache.org/viewvc?view=rev&rev=546173
Log:
allow multiple definitions of glossary items (thanks to Oshani Seneviratne
FOR-1006)
Modified:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.skos/resources/stylesheets/skos-to-document.xsl
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.skos/src/documentation/content/xdocs/glossary.xml
Modified:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.skos/resources/stylesheets/skos-to-document.xsl
URL:
http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.skos/resources/stylesheets/skos-to-document.xsl?view=diff&rev=546173&r1=546172&r2=546173
==============================================================================
---
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.skos/resources/stylesheets/skos-to-document.xsl
(original)
+++
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.skos/resources/stylesheets/skos-to-document.xsl
Mon Jun 11 08:37:20 2007
@@ -24,66 +24,75 @@
<xsl:template match="/">
<xsl:apply-templates select="rdf:RDF" />
</xsl:template>
+
<xsl:template match="rdf:RDF">
<document>
<xsl:call-template name="header"/>
<xsl:call-template name="body"/>
</document>
</xsl:template>
+
<xsl:template name="header">
<header>
<title>Glossary</title>
</header>
</xsl:template>
+
<xsl:template name="body">
<body>
<xsl:apply-templates/>
</body>
</xsl:template>
+
<xsl:template match="skos:Concept">
<xsl:call-template name="concept"/>
</xsl:template>
+
<xsl:template match="skos:prefLabel">
- <xsl:apply-templates/>
+ <em class="bold">
+ <xsl:apply-templates/>
+ </em>
</xsl:template>
+
<xsl:template match="skos:definition">
- <p>
+ <li>
<xsl:apply-templates/>
- </p>
+ </li>
</xsl:template>
+
<xsl:template name="concept">
- <dl>
- <xsl:attribute name="id">
- <xsl:value-of select="skos:prefLabel/text()"/>
- </xsl:attribute>
- <dt>
- <xsl:apply-templates select="skos:prefLabel"/>
- </dt>
- <dd>
- <xsl:apply-templates select="skos:definition"/>
- </dd>
- <xsl:if test="skos:related">
- <dd>
- <p>See Also: </p>
- <ul>
- <xsl:apply-templates select="skos:related"/>
- </ul>
- </dd>
+ <dl class="{local-name(.)}" id="{skos:prefLabel/text()}">
+ <dt>
+ <xsl:apply-templates select="skos:prefLabel"/>
+ </dt>
+ <dd class="{local-name(.)}">
+ <ol>
+ <xsl:apply-templates select="skos:definition"/>
+ </ol>
+ </dd>
+ <xsl:if test="skos:related">
+ <dd class="{local-name(skos:related)}">
+ <p>See Also: </p>
+ <ul>
+ <xsl:apply-templates select="skos:related"/>
+ </ul>
+ </dd>
+ </xsl:if>
+ </dl>
+ </xsl:template>
+
+ <xsl:template match="skos:related">
+ <xsl:variable name="relatedTerm"
+ select="@rdf:resource"/>
+ <xsl:for-each select="../../skos:Concept">
+ <xsl:if test="$relatedTerm = @rdf:about">
+ <li>
+ <link href="#{skos:prefLabel/text()}">
+ <xsl:value-of select="skos:prefLabel/text()"/>
+ </link>
+ </li>
</xsl:if>
- </dl>
-</xsl:template>
+ </xsl:for-each>
+ </xsl:template>
-<xsl:template match="skos:related">
- <xsl:variable name="relatedTerm"
- select="@rdf:resource"/>
- <xsl:for-each select="../../skos:Concept">
- <xsl:if test="$relatedTerm = @rdf:about">
- <li>
- <link href="#{skos:prefLabel/text()}">
- <xsl:value-of select="skos:prefLabel/text()"/>
- </link>
- </li>
- </xsl:if>
- </xsl:for-each>
-</xsl:template>
</xsl:stylesheet>
Modified:
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.skos/src/documentation/content/xdocs/glossary.xml
URL:
http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.skos/src/documentation/content/xdocs/glossary.xml?view=diff&rev=546173&r1=546172&r2=546173
==============================================================================
---
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.skos/src/documentation/content/xdocs/glossary.xml
(original)
+++
forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.input.skos/src/documentation/content/xdocs/glossary.xml
Mon Jun 11 08:37:20 2007
@@ -21,11 +21,13 @@
<skos:Concept rdf:about="http://forrest.apache.org/docs/glossary#Dispatcher">
<skos:prefLabel>Dispatcher</skos:prefLabel>
<skos:definition>
- 1. The Dispatcher is the codename for the Forrest Implementation of the
+ The Dispatcher is the codename for the Forrest Implementation of the
Core J2EE Dispatcher View. java.sun.com has more information on its
origins.
+ </skos:definition>
- 2. What we at 'Forrest' relate the Dispatcher to, is the overall
+ <skos:definition>
+ What we at 'Forrest' relate the Dispatcher to, is the overall
technology and implementation of the replacement 'skins' system.
Combining 'Views', 'Contracts' , 'Themes' enables separation of concerns
to provide a fast and efficient documentation framework.
@@ -39,12 +41,20 @@
<skos:Concept rdf:about="http://forrest.apache.org/docs/glossary#Contracts">
<skos:prefLabel>Contracts</skos:prefLabel>
<skos:definition>
- 1. A contract is a snippet of re-usable code that gets used in a
- structurer file. 2. Contracts can be used or omitted as neccessary,
+ A contract is a snippet of re-usable code that gets used in a
+ structurer file.
+ </skos:definition>
+ <skos:definition>
+
+ Contracts can be used or omitted as neccessary,
though a few are really compulsary in order to define a basic skeleton
- structure and to include some styling (CSS) 3. Contracts mainly come
- in three (3) types, static, semi-static & dynamic. Static Contracts
are
- pre-defined snippets of code that need no further information.
+ structure and to include some styling (CSS)
+ </skos:definition>
+
+ <skos:definition>
+ Contracts mainly come in three (3) types, static, semi-static &
+ dynamic. Static Contracts are pre-defined snippets of code that need
+ no further information.
Semi-static Contracts can include extra configuration variables, these
would over-ride otherwise default variables. Dynamic Contracts can have
extra configuration variables, but can also define their own snippets of
@@ -54,7 +64,7 @@
<skos:Concept rdf:about="http://forrest.apache.org/docs/glossary#Class">
<skos:prefLabel>Class</skos:prefLabel>
<skos:definition>
- 1. In the context of the dispatcher, a Class is used as an optional
+ In the context of the dispatcher, a Class is used as an optional
attribute to the forrest:hook.
</skos:definition>
<skos:related rdf:resource="http://forrest.apache.org/docs/glossary#Name"/>
@@ -62,7 +72,7 @@
<skos:Concept rdf:about="http://forrest.apache.org/docs/glossary#Name">
<skos:prefLabel>Name</skos:prefLabel>
<skos:definition>
- 1. In the context of the dispatcher, a name is used as an optional
+ In the context of the dispatcher, a name is used as an optional
attribute to the forrest:hook.
</skos:definition>
<skos:related
rdf:resource="http://forrest.apache.org/docs/glossary#Class"/>
@@ -70,8 +80,12 @@
<skos:Concept rdf:about="http://forrest.apache.org/docs/glossary#Skins">
<skos:prefLabel>Skins</skos:prefLabel>
<skos:definition>
- 1. Skins is the name of the older alternative way for structuring and
- styling your site pages. 2. Skins is still used in Forrest versions
+ Skins is the name of the older alternative way for structuring and
+ styling your site pages.
+ </skos:definition>
+
+ <skos:definition>
+ Skins is still used in Forrest versions
0.7 and 0.8-dev, though for 0.8-dev and beyond it can be concidered
an option with Dispatcher being the other.(It is enabled as the default
option currently)
@@ -82,8 +96,12 @@
<skos:Concept rdf:about="http://forrest.apache.org/docs/glossary#Views">
<skos:prefLabel>Views</skos:prefLabel>
<skos:definition>
- 1. Views is the older now deprecated name for what is now the
- 'Dispatcher'. 2. Views also, confusingly, was used as a term for the
+ Views is the older now deprecated name for what is now the
+ 'Dispatcher'.
+ </skos:definition>
+
+ <skos:definition>
+ Views also, confusingly, was used as a term for the
Structurer, and forrest:views is a deprecated code that has been replaced
with forrest:template.
</skos:definition>
@@ -92,8 +110,12 @@
<skos:Concept rdf:about="http://forrest.apache.org/docs/glossary#Themes">
<skos:prefLabel>Themes</skos:prefLabel>
<skos:definition>
- 1. A more extensible and adaptable solution than its alternative 'Skins'.
- A 'Theme' is an overall content & style set. 2. A master 'common'
theme
+ A more extensible and adaptable solution than its alternative 'Skins'.
+ A 'Theme' is an overall content & style set.
+ </skos:definition>
+
+ <skos:definition>
+ A master 'common' theme
provides the basis in which you can extend, over-ride or add to in order
to make your own theme, you do not have to create a complete theme from
scratch, simply include/exclude/over-ride/add what you need. The current
@@ -104,8 +126,12 @@
<skos:Concept rdf:about="http://forrest.apache.org/docs/glossary#Tiles">
<skos:prefLabel>Tiles</skos:prefLabel>
<skos:definition>
- 1. A tile is a collection of contracts that are grouped together for easy
- inclusion into a theme. 2. Tiles was the original but deprecated name for
+ A tile is a collection of contracts that are grouped together for easy
+ inclusion into a theme.
+ </skos:definition>
+
+ <skos:definition>
+ Tiles was the original but deprecated name for
a collection of contracts, it is now re-named and re-implemented as a
'Panels'.
</skos:definition>
@@ -114,13 +140,21 @@
<skos:Concept rdf:about="http://forrest.apache.org/docs/glossary#Hooks">
<skos:prefLabel>Hooks</skos:prefLabel>
<skos:definition>
- 1. forrest:hooks is a concept of defining format independent hooks to
- structure the output. 2. Hooks are used to help define the layout of a
+ forrest:hooks is a concept of defining format independent hooks to
+ structure the output.
+ </skos:definition>
+
+ <skos:definition>
+ Hooks are used to help define the layout of a
page. Hooks are only used to define the structure in our output that is
required to enable a theme to apply its look and feel.
- 3. Hooks convert to layout <div></div> container blocks and
+ </skos:definition>
+ <skos:definition>
+ Hooks convert to layout <div></div> container blocks and
usually only consist of forrest:contracts.
- 4. Hooks are applied currently in the themes.core plugin as part of a
+ </skos:definition>
+ <skos:definition>
+ Hooks are applied currently in the themes.core plugin as part of a
themes structurer configuration file such as %themename %-html.panel.xml
(e.g pelt-html.panel.xml) or included in such configuration files via a
panel file such as %themename%-%format%.panel.xml
@@ -132,11 +166,15 @@
<skos:Concept rdf:about="http://forrest.apache.org/docs/glossary#Structurer">
<skos:prefLabel>Structurer</skos:prefLabel>
<skos:definition>
- 1. The Structurer allows a user to define the layout and content of a site
+ The Structurer allows a user to define the layout and content of a site
or parts of a site.
- 2. Structurer files contain hooks & contracts which you can include to
+ </skos:definition>
+ <skos:definition>
+ Structurer files contain hooks & contracts which you can include to
build up a site structure template.
- 3. A completed structurer file defines an overall theme (look and feel)
+ </skos:definition>
+ <skos:definition>
+ A completed structurer file defines an overall theme (look and feel)
for a site.
</skos:definition>
<skos:related
rdf:resource="http://forrest.apache.org/docs/glossary#Contracts"/>
@@ -147,20 +185,20 @@
<skos:Concept rdf:about="http://forrest.apache.org/docs/glossary#Property">
<skos:prefLabel>Property</skos:prefLabel>
<skos:definition>
- 1. forrest:property - Todo:open
+ forrest:property - Todo:open
</skos:definition>
</skos:Concept>
<skos:Concept rdf:about="http://forrest.apache.org/docs/glossary#Panels">
<skos:prefLabel>Panels</skos:prefLabel>
<skos:definition>
- 1. Panels is the new name for a tile - a collection of contracts.
+ Panels is the new name for a tile - a collection of contracts.
</skos:definition>
<skos:related
rdf:resource="http://forrest.apache.org/docs/glossary#Tiles"/>
</skos:Concept>
<skos:Concept rdf:about="http://forrest.apache.org/docs/glossary#Panel">
<skos:prefLabel>Panel</skos:prefLabel>
<skos:definition>
- 1. Panels is the new name for a tile - a collection of contracts.
+ Panels is the new name for a tile - a collection of contracts.
</skos:definition>
<skos:related
rdf:resource="http://forrest.apache.org/docs/glossary#Tiles"/>
</skos:Concept>