Some documentation for Foundry

git-svn-id: https://svn.libreccm.org/ccm/trunk@2973 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2014-11-17 14:32:05 +00:00
parent 78bad5287c
commit 6c93b16b63
6 changed files with 142 additions and 24 deletions

View File

@ -33,6 +33,9 @@
<foundry:doc-section section-id="coding-style" <foundry:doc-section section-id="coding-style"
section-title="Coding style" section-title="Coding style"
static="devel/coding-style.html"/> static="devel/coding-style.html"/>
<foundry:doc-section section-id="tutorial-content-types"
section-title="Tutorial: Adding support for content-types"
static="devel/tutorial-content-types.html"/>
<foundry:doc-section section-id="doc-system" <foundry:doc-section section-id="doc-system"
section-title="The documentation system of Foundry" section-title="The documentation system of Foundry"
static="devel/foundry-doc-system.html"/> static="devel/foundry-doc-system.html"/>

View File

@ -0,0 +1,13 @@
<!DOCTYPE html>
<html>
<head>
<title>The documentation system of Foundry</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
</head>
<body>
<h1>Tutorial: Adding support for Content types</h1>
<main>
Placeholder
</main>
</body>
</html>

View File

@ -34,6 +34,15 @@ processor, some are read from the configuration files of Foundry and some are de
exclude-result-prefixes="xsl bebop foundry ui" exclude-result-prefixes="xsl bebop foundry ui"
version="2.0"> version="2.0">
<foundry:doc-file>
<foundry:doc-file-title>Global/environment variables</foundry:doc-file-title>
<foundry:doc-file-desc>
<p>
Global variables either provided by the calling CCM instance or by Foundry itself.
</p>
</foundry:doc-file-desc>
</foundry:doc-file>
<!-- Foundry internal variables --> <!-- Foundry internal variables -->
<foundry:doc section="devel" type="env-var"> <foundry:doc section="devel" type="env-var">
<foundry:doc-desc> <foundry:doc-desc>
@ -82,21 +91,33 @@ processor, some are read from the configuration files of Foundry and some are de
</foundry:doc> </foundry:doc>
<xsl:param name="theme-prefix"/> <xsl:param name="theme-prefix"/>
<foundry:doc section="devel"> <foundry:doc section="devel" type="env-var">
<foundry:doc-desc> <foundry:doc-desc>
<p>
The context prefix in which CCM is installed. If CCM is installed into the ROOT context The context prefix in which CCM is installed. If CCM is installed into the ROOT context
of the servlet container, this variable will be empty. of the servlet container, this variable will be empty.
</p>
</foundry:doc-desc> </foundry:doc-desc>
</foundry:doc> </foundry:doc>
<xsl:param name="context-prefix"/> <xsl:param name="context-prefix"/>
<foundry:doc section="devel"> <foundry:doc section="devel" type="env-var">
<foundry:doc-desc> <foundry:doc-desc>
The path on which the CCM dispatcher Servlet is mounted. Usually this is <code>CCM</code> <p>
The path on which the CCM dispatcher Servlet is mounted. Usually this is
<code>CCM</code>.
</p>
</foundry:doc-desc> </foundry:doc-desc>
</foundry:doc> </foundry:doc>
<xsl:param name="dispatcher-prefix"/> <xsl:param name="dispatcher-prefix"/>
<foundry:doc section="devel" type="env-var">
<foundry:doc-desc>
<p>
The name of user currently login in CCM.
</p>
</foundry:doc-desc>
</foundry:doc>
<xsl:variable name="username"> <xsl:variable name="username">
<xsl:choose> <xsl:choose>
<xsl:when test="/bebop:page/ui:userBanner/@screenName"> <xsl:when test="/bebop:page/ui:userBanner/@screenName">
@ -107,16 +128,20 @@ processor, some are read from the configuration files of Foundry and some are de
<!-- System variables --> <!-- System variables -->
<foundry:doc section="devel"> <foundry:doc section="devel" type="env-var">
<foundry:doc-desc> <foundry:doc-desc>
This variables stores the XML created by CCM for later access. <p>
This variable stores the XML created by CCM for later access.
</p>
</foundry:doc-desc> </foundry:doc-desc>
</foundry:doc> </foundry:doc>
<xsl:variable name="data-tree" select="/bebop:page"/> <xsl:variable name="data-tree" select="/bebop:page"/>
<foundry:doc section="devel"> <foundry:doc section="devel">
<foundry:doc-desc> <foundry:doc-desc>
<p>
This variables stores the XML definition of the Foundry documentation. This variables stores the XML definition of the Foundry documentation.
</p>
</foundry:doc-desc> </foundry:doc-desc>
</foundry:doc> </foundry:doc>
<xsl:variable name="foundry-doc-tree" select="foundry:documentation"/> <xsl:variable name="foundry-doc-tree" select="foundry:documentation"/>
@ -126,14 +151,18 @@ processor, some are read from the configuration files of Foundry and some are de
<!-- Double click protection --> <!-- Double click protection -->
<foundry:doc section="devel"> <foundry:doc section="devel">
<foundry:doc-desc> <foundry:doc-desc>
<p>
Activate double click protection on buttons? Activate double click protection on buttons?
</p>
</foundry:doc-desc> </foundry:doc-desc>
</foundry:doc> </foundry:doc>
<xsl:param name="dcp-on-buttons"/> <xsl:param name="dcp-on-buttons"/>
<foundry:doc section="devel"> <foundry:doc section="devel">
<foundry:doc-desc> <foundry:doc-desc>
<p>
Activate double click protection on links? Activate double click protection on links?
</p>
</foundry:doc-desc> </foundry:doc-desc>
</foundry:doc> </foundry:doc>
<xsl:param name="dcp-on-links"/> <xsl:param name="dcp-on-links"/>
@ -142,6 +171,14 @@ processor, some are read from the configuration files of Foundry and some are de
<!-- Language related variables --> <!-- Language related variables -->
<foundry:doc section="devel" type="template-tag">
<foundry:doc-desc>
<p>
The language negotiated between CCM and the user agent.
</p>
</foundry:doc-desc>
</foundry:doc>
<foundry:doc section="devel"> <foundry:doc section="devel">
<foundry:doc-desc> <foundry:doc-desc>
The language to use as negotiated by CCM. The language to use as negotiated by CCM.
@ -164,8 +201,9 @@ processor, some are read from the configuration files of Foundry and some are de
</xsl:variable>--> </xsl:variable>-->
<foundry:doc section="devel"> <foundry:doc section="devel" type="env-var">
<foundry:doc-desc> <foundry:doc-desc>
<p>
The languages supported by this theme. They are configured in The languages supported by this theme. They are configured in
<code>conf/global.xml</code> using the <code>&lt;supported-languages&gt;</code> <code>conf/global.xml</code> using the <code>&lt;supported-languages&gt;</code>
element. Example for german and english: element. Example for german and english:
@ -180,15 +218,18 @@ processor, some are read from the configuration files of Foundry and some are de
&hellip; &hellip;
&lt;/foundry:configuration&gt; &lt;/foundry:configuration&gt;
</pre> </pre>
</p>
</foundry:doc-desc> </foundry:doc-desc>
</foundry:doc> </foundry:doc>
<xsl:variable name="supported-languages" <xsl:variable name="supported-languages"
select="document(foundry:gen-path('conf/global.xml'))/foundry:configuration/supported-languages"/> select="document(foundry:gen-path('conf/global.xml'))/foundry:configuration/supported-languages"/>
<foundry:doc section="devel"> <foundry:doc section="devel" type="template-tag">
<foundry:doc-desc> <foundry:doc-desc>
The language to use by theming engine for static texts etc. The language is determined <p>
The language to use by theme engine for static texts etc. The language is determined
as follows: as follows:
</p>
<ul> <ul>
<li>If the negotiated language is also in the <code>supported-languages</code></li> <li>If the negotiated language is also in the <code>supported-languages</code></li>
<li>If not the language which set by the default attribute of the <li>If not the language which set by the default attribute of the
@ -219,11 +260,13 @@ processor, some are read from the configuration files of Foundry and some are de
Variables describing the user agent. Variables describing the user agent.
ToDo: Check if we still need them. ToDo: Check if we still need them.
--> -->
<foundry:doc section="devel"> <!--<foundry:doc section="devel" type="evn-var">
<foundry:doc-desc> <foundry:doc-desc>
<p>
The name of the user agent (browser) which is used to access CCM. The name of the user agent (browser) which is used to access CCM.
</p>
</foundry:doc-desc> </foundry:doc-desc>
</foundry:doc> </foundry:doc>-->
<xsl:param name="user-agent"/> <xsl:param name="user-agent"/>
<xsl:variable name="mozilla-version"> <xsl:variable name="mozilla-version">

