Syncing Foundry files

git-svn-id: https://svn.libreccm.org/ccm/trunk@2895 8810af33-2d31-482b-a856-94f89814c4df
master
jensp 2014-10-01 17:41:57 +00:00
parent 8f3b7e2d68
commit 6b2d6a22cd
18 changed files with 344 additions and 420 deletions

View File

@ -1,351 +1,43 @@
<!DOCTYPE HTML><html> <!DOCTYPE html
<head> SYSTEM "about:legacy-compat">
<META http-equiv="Content-Type" content="text/html; charset=UTF-8"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en" id="site">
<meta content="text/html; charset=UTF-8" http-equiv="content-type"> <head>
<title>Foundry Theming Engine for LibreCCM - Documentation</title> <meta name="generator" content=" "></meta>
<style type="text/css"> <title>
.missing-static-text { Foundry Documentation
border: 2px solid red;
color: red; </title>
font-weight: bold; <meta http-equiv="content-type" content="text/html;charset=utf-8"></meta>
} <link href="/home/jensp/pwi/libreccm/ccm/trunk/ccm-sci-bundle/web/themes/foundry/images/favicon.png" type="image/png" rel="shortcut icon"></link>
</style> </head>
</head> <body><span id="top"></span><a href="#startcontent" accesskey="S" class="nav-hide" title="">Skip navigation</a><nav>
<body> <ul class="chapter-list">
<header> <li class="chapter-entry"><a href="#overview" title="Overview">Overview</a><ul class="section-list">
Header <li class="section-entry"><a href="#overview" title="Overview">Overview</a></li>
</header> <li class="section-entry"><a href="#this-manual" title="This manual">This manual</a></li>
<nav> </ul>
Navigation </li>
</nav> <li class="chapter-entry"><a href="#user-manual" title="User Manual">User Manual</a><ul class="section-list">
<main> <li class="section-entry"><a href="#about-foundry" title="About Foundry">About Foundry</a></li>
<section id="overview"> <li class="section-entry"><a href="#layout-templates" title="Layout templates">Layout templates</a></li>
<h1>Overview</h1> <li class="section-entry"><a href="#css-files" title="CSS files">CSS files</a></li>
<p> <li class="section-entry"><a href="#template-tags-reference" title="Templates Tags Reference">Templates Tags Reference</a></li>
Placeholder </ul>
</p> </li>
</section> <li class="chapter-entry"><a href="#developer-manual" title="Developer Manual">Developer Manual</a><ul class="section-list">
<section id="user-manual"> <li class="section-entry"><a href="#foundry-structure" title="The structure of Foundry">The structure of Foundry</a></li>
<h1>User Manual</h1> <li class="section-entry"><a href="#coding-style" title="Coding style">Coding style</a></li>
<section id="user_about-foundry"> <li class="section-entry"><a href="#doc-system" title="The documentation system of Foundry">The documentation system of Foundry</a></li>
<h1>About Foundry</h1> <li class="section-entry"><a href="#function-reference" title="XSL Templates and Function references">XSL Templates and Function references</a></li>
<p> </ul>
Placeholder </li>
</p> </ul>
</section> </nav>
<section id="user/layout-templates"> <main id="startcontent">
<h1>Layout templates</h1> <h1>
<p> Foundry Documentation
Placeholder
</p> </h1>
</section> </main>
<section id="user/css-files"> </body>
<h1>CSS files</h1> </html>
<p>
Placeholder
</p>
</section>
<section id="lib/template-tags">
<h1>Templates Tags Reference</h1>
<h2>aside</h2>
<dl>
<dt>
Description
</dt>
<dd>
Generates a HTML5 <code>aside</code> element.
</dd>
<dt>See also</dt>
<dd>
<ul>
<li>
<a href="http://www.w3.org/TR/html5/sections.html#the-aside-element">http://www.w3.org/TR/html5/sections.html#the-aside-element</a>
</li>
</ul>
</dd>
</dl>
<h2>body</h2>
<dl>
<dt>
Description
</dt>
<dd>
Generates the HTML <code>body</code> element.
</dd>
<dt>See also</dt>
<dd>
<ul></ul>
</dd>
</dl>
<h2>div</h2>
<dl>
<dt>
Description
</dt>
<dd>
Generates a HTML <code>div</code> element.
</dd>
<dt>See also</dt>
<dd>
<ul></ul>
</dd>
</dl>
<h2>divIfNotEmpty</h2>
<dl>
<dt>
Description
</dt>
<dd>
Generates a HTML <code>div</code> element, but only if the content is not empty.
</dd>
<dt>See also</dt>
<dd>
<ul></ul>
</dd>
</dl>
<h2>footer</h2>
<dl>
<dt>
Description
</dt>
<dd>
Creates a HTML5 footer element.
</dd>
<dt>See also</dt>
<dd>
<ul></ul>
</dd>
</dl>
<h2>head</h2>
<dl>
<dt>
Description
</dt>
<dd>
Creates the HTML <code>head</code> element which may contain meta data and stylesheets
etc. It also generates some meta data like the generator meta information or the
language meta information.
</dd>
<dt>See also</dt>
<dd>
<ul></ul>
</dd>
</dl>
<h2>header</h2>
<dl>
<dt>
Description
</dt>
<dd>
Generates a HTML5 <code>header</code> element.
</dd>
<dt>See also</dt>
<dd>
<ul></ul>
</dd>
</dl>
<h2>main</h2>
<dl>
<dt>
Description
</dt>
<dd>
Generates a HTML5 <code>main</code> element.
</dd>
<dt>See also</dt>
<dd>
<ul></ul>
</dd>
</dl>
<h2>meta</h2>
<dl>
<dt>
Description
</dt>
<dd>
Generates a meta data field in in the <code>head</code> element.
</dd>
<dt>See also</dt>
<dd>
<ul></ul>
</dd>
</dl>
<h2>nav</h2>
<dl>
<dt>
Description
</dt>
<dd>
Generates a HTML5 <code>nav</code> element.
</dd>
<dt>See also</dt>
<dd>
<ul></ul>
</dd>
</dl>
<h2>script</h2>
<dl>
<dt>
Attributes
</dt>
<dd>
<dl>
<dt>
<code>absolute</code>
</dt>
<dd>
If set to <code>true</code> the path in the <code>src</code> is used as it is.
</dd>
<dt>
<code>src</code>
</dt>
<dd>
The path of the script to include. If the <code>absolute&gt;</code> attribute is not
set (or not set to <code>true</code> the path is interpreted relative to the
theme directory. For example the path of a script included using
<pre>
&lt;script type="text/javascript" src="scripts/example.js"/&gt;
</pre>
in the a theme named <code>my-theme</code> at the server
<code>http://www.example.org</code> is altered to the absolute path
<code>http://www.example.org/themes/published-themedir/itb/scripts/example.js</code>.
If the <code>absolute</code> attribute is set to <code>true</code> the path is not
altered. One usecase for an absolute path is to load an script from a content delivery
network.
</dd>
<dt>
<code>type</code>
</dt>
<dd>
The type of the script. Usally this is <code>text/javascript</code>. If the attribute
is not set in the layout template, it is automatically set to
<code>text/javascript</code>.
</dd>
</dl>
</dd>
<dt>
Description
</dt>
<dd>
Used to include a script (usally a JavaScript). The script is either provided
a content of the element or as an external file. Embedded scripts should only be used
for small parts of code, like the code for activating jQuery plugins for some elements.
Everything which is longer than five or six lines should be put into a external file
in the scripts directory of the theme.
</dd>
<dt>See also</dt>
<dd>
<ul></ul>
</dd>
</dl>
<h2>section</h2>
<dl>
<dt>
Description
</dt>
<dd>
Generates a HTML5 <code>section</code> element.
</dd>
<dt>See also</dt>
<dd>
<ul></ul>
</dd>
</dl>
<h2>span</h2>
<dl>
<dt>
Description
</dt>
<dd>
Generates a <code>span</code> element.
</dd>
<dt>See also</dt>
<dd>
<ul></ul>
</dd>
</dl>
<h2>title</h2>
<dl>
<dt>
Description
</dt>
<dd>
Generates the title in the HTML head.
</dd>
<dt>See also</dt>
<dd>
<ul></ul>
</dd>
</dl>
</section>
</section>
<section id="developer-manual">
<h1>Developer Manual</h1>
<section id="devel/foundry-structure">
<h1>The overall structure of foundry</h1>
<p>
Placeholder
</p>
</section>
<section id="devel/coding-style">
<h1>Foundry Coding Style</h1>
<p>
This document describes the coding conventions for the Foundry theming engine.
</p>
<h2>Naming</h2>
<p>
The naming rules described here apply to all names: Names of layout elements,
XSL template names, EXSLT functions, files, ids and classes (in the
<code>class</code> attribute).
</p>
<p>
Use the dash "-" to separate parts of a name instead of camel case or the
underscore. For example: <code>get-setting</code> instead of <code>getSetting</code> or
<code>set_setting</code>.
</p>
<p>
Names should be lowercase.
</p>
<h2>Namespace declarations</h2>
<p>
In the XSL files, XML namespaces are only defined at the
<code>&lt;xsl:stylesheet&gt;</code> element. The XSL namespace is the first one is
declared first. The other namespace follow in alphabetic order (ordered by their
prefix).
</p>
<h2>Indention, line length and formating</h2>
<p>
Indention is done using spaces. Indention depth is four (4) spaces per level.
</p>
<p>
Try to keep the line length below 100 characters per line. Because of some restrictions
of XML this will be possible in every case.
</p>
<p>
Insert a line break after each attribute of an XML element. The first attribute
is on the same line as the element. For example write
</p>
<pre>
&lt;xsl:param name=example-param"
select="'example'"/&gt;
</pre>
<p>
instead of
</p>
<pre>
&lt;xsl:param name=example-param" select="'example'"/&gt;
</pre>
</section>
<section id="devel/foundry-doc-system">
<h1>The documentation system of Foundry</h1>
<p>
Placeholder
</p>
</section>
</section>
</main>
<footer>
Footer
</footer>
</body>
</html>

View File

@ -2,24 +2,42 @@
<foundry:documentation xmlns:foundry="http://foundry.libreccm.org"> <foundry:documentation xmlns:foundry="http://foundry.libreccm.org">
<foundry:doc-chapter id="overview" <foundry:doc-chapter id="overview"
title="Overview"> title="Overview">
<foundry:doc-static-text href="overview-foundry"/> <foundry:doc-section id="overview"
<foundry:doc-static-text href="this-manual"/> title="Overview"
static="overview-foundry.html"/>
<foundry:doc-section id="this-manual"
title="This manual"
static="this-manual.html"/>
</foundry:doc-chapter> </foundry:doc-chapter>
<foundry:doc-chapter id="user-manual" <foundry:doc-chapter id="user-manual"
title="User Manual"> title="User Manual">
<foundry:doc-static-text href="user/about-foundry"/> <foundry:doc-section id="about-foundry"
<foundry:doc-static-text href="user/layout-templates"/> title="About Foundry"
<foundry:doc-static-text href="user/css-files"/> static="user/about-foundry.html"/>
<foundry:doc-generated title="Templates Tags Reference" <foundry:doc-section id="layout-templates"
section="user"/> title="Layout templates"
static="user/layout-templates.html"/>
<foundry:doc-section id="css-files"
title="CSS files"
static="user/css-files.html"/>
<foundry:doc-section id="template-tags-reference"
title="Templates Tags Reference"
generate="user"/>
</foundry:doc-chapter> </foundry:doc-chapter>
<foundry:doc-chapter id="developer-manual" <foundry:doc-chapter id="developer-manual"
title="Developer Manual"> title="Developer Manual">
<foundry:doc-static-text href="devel/foundry-structure"/> <foundry:doc-section id="foundry-structure"
<foundry:doc-static-text href="devel/coding-style"/> title="The structure of Foundry"
<foundry:doc-static-text href="devel/foundry-doc-system"/> static="devel/foundry-structure.html"/>
<foundry:doc-generated title="XSL Templates and Function references" <foundry:doc-section id="coding-style"
href="devel"/> title="Coding style"
static="devel/coding-style.html"/>
<foundry:doc-section id="doc-system"
title="The documentation system of Foundry"
static="devel/foundry-doc-system.html"/>
<foundry:doc-section id="function-reference"
title="XSL Templates and Function references"
generate="devel"/>
</foundry:doc-chapter> </foundry:doc-chapter>
</foundry:documentation> </foundry:documentation>

View File

@ -20,7 +20,8 @@
--> -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0"> exclude-result-prefixes="xsl"
version="2.0">
<xsl:import href="lib/global-vars.xsl"/> <xsl:import href="lib/global-vars.xsl"/>
<xsl:import href="lib/template-parser.xsl"/> <xsl:import href="lib/template-parser.xsl"/>

View File

@ -31,6 +31,7 @@ processor, some are read from the configuration files of Foundry and some are de
xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
xmlns:foundry="http://foundry.libreccm.org" xmlns:foundry="http://foundry.libreccm.org"
xmlns:ui="http://www.arsdigita.com/ui/1.0" xmlns:ui="http://www.arsdigita.com/ui/1.0"
exclude-result-prefixes="xsl bebop foundry ui"
version="2.0"> version="2.0">
<!-- Foundry internal variables --> <!-- Foundry internal variables -->
@ -85,6 +86,13 @@ processor, some are read from the configuration files of Foundry and some are de
</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-desc>
This variables stores the XML definition of the Foundry documentation.
</foundry:doc-desc>
</foundry:doc>
<xsl:variable name="foundry-doc-tree" select="foundry:documentation"/>
<!-- **************************************************************************** --> <!-- **************************************************************************** -->
<!-- Double click protection --> <!-- Double click protection -->
@ -111,11 +119,11 @@ processor, some are read from the configuration files of Foundry and some are de
The language to use as negotiated by CCM. The language to use as negotiated by CCM.
</foundry:doc-desc> </foundry:doc-desc>
</foundry:doc> </foundry:doc>
<xsl:param name="negotiated-language"/> <xsl:param name="negotiated-language" select="'en'"/>
<!-- Temporary workaround until https://redmine.libreccm.org/issues/2186 is decided --> <!-- Temporary workaround until https://redmine.libreccm.org/issues/2186 is decided -->
<xsl:variable name="lang"> <xsl:variable name="lang">
<xsl:value-of select="negoitated-language"/> <xsl:value-of select="$negotiated-language"/>
</xsl:variable> </xsl:variable>
<!--<foundry:doc section="devel"> <!--<foundry:doc section="devel">

View File

@ -28,7 +28,7 @@
xmlns:foundry="http://foundry.libreccm.org" xmlns:foundry="http://foundry.libreccm.org"
xmlns:nav="http://ccm.redhat.com/navigation" xmlns:nav="http://ccm.redhat.com/navigation"
xmlns:ui="http://www.arsdigita.com/ui/1.0" xmlns:ui="http://www.arsdigita.com/ui/1.0"
exclude-result-prefixes="xsl bebop cms nav ui" exclude-result-prefixes="xsl xs bebop cms foundry nav ui"
version="2.0"> version="2.0">
<foundry:doc section="user"> <foundry:doc section="user">

View File

@ -20,9 +20,11 @@
--> -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
exclude-result-prefixes="xsl"
version="2.0"> version="2.0">
<xsl:import href="template-tags/data-tags.xsl"/> <xsl:import href="template-tags/data-tags.xsl"/>
<xsl:import href="template-tags/foundry-doc-tags.xsl"/>
<xsl:import href="template-tags/html-tags.xsl"/> <xsl:import href="template-tags/html-tags.xsl"/>
<xsl:import href="template-tags/loaders.xsl"/> <xsl:import href="template-tags/loaders.xsl"/>
<xsl:import href="template-tags/navigation.xsl"/> <xsl:import href="template-tags/navigation.xsl"/>

View File

@ -21,6 +21,7 @@
<!-- This file contains several template tags which output data from the result tree --> <!-- This file contains several template tags which output data from the result tree -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:foundry="http://foundry.libreccm.org" xmlns:foundry="http://foundry.libreccm.org"
exclude-result-prefixes="xsl foundry"
version="2.0"> version="2.0">
<foundry:doc section="user" <foundry:doc section="user"

View File

@ -0,0 +1,77 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE stylesheet [<!ENTITY nbsp '&#160;'>
<!ENTITY shy '&#173;'>]>
<!--
Copyright 2014 Jens Pelzetter for the LibreCCM Foundation
This file is part of the Foundry Theme Engine for LibreCCM
Foundry is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.
Foundry is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Foundry If not, see <http://www.gnu.org/licenses/>.
-->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
xmlns:foundry="http://foundry.libreccm.org"
xmlns:ui="http://www.arsdigita.com/ui/1.0"
exclude-result-prefixes="xsl bebop foundry ui"
version="2.0">
<xsl:template match="doc-chapter-list">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="doc-chapter-entry">
<xsl:variable name="doc-chapter-entry-tree" select="./*"/>
<xsl:for-each select="$foundry-doc-tree/foundry:doc-chapter">
<xsl:apply-templates select="$doc-chapter-entry-tree">
<xsl:with-param name="href" tunnel="yes" select="concat('#', ./@id)"/>
<xsl:with-param name="title" tunnel="yes" select="./@title"/>
<xsl:with-param name="doc-sections"
tunnel="yes"
select="./foundry:doc-section"/>
</xsl:apply-templates>
</xsl:for-each>
</xsl:template>
<xsl:template match="doc-chapter-title">
<xsl:param name="title" tunnel="yes" select="''"/>
<xsl:value-of select="$title"/>
</xsl:template>
<xsl:template match="doc-section-list">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="doc-section-entry">
<xsl:param name="doc-sections" tunnel="yes"/>
<xsl:variable name="doc-section-entry-tree" select="./*"/>
<xsl:for-each select="$doc-sections">
<xsl:apply-templates select="$doc-section-entry-tree">
<xsl:with-param name="href" tunnel="yes" select="concat('#', ./@id)"/>
<xsl:with-param name="title" tunnel="yes" select="./@title"/>
</xsl:apply-templates>
</xsl:for-each>
</xsl:template>
<xsl:template match="doc-section-title">
<xsl:param name="title" tunnel="yes" select="''"/>
<xsl:value-of select="$title"/>
</xsl:template>
</xsl:stylesheet>

View File

@ -24,6 +24,7 @@
xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
xmlns:foundry="http://foundry.libreccm.org" xmlns:foundry="http://foundry.libreccm.org"
xmlns:ui="http://www.arsdigita.com/ui/1.0" xmlns:ui="http://www.arsdigita.com/ui/1.0"
xmlns="http://www.w3.org/1999/xhtml"
exclude-result-prefixes="xsl bebop foundry ui" exclude-result-prefixes="xsl bebop foundry ui"
version="2.0"> version="2.0">
@ -264,7 +265,7 @@
</meta> </meta>
<!-- These meta informations are needed to get Level 3 WAI --> <!-- These meta informations are needed to get Level 3 WAI -->
<meta name="language" content="{$language}"/> <!--<meta http-equiv="content-language" content="{$language}"/>-->
<!-- ToDo <!-- ToDo
<meta name="keywords"> <meta name="keywords">
<xsl:attribute name="content"> <xsl:attribute name="content">
@ -550,15 +551,22 @@
</foundry:doc> </foundry:doc>
<xsl:template match="title"> <xsl:template match="title">
<title> <title>
<xsl:for-each select="show-text | show-page-title"> <xsl:choose>
<xsl:apply-templates select="."/> <xsl:when test="./show-text | ./show-page-title">
<xsl:if test="position() != last()"> <xsl:for-each select="show-text | show-page-title">
<xsl:value-of select="foundry:get-setting('layout-parser', <xsl:apply-templates select="."/>
<xsl:if test="position() != last()">
<xsl:value-of select="foundry:get-setting('layout-parser',
'title/separator', 'title/separator',
' - ', ' - ',
../separator)"/> ../separator)"/>
</xsl:if> </xsl:if>
</xsl:for-each> </xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="current()"/>
</xsl:otherwise>
</xsl:choose>
</title> </title>
</xsl:template> </xsl:template>

View File

@ -25,6 +25,7 @@
xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
xmlns:foundry="http://foundry.libreccm.org" xmlns:foundry="http://foundry.libreccm.org"
xmlns:ui="http://www.arsdigita.com/ui/1.0" xmlns:ui="http://www.arsdigita.com/ui/1.0"
exclude-result-prefixes="xsl bebop foundry ui"
version="2.0"> version="2.0">
<foundry:doc section="user" <foundry:doc section="user"

View File

@ -31,7 +31,8 @@ XSLT 2.0 functions.
xmlns:cms="http://www.arsdigita.com/cms/1.0" xmlns:cms="http://www.arsdigita.com/cms/1.0"
xmlns:foundry="http://foundry.libreccm.org" xmlns:foundry="http://foundry.libreccm.org"
xmlns:nav="http://ccm.redhat.com/navigation" xmlns:nav="http://ccm.redhat.com/navigation"
version="1.0"> exclude-result-prefixes="xsl xs bebop cms foundry nav"
version="2.0">
<foundry:doc section="devel"> <foundry:doc section="devel">
@ -393,6 +394,10 @@ XSLT 2.0 functions.
<xsl:param name="module" as="xs:string"/> <xsl:param name="module" as="xs:string"/>
<xsl:param name="id" as="xs:string"/> <xsl:param name="id" as="xs:string"/>
<xsl:message>
<xsl:value-of select="foundry:message-info('get-static-text(string, string) called...')"/>
</xsl:message>
<xsl:sequence select="foundry:get-static-text($module, $id, true(), $lang)"/> <xsl:sequence select="foundry:get-static-text($module, $id, true(), $lang)"/>
</xsl:function> </xsl:function>
@ -443,39 +448,63 @@ XSLT 2.0 functions.
<xsl:param name="html" as="xs:boolean"/> <xsl:param name="html" as="xs:boolean"/>
<xsl:param name="lang" as="xs:string"/> <xsl:param name="lang" as="xs:string"/>
<xsl:message>
<xsl:value-of select="foundry:message-info('get-static-text(string, string, boolean, string) called')"/>
</xsl:message>
<xsl:message>
<xsl:value-of select="foundry:message-info(concat('Trying to get ', $theme-prefix, '/texts/', $module ,'.xml/foundry:static-texts/text[@id=', $id, ']/translation[@lang = ', $lang, ']'))"/>
</xsl:message>
<xsl:choose> <xsl:choose>
<xsl:when test="$module = '' and document(concat($theme-prefix, '/texts/global.xml'))/foundry:static-texts/text[@id=$id]/translation[@lang = $lang]"> <xsl:when test="$module = '' and document(concat($theme-prefix, '/texts/global.xml'))/foundry:static-texts/text[@id=$id]/translation[@lang=$lang]">
<xsl:sequence select="document(concat($theme-prefix, '/texts/global.xml'))/foundry:static-texts/text[@id=$id]"/> <xsl:message>
<xsl:value-of select="'using global.xml for texts...'"/>
</xsl:message>
<xsl:sequence select="document(concat($theme-prefix, '/texts/global.xml'))/foundry:static-texts/text[@id=$id]/translation[@lang=$lang]"/>
</xsl:when> </xsl:when>
<xsl:when test="not($module = '') and document(concat($theme-prefix, '/texts/', $module, '.xml'))/foundry:static-texts/text[@id=$id]/translation[@lang = $lang]"> <xsl:when test="not($module = '') and document(concat($theme-prefix, '/texts/', $module, '.xml'))/foundry:static-texts/text[@id=$id]/translation[@lang=$lang]">
<xsl:sequence select="document(concat($theme-prefix, '/texts/', $module, '.xml'))/foundry:static-texts/text[@id=$id]/translation[@lang = $lang]"/> <xsl:sequence select="document(concat($theme-prefix, '/texts/', $module, '.xml'))/foundry:static-texts/text[@id=$id]/translation[@lang=$lang]"/>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:message>
<xsl:value-of select="foundry:message-info('get-static-text otherwise')"/>
</xsl:message>
<xsl:choose> <xsl:choose>
<xsl:when test="foundry:debug-enabled()"> <xsl:when test="foundry:debug-enabled()">
<xsl:choose> <xsl:choose>
<xsl:when test="$html"> <xsl:when test="$html">
<span class="foundry-debug-missing-translation"> <xsl:message>
<span class="foundry-placeholder"> <xsl:value-of select="'Otherwise w/ html'"/>
<xsl:sequence select="$id"/> </xsl:message>
<span class="foundry-debug-missing-translation">
<span class="foundry-placeholder">
<xsl:value-of select="$id"/>
</span>
<span class="foundry-missing-translation-path">
<xsl:choose>
<xsl:when test="$module = ''">
<xsl:value-of select="document(concat($theme-prefix, '/texts/global.xml'))/foundry:static-texts/text[@id=$id]/translation[@lang=$lang]"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="document(concat($theme-prefix, '/texts/', $module, '.xml'))/foundry:static-texts/text[@id=$id]/translation[@lang=$lang]"/>
</xsl:otherwise>
</xsl:choose>
</span>
</span> </span>
<span class="foundry-missing-translation-path">
<xsl:choose>
<xsl:when test="$module = ''">
<xsl:sequence select="document(concat($theme-prefix, '/texts/global.xml'))/foundry:static-texts/text[@id=$id]/translation[@lang=$lang]"/>
</xsl:when>
<xsl:otherwise>
<xsl:sequence select="document(concat($theme-prefix, '/texts/', $module, '.xml'))/foundry:static-texts/text[@id=$id]/translation[@lang=$lang]"/>
</xsl:otherwise>
</xsl:choose>
</span>
</span>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:message>
<xsl:value-of select="'Otherwise w/o html'"/>
</xsl:message>
<xsl:sequence select="$id"/> <xsl:sequence select="$id"/>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</xsl:when> </xsl:when>
<xsl:otherwise>
<xsl:sequence select="''"/>
</xsl:otherwise>
</xsl:choose> </xsl:choose>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
@ -546,11 +575,11 @@ XSLT 2.0 functions.
<xsl:choose> <xsl:choose>
<!-- Glossary --> <!-- Glossary -->
<xsl:when test="$data-tree//cms:contentPanel/cms:item/type/label = 'Glossary Item'"> <xsl:when test="$data-tree//cms:contentPanel/cms:item/type/label = 'Glossary Item'">
<xsl:sequence select="foundry:get-static-text('layout/page/title/glossary')"/> <xsl:sequence select="foundry:get-static-text('', 'layout/page/title/glossary')"/>
</xsl:when> </xsl:when>
<!-- FAQ --> <!-- FAQ -->
<xsl:when test="$data-tree//cms:contentPanel/cms:item/type/label = 'FAQ Item'"> <xsl:when test="$data-tree//cms:contentPanel/cms:item/type/label = 'FAQ Item'">
<xsl:sequence select="foundry:get-static-text('layout/page/title/faq')"/> <xsl:sequence select="foundry:get-static-text('', 'layout/page/title/faq')"/>
</xsl:when> </xsl:when>
<!-- Else use title of CI --> <!-- Else use title of CI -->
<xsl:otherwise> <xsl:otherwise>
@ -558,36 +587,50 @@ XSLT 2.0 functions.
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</xsl:when> </xsl:when>
<!-- Localized title for A-Z list --> <!-- Localised title for A-Z list -->
<xsl:when test="$data-tree/bebop:title = 'AtoZ'"> <xsl:when test="$data-tree/bebop:title = 'AtoZ'">
<xsl:sequence select="foundry:get-static-text('layout/page/title/atoz')"/> <xsl:sequence select="foundry:get-static-text('', 'layout/page/title/atoz')"/>
</xsl:when> </xsl:when>
<!-- Localized title for search --> <!-- Localised title for search -->
<xsl:when test="$data-tree/bebop:title = 'Search'"> <xsl:when test="$data-tree/bebop:title = 'Search'">
<xsl:sequence select="foundry:get-static-text('layout/page/title/search')"/> <xsl:sequence select="foundry:get-static-text('', 'layout/page/title/search')"/>
</xsl:when> </xsl:when>
<!-- Localized title for log in --> <!-- Localised title for log in -->
<xsl:when test="$data-tree/@application = 'login'"> <xsl:when test="$data-tree/@application = 'login'">
<xsl:sequence select="foundry:get-static-text('layout/page/title/login')"/> <xsl:sequence select="foundry:get-static-text('', 'layout/page/title/login')"/>
</xsl:when> </xsl:when>
<!-- Localited title for sitemap --> <!-- Localised title for sitemap -->
<xsl:when test="$data-tree/@id = 'sitemapPage'"> <xsl:when test="$data-tree/@id = 'sitemapPage'">
<xsl:sequence select="foundry:get-static-text('layout/page/title/sitemap')"/> <xsl:sequence select="foundry:get-static-text('', 'layout/page/title/sitemap')"/>
</xsl:when> </xsl:when>
<!-- Title for content section--> <!-- Title for content section-->
<xsl:otherwise> <xsl:otherwise>
<xsl:for-each select="$data-tree/nav:categoryMenu//nav:category[@isSelected='true']"> <xsl:choose>
<xsl:choose> <xsl:when test="$data-tree/nav:categoryMenu//nav:category[@isSelected='true']">
<!-- Special rule: Use content item title für root-page in navigation --> <xsl:for-each select="$data-tree/nav:categoryMenu//nav:category[@isSelected='true']">
<xsl:when test="position() = last() and position() = 1"> <xsl:choose>
<xsl:sequence select="foundry:shying(/bebop:page//title)"/> <!-- Special rule: Use content item title for root-page in navigation -->
</xsl:when> <xsl:when test="position() = last() and position() = 1">
<!-- Else use the name of the category --> <xsl:choose>
<xsl:when test="position() = last()"> <xsl:when test="/bebop:page//title">
<xsl:sequence select="foundry:shying(./@title)"/> <xsl:sequence select="foundry:shying(/bebop:page//title)"/>
</xsl:when> </xsl:when>
</xsl:choose> <xsl:otherwise>
</xsl:for-each> <xsl:sequence select="''"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
<!-- Else use the name of the category -->
<xsl:when test="position() = last()">
<xsl:sequence select="foundry:shying(./@title)"/>
</xsl:when>
</xsl:choose>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:sequence select="''"/>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</xsl:function> </xsl:function>