View File

@ -32,7 +32,7 @@
<!-- <!--
These tags are part of the documentation system of Foundry. Therefore there is no file These tags are part of the documentation system of Foundry. Therefore there is no file
description here. The documentation system, including the tags definied in this file description here. The documentation system, including the tags defined in this file
are described in the Developer Manual part in the documentation of Foundry. are described in the Developer Manual part in the documentation of Foundry.
--> -->
@ -403,6 +403,37 @@
<xsl:copy-of select="$attribute-desc"/> <xsl:copy-of select="$attribute-desc"/>
</xsl:template> </xsl:template>
<xsl:template match="foundry:doc[@type='env-var']" mode="doc">
<xsl:apply-templates select="document(foundry:gen-path('foundry/templates/doc/env-var-layout.xml'))">
<xsl:with-param name="name"
tunnel="yes">
<xsl:choose>
<xsl:when test="name(./following::*[1]) = 'xsl:variable'">
<xsl:value-of select="./following::xsl:variable[1]/@name"/>
</xsl:when>
<xsl:when test="name(./following::*[1]) = 'xsl:param'">
<xsl:value-of select="./following::xsl:param[1]/@name"/>
</xsl:when>
</xsl:choose>
</xsl:with-param>
<!-- select="./following::xsl:variable[1]/@name"/>-->
<xsl:with-param name="doc-desc" tunnel="yes" select="./foundry:doc-desc"/>
<xsl:with-param name="doc-see-also" tunnel="yes" select="./foundry:doc-see-also"/>
</xsl:apply-templates>
</xsl:template>
<xsl:template match="doc-env-var-name">
<xsl:param name="name" tunnel="yes"/>
<xsl:value-of select="$name"/>
</xsl:template>
<xsl:template match="doc-env-var-desc">
<xsl:param name="doc-desc" tunnel="yes"/>
<xsl:copy-of select="$doc-desc/*"/>
</xsl:template>
<xsl:template match="doc-see-also-link-list"> <xsl:template match="doc-see-also-link-list">
<xsl:param name="doc-see-also" tunnel="yes"/> <xsl:param name="doc-see-also" tunnel="yes"/>

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<doc-template-tag-layout>
<section class="template-tag">
<h1>
<doc-env-var-name/>
</h1>
<div>
<doc-env-var-desc/>
</div>
<doc-see-also-link-list>
<div>
<h2>See also</h2>
<ul>
<doc-see-also-link>
<li>
<a>
<doc-see-also-link-title/>
</a>
</li>
</doc-see-also-link>
</ul>
</div>
</doc-see-also-link-list>
</section>
</doc-template-tag-layout>