View File

@ -24,7 +24,8 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:foundry="http://foundry.libreccm.org" xmlns:foundry="http://foundry.libreccm.org"
xmlns:bebop="http://www.arsdigita.com/bebop/1.0" xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
version="1.0"> exclude-result-prefixes="xsl foundry bebop"
version="2.0">
<xsl:import href="lib.xsl"/> <xsl:import href="lib.xsl"/>
<xsl:import href="../doc/xsl/foundry-documentation.xsl"/> <xsl:import href="../doc/xsl/foundry-documentation.xsl"/>
@ -82,7 +83,7 @@
</foundry:doc-desc> </foundry:doc-desc>
</foundry:doc> </foundry:doc>
<xsl:template match="/foundry:documentation"> <xsl:template match="/foundry:documentation">
<html> <!--<html>
<head> <head>
<meta http-equiv="content-type" <meta http-equiv="content-type"
content="text/html; charset=UTF-8"/> content="text/html; charset=UTF-8"/>
@ -109,7 +110,9 @@
Footer Footer
</footer> </footer>
</body> </body>
</html> </html>-->
<xsl:apply-templates select="document(concat($theme-prefix, '/foundry/templates/doc/foundry-documentation.xml'))"/>
</xsl:template> </xsl:template>
</xsl:stylesheet> </xsl:stylesheet>

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<doc-chapter-layout>
<article>
<h1>
<doc-chapter-title/>
</h1>
<doc-sections/>
</article>
</doc-chapter-layout>

View File

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<doc-section-layout>
<section>
<h1>
<doc-section-title/>
</h1>
<doc-section-content/>
</section>
</doc-section-layout>

View File

@ -0,0 +1,41 @@
<?xml version="1.0" encoding="UTF-8"?>
<page-layout>
<head>
<title>
Foundry Documentation
</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8"/>
</head>
<body>
<nav>
<doc-chapter-list>
<ul class="chapter-list">
<doc-chapter-entry>
<li class="chapter-entry">
<a>
<doc-chapter-title/>
</a>
<doc-section-list>
<ul class="section-list">
<doc-section-entry>
<li class="section-entry">
<a>
<doc-section-title/>
</a>
</li>
</doc-section-entry>
</ul>
</doc-section-list>
</li>
</doc-chapter-entry>
</ul>
</doc-chapter-list>
</nav>
<main id="startcontent">
<h1>
Foundry Documentation
</h1>
<doc-chapters/>
</main>
</body>
</page-layout>

View File

@ -30,7 +30,7 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:foundry="http://foundry.libreccm.org" xmlns:foundry="http://foundry.libreccm.org"
version="1.0"> version="2.0">
<!-- Import the Foundry main templates all other things are defined there --> <!-- Import the Foundry main templates all other things are defined there -->
<xsl:import href="foundry/main.xsl"/> <xsl:import href="foundry/main.xsl"/>

View File

@ -14,6 +14,7 @@
<navigation-title/> <navigation-title/>
</a> </a>
</navigation-home-link> </navigation-home-link>
<h1><show-text>layout/page/head/title</show-text></h1>
<navigation> <navigation>
<div class="nav-wrapper"> <div class="nav-wrapper">
<navigation-links> <navigation-links>

View File

@ -1,7 +1,13 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8" ?>
<foundry:static-texts xmlns:foundry="http://foundry.libreccm.org"> <foundry:static-texts xmlns:foundry="http://foundry.libreccm.org">
<text id="layout/page/head/title"> <text id="layout/page/head/title">
<translation lang="de">Foundry</translation> <translation lang="de">Foundry</translation>
<translation lang="en">Foundry</translation> <translation lang="en">Foundry</translation>
</text> </text>
<text id="layout/page/skipnav/link">
<translation lang="de">Navigation überspringen</translation>
<translation lang="en">Skip navigation</translation>
</text>
</foundry:static-texts> </foundry:static-texts>