Current status of Foundry
git-svn-id: https://svn.libreccm.org/ccm/trunk@2870 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
27a4153e84
commit
c94a9f8a2a
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<foundry:configuration xmlns:foundry="http://foundry.libreccm.org">
|
||||||
|
|
||||||
|
<supported-languages default="de">
|
||||||
|
<language locale="de"/>
|
||||||
|
<language locale="en"/>
|
||||||
|
</supported-languages>
|
||||||
|
|
||||||
|
</foundry:configuration>
|
||||||
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<applications>
|
||||||
|
<default>default-layout.xml</default>
|
||||||
|
</applications>
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!DOCTYPE stylesheet>
|
<!DOCTYPE stylesheet>
|
||||||
<!--
|
<!--
|
||||||
Copyright 2014 Jens Pelzetter for the LibreCCM Foundation
|
Copyright 2014 Jens Pelzetter for the LibreCCM Foundation
|
||||||
|
|
|
||||||
|
|
@ -54,10 +54,10 @@ processor, some are read from the configuration files of Foundry and some are de
|
||||||
<xsl:param name="theme-prefix"/>
|
<xsl:param name="theme-prefix"/>
|
||||||
|
|
||||||
<foundry:doc section="devel">
|
<foundry:doc section="devel">
|
||||||
<foundry:doc-dec>
|
<foundry:doc-desc>
|
||||||
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.
|
||||||
</foundry:doc-dec>
|
</foundry:doc-desc>
|
||||||
</foundry:doc>
|
</foundry:doc>
|
||||||
<xsl:param name="context-prefix"/>
|
<xsl:param name="context-prefix"/>
|
||||||
|
|
||||||
|
|
@ -113,6 +113,11 @@ processor, some are read from the configuration files of Foundry and some are de
|
||||||
</foundry:doc>
|
</foundry:doc>
|
||||||
<xsl:param name="negotiated-language"/>
|
<xsl:param name="negotiated-language"/>
|
||||||
|
|
||||||
|
<!-- Temporary workaround until https://redmine.libreccm.org/issues/2186 is decided -->
|
||||||
|
<xsl:variable name="lang">
|
||||||
|
<xsl:value-of select="negoitated-language"/>
|
||||||
|
</xsl:variable>
|
||||||
|
|
||||||
<!--<foundry:doc section="devel">
|
<!--<foundry:doc section="devel">
|
||||||
<foundry:doc-desc>
|
<foundry:doc-desc>
|
||||||
The languages supported by this theme. Set in the <code>global.xml</code> configuration
|
The languages supported by this theme. Set in the <code>global.xml</code> configuration
|
||||||
|
|
@ -126,23 +131,23 @@ processor, some are read from the configuration files of Foundry and some are de
|
||||||
<foundry:doc section="devel">
|
<foundry:doc section="devel">
|
||||||
<foundry:doc-desc>
|
<foundry:doc-desc>
|
||||||
The languages supported by this theme. They are configured in
|
The languages supported by this theme. They are configured in
|
||||||
<code>settings/global.xml</code> using the <code><supported-languages></code>
|
<code>conf/global.xml</code> using the <code><supported-languages></code>
|
||||||
element. Example for german and english:
|
element. Example for german and english:
|
||||||
<pre>
|
<pre>
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<settings>
|
<foundry:configuration>
|
||||||
…
|
…
|
||||||
<supported-languages default="de">
|
<supported-languages default="de">
|
||||||
<language locale=de">
|
<language locale=de">
|
||||||
<language locale=en">
|
<language locale=en">
|
||||||
</supported-languages>
|
</supported-languages>
|
||||||
…
|
…
|
||||||
</settings>
|
</foundry:configuration>
|
||||||
</pre>
|
</pre>
|
||||||
</foundry:doc-desc>
|
</foundry:doc-desc>
|
||||||
</foundry:doc>
|
</foundry:doc>
|
||||||
<xsl:variable name="supported-languages"
|
<xsl:variable name="supported-languages"
|
||||||
select="document(concat($theme-prefix, 'settings/global.xml'))/settings/supported-languages"/>
|
select="document(concat($theme-prefix, '/conf/global.xml'))/foundry:configuration/supported-languages"/>
|
||||||
|
|
||||||
<foundry:doc section="devel">
|
<foundry:doc section="devel">
|
||||||
<foundry:doc-desc>
|
<foundry:doc-desc>
|
||||||
|
|
|
||||||
|
|
@ -23,8 +23,10 @@
|
||||||
|
|
||||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
|
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
|
||||||
|
xmlns:cms="http://www.arsdigita.com/cms/1.0"
|
||||||
xmlns:foundry="http://foundry.libreccm.org"
|
xmlns:foundry="http://foundry.libreccm.org"
|
||||||
xslns:func="http://exslt.org/functions"
|
xmlns:func="http://exslt.org/functions"
|
||||||
|
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"
|
||||||
version="1.0">
|
version="1.0">
|
||||||
|
|
||||||
|
|
@ -193,7 +195,7 @@
|
||||||
on a HTML element.
|
on a HTML element.
|
||||||
</foundry:doc-desc>
|
</foundry:doc-desc>
|
||||||
</foundry:doc>
|
</foundry:doc>
|
||||||
<xsl:template name="mandalay:set-id-and-class">
|
<xsl:template name="foundry:set-id-and-class">
|
||||||
<xsl:param name="current-layout-node" select="."/>
|
<xsl:param name="current-layout-node" select="."/>
|
||||||
|
|
||||||
<xsl:variable name="cond-class">
|
<xsl:variable name="cond-class">
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!DOCTYPE stylesheet>
|
<!DOCTYPE stylesheet>
|
||||||
<!--
|
<!--
|
||||||
Copyright 2014 Jens Pelzetter for the LibreCCM Foundation
|
Copyright 2014 Jens Pelzetter for the LibreCCM Foundation
|
||||||
|
|
@ -22,7 +22,10 @@
|
||||||
<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">
|
version="1.0">
|
||||||
|
|
||||||
|
<xsl:import href="template-tags/data-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/subsite.xsl"/>
|
||||||
|
|
||||||
</xsl:stylesheet>
|
</xsl:stylesheet>
|
||||||
|
|
@ -21,20 +21,20 @@
|
||||||
<!-- 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"
|
||||||
xslns:func="http://exslt.org/functions"
|
xmlns:func="http://exslt.org/functions"
|
||||||
version="1.0">
|
version="1.0">
|
||||||
|
|
||||||
|
<foundry:doc section="user"
|
||||||
|
type="template-tag">
|
||||||
|
<foundry:doc-desc>
|
||||||
|
Outputs the title of the current page. For a content item, this is
|
||||||
|
the title of the content item. For more details please refer to
|
||||||
|
the documentation of the <code>foundry:title</code> function.
|
||||||
|
</foundry:doc-desc>
|
||||||
|
<foundry:doc-see-also>#foundry:title</foundry:doc-see-also>
|
||||||
|
</foundry:doc>
|
||||||
<xsl:template match="show-page-title">
|
<xsl:template match="show-page-title">
|
||||||
<xsl:choose>
|
|
||||||
<xsl:when test="name(./..) = 'title'">
|
|
||||||
<xsl:value-of select="foundry:title()"/>
|
<xsl:value-of select="foundry:title()"/>
|
||||||
</xsl:when>
|
|
||||||
<xsl:otherwise>
|
|
||||||
<h1>
|
|
||||||
<xsl:value-of select="foundry:title"/>
|
|
||||||
</h1>
|
|
||||||
</xsl:otherwise>
|
|
||||||
</xsl:choose>
|
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<foundry:doc section="user"
|
<foundry:doc section="user"
|
||||||
|
|
@ -63,12 +63,12 @@
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="@id != '' or @class != '' or with-colorset = 'true'">
|
<xsl:when test="@id != '' or @class != '' or with-colorset = 'true'">
|
||||||
<span>
|
<span>
|
||||||
<xsl:call-template name="foundry-set-id-and-class"/>
|
<xsl:call-template name="foundry:set-id-and-class"/>
|
||||||
<xsl:value-of select="foundry:get-static-text(.)"/>
|
<xsl:value-of select="foundry:get-static-text('', .)"/>
|
||||||
</span>
|
</span>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="foundry:get-static-text(.)"/>
|
<xsl:value-of select="foundry:get-static-text('', .)"/>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
|
||||||
|
|
@ -38,22 +38,34 @@
|
||||||
<xsl:template match="a">
|
<xsl:template match="a">
|
||||||
<a>
|
<a>
|
||||||
<xsl:if test="./@download">
|
<xsl:if test="./@download">
|
||||||
<xsl:attribute name="download" select="./@download"/>
|
<xsl:attribute name="download">
|
||||||
|
<xsl:value-of select="./@download"/>
|
||||||
|
</xsl:attribute>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:if test="./@href-property">
|
<xsl:if test="./@href-property">
|
||||||
<xsl:attribute name="href" select="$data-tree/*[name = ./@href-property]"/>
|
<xsl:attribute name="href">
|
||||||
|
<xsl:value-of select="$data-tree/*[name = ./@href-property]"/>
|
||||||
|
</xsl:attribute>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:if test="./@href-static">
|
<xsl:if test="./@href-static">
|
||||||
<xsl:attribute name="href" select="./@href-static"/>
|
<xsl:attribute name="href">
|
||||||
|
<xsl:value-of select="./@href-static"/>
|
||||||
|
</xsl:attribute>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:if test="./@hreflang">
|
<xsl:if test="./@href-lang">
|
||||||
<xsl:attribute name="hreflang" select="./@hreflang"/>
|
<xsl:attribute name="hreflang">
|
||||||
|
<xsl:value-of select="./@href-lang"/>
|
||||||
|
</xsl:attribute>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:if test="./@rel">
|
<xsl:if test="./@rel">
|
||||||
<xsl:attribute name="rel" select="./@rel"/>
|
<xsl:attribute name="rel">
|
||||||
|
<xsl:value-of select="./@rel"/>
|
||||||
|
</xsl:attribute>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:if test="./@type">
|
<xsl:if test="./@type">
|
||||||
<xsl:attribute name="type" select="./@type"/>
|
<xsl:attribute name="type">
|
||||||
|
<xsl:value-of select="./@type"/>
|
||||||
|
</xsl:attribute>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:call-template name="foundry:set-id-and-class"/>
|
<xsl:call-template name="foundry:set-id-and-class"/>
|
||||||
<xsl:apply-templates/>
|
<xsl:apply-templates/>
|
||||||
|
|
@ -88,8 +100,9 @@
|
||||||
<xsl:call-template name="foundry:set-id-and-class"/>
|
<xsl:call-template name="foundry:set-id-and-class"/>
|
||||||
<span id="top"/>
|
<span id="top"/>
|
||||||
<a href="#startcontent" accesskey="S" class="nav-hide">
|
<a href="#startcontent" accesskey="S" class="nav-hide">
|
||||||
<xsl:attribute name="title"
|
<xsl:attribute name="title">
|
||||||
select="foundry:get-static-text('layout/page/skipnav/title')"/>
|
<xsl:value-of select="foundry:get-static-text('layout/page/skipnav/title')"/>
|
||||||
|
</xsl:attribute>
|
||||||
<xsl:value-of select="foundry:get-static-text('layout/page/skipnav/link')"/>
|
<xsl:value-of select="foundry:get-static-text('layout/page/skipnav/link')"/>
|
||||||
</a>
|
</a>
|
||||||
<xsl:apply-templates/>
|
<xsl:apply-templates/>
|
||||||
|
|
@ -127,7 +140,7 @@
|
||||||
|
|
||||||
<xsl:if test="normalize-space($divContent)">
|
<xsl:if test="normalize-space($divContent)">
|
||||||
<div>
|
<div>
|
||||||
<xsl:call-template name="mandalay:set-id-and-class"/>
|
<xsl:call-template name="foundry:set-id-and-class"/>
|
||||||
<xsl:apply-templates/>
|
<xsl:apply-templates/>
|
||||||
</div>
|
</div>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
|
@ -135,32 +148,32 @@
|
||||||
|
|
||||||
<xsl:template match="h1">
|
<xsl:template match="h1">
|
||||||
<xsl:call-template name="foundry:set-id-and-class"/>
|
<xsl:call-template name="foundry:set-id-and-class"/>
|
||||||
<xsl:apply:templates/>
|
<xsl:apply-templates/>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="h2">
|
<xsl:template match="h2">
|
||||||
<xsl:call-template name="foundry:set-id-and-class"/>
|
<xsl:call-template name="foundry:set-id-and-class"/>
|
||||||
<xsl:apply:templates/>
|
<xsl:apply-templates/>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="h3">
|
<xsl:template match="h3">
|
||||||
<xsl:call-template name="foundry:set-id-and-class"/>
|
<xsl:call-template name="foundry:set-id-and-class"/>
|
||||||
<xsl:apply:templates/>
|
<xsl:apply-templates/>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="h4">
|
<xsl:template match="h4">
|
||||||
<xsl:call-template name="foundry:set-id-and-class"/>
|
<xsl:call-template name="foundry:set-id-and-class"/>
|
||||||
<xsl:apply:templates/>
|
<xsl:apply-templates/>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="h5">
|
<xsl:template match="h5">
|
||||||
<xsl:call-template name="foundry:set-id-and-class"/>
|
<xsl:call-template name="foundry:set-id-and-class"/>
|
||||||
<xsl:apply:templates/>
|
<xsl:apply-templates/>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="h6">
|
<xsl:template match="h6">
|
||||||
<xsl:call-template name="foundry:set-id-and-class"/>
|
<xsl:call-template name="foundry:set-id-and-class"/>
|
||||||
<xsl:apply:templates/>
|
<xsl:apply-templates/>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<foundry:doc section="user" type="template-tag">
|
<foundry:doc section="user" type="template-tag">
|
||||||
|
|
@ -173,7 +186,7 @@
|
||||||
</foundry:doc>
|
</foundry:doc>
|
||||||
<xsl:template match="footer">
|
<xsl:template match="footer">
|
||||||
<footer>
|
<footer>
|
||||||
<xsl:call-template name="mandalay:set-id-and-class"/>
|
<xsl:call-template name="foundry:set-id-and-class"/>
|
||||||
<xsl:apply-templates/>
|
<xsl:apply-templates/>
|
||||||
</footer>
|
</footer>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
@ -196,8 +209,9 @@
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
</meta>
|
</meta>
|
||||||
|
|
||||||
<!-- EN 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 name="language" content="{$language}"/>
|
||||||
|
<!-- ToDo
|
||||||
<meta name="keywords">
|
<meta name="keywords">
|
||||||
<xsl:attribute name="content">
|
<xsl:attribute name="content">
|
||||||
<xsl:call-template name="foundry:keywords"/>
|
<xsl:call-template name="foundry:keywords"/>
|
||||||
|
|
@ -207,11 +221,11 @@
|
||||||
<xsl:attribute name="content">
|
<xsl:attribute name="content">
|
||||||
<xsl:call-template name="foundry:description"/>
|
<xsl:call-template name="foundry:description"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
</meta>
|
</meta>-->
|
||||||
|
|
||||||
<xsl:apply-templates/>
|
<xsl:apply-templates/>
|
||||||
|
|
||||||
<xsl:call-template name="bebop:double-click-protection"/>
|
<!-- Not implemented yet <xsl:call-template name="bebop:double-click-protection"/> -->
|
||||||
|
|
||||||
<xsl:apply-templates select="$data-tree//script"/>
|
<xsl:apply-templates select="$data-tree//script"/>
|
||||||
<!--
|
<!--
|
||||||
|
|
@ -234,7 +248,7 @@
|
||||||
</foundry:doc>
|
</foundry:doc>
|
||||||
<xsl:template match="header">
|
<xsl:template match="header">
|
||||||
<header>
|
<header>
|
||||||
<xsl:call-template name="mandalay:set-id-and-class"/>
|
<xsl:call-template name="foundry:set-id-and-class"/>
|
||||||
<xsl:apply-templates/>
|
<xsl:apply-templates/>
|
||||||
</header>
|
</header>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
@ -242,7 +256,9 @@
|
||||||
<xsl:template match="img">
|
<xsl:template match="img">
|
||||||
<img>
|
<img>
|
||||||
<xsl:if test="./@href-property">
|
<xsl:if test="./@href-property">
|
||||||
<xsl:attribute name="href" select="$data-tree/*[name = ./@href-property]"/>
|
<xsl:attribute name="href">
|
||||||
|
<xsl:value-of select="$data-tree/*[name = ./@href-property]"/>
|
||||||
|
</xsl:attribute>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:if test="./@href-static">
|
<xsl:if test="./@href-static">
|
||||||
<xsl:attribute name="href">
|
<xsl:attribute name="href">
|
||||||
|
|
@ -251,7 +267,7 @@
|
||||||
<xsl:value-of select="./@href-static"/>
|
<xsl:value-of select="./@href-static"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="concat($theme-prefix, ./@href-static"/>
|
<xsl:value-of select="concat($theme-prefix, ./@href-static)"/>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
|
|
@ -289,7 +305,7 @@
|
||||||
</foundry:doc>
|
</foundry:doc>
|
||||||
<xsl:template match="main">
|
<xsl:template match="main">
|
||||||
<main>
|
<main>
|
||||||
<xsl:call-template name="mandalay:set-id-and-class"/>
|
<xsl:call-template name="foundry:set-id-and-class"/>
|
||||||
<xsl:apply-templates/>
|
<xsl:apply-templates/>
|
||||||
</main>
|
</main>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
@ -334,14 +350,14 @@
|
||||||
</foundry:doc>
|
</foundry:doc>
|
||||||
<xsl:template match="nav">
|
<xsl:template match="nav">
|
||||||
<nav>
|
<nav>
|
||||||
<xsl:call-template name="mandalay:set-id-and-class"/>
|
<xsl:call-template name="foundry:set-id-and-class"/>
|
||||||
<xsl:apply-templates/>
|
<xsl:apply-templates/>
|
||||||
</nav>
|
</nav>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<xsl:template match="p">
|
<xsl:template match="p">
|
||||||
<p>
|
<p>
|
||||||
<xsl:call-template name="mandalay:set-id-and-class"/>
|
<xsl:call-template name="foundry:set-id-and-class"/>
|
||||||
<xsl:apply-templates/>
|
<xsl:apply-templates/>
|
||||||
</p>
|
</p>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
@ -423,7 +439,7 @@
|
||||||
</foundry:doc>
|
</foundry:doc>
|
||||||
<xsl:template match="section">
|
<xsl:template match="section">
|
||||||
<section>
|
<section>
|
||||||
<xsl:call-template name="mandalay:set-id-and-class"/>
|
<xsl:call-template name="foundry:set-id-and-class"/>
|
||||||
<xsl:apply-templates/>
|
<xsl:apply-templates/>
|
||||||
</section>
|
</section>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
@ -438,7 +454,7 @@
|
||||||
</foundry:doc>
|
</foundry:doc>
|
||||||
<xsl:template match="span">
|
<xsl:template match="span">
|
||||||
<span>
|
<span>
|
||||||
<xsl:call-template name="mandalay:set-id-and-class"/>
|
<xsl:call-template name="foundry:set-id-and-class"/>
|
||||||
<xsl:apply-templates/>
|
<xsl:apply-templates/>
|
||||||
</span>
|
</span>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
type="template-tag">
|
type="template-tag">
|
||||||
<foundry:doc-desc>
|
<foundry:doc-desc>
|
||||||
Invokes the foundry CSS loader. The CSS loader will parse the file
|
Invokes the foundry CSS loader. The CSS loader will parse the file
|
||||||
<code>settings/css-files.xml</code> to determine for which CSS an
|
<code>conf/css-files.xml</code> to determine for which CSS an
|
||||||
<code><link></code> element should be added to the HTML output. For a full
|
<code><link></code> element should be added to the HTML output. For a full
|
||||||
explanation please refer to the <a href="#user_css-files">CSS files section</a>.
|
explanation please refer to the <a href="#user_css-files">CSS files section</a>.
|
||||||
</foundry:doc-desc>
|
</foundry:doc-desc>
|
||||||
|
|
@ -39,11 +39,11 @@
|
||||||
<xsl:template match="load-css-files">
|
<xsl:template match="load-css-files">
|
||||||
<xsl:variable name="application">
|
<xsl:variable name="application">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$resultTree/@application">
|
<xsl:when test="$data-tree/@application">
|
||||||
<xsl:value-of select="$resultTree/@application"/>
|
<xsl:value-of select="$data-tree/@application"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="$resultTree/@class">
|
<xsl:when test="$data-tree/@class">
|
||||||
<xsl:value-of select="$resultTree/@class"/>
|
<xsl:value-of select="$data-tree/@class"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="'none'"/>
|
<xsl:value-of select="'none'"/>
|
||||||
|
|
@ -52,8 +52,8 @@
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
|
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="document(concat($theme-prefix, '/settings/css-files.xml'))/css-files/application[@name=$application]">
|
<xsl:when test="document(concat($theme-prefix, '/conf/css-files.xml'))/css-files/application[@name=$application]">
|
||||||
<xsl:for-each select="document(concat($theme-prefix, '/settings/css-files.xml'))/css-files/application[@name=$application]/css-file">
|
<xsl:for-each select="document(concat($theme-prefix, '/conf/css-files.xml'))/css-files/application[@name=$application]/css-file">
|
||||||
<xsl:call-template name="foundry:load-css-file">
|
<xsl:call-template name="foundry:load-css-file">
|
||||||
<xsl:with-param name="filename" select="."/>
|
<xsl:with-param name="filename" select="."/>
|
||||||
<xsl:with-param name="media" select="./@media"/>
|
<xsl:with-param name="media" select="./@media"/>
|
||||||
|
|
@ -61,7 +61,7 @@
|
||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:for-each select="document(concat($theme-prefix, '/settings/css-files.xml'))/css-files/default/css-file">
|
<xsl:for-each select="document(concat($theme-prefix, '/conf/css-files.xml'))/css-files/default/css-file">
|
||||||
<xsl:call-template name="foundry:load-css-file">
|
<xsl:call-template name="foundry:load-css-file">
|
||||||
<xsl:with-param name="filename" select="."/>
|
<xsl:with-param name="filename" select="."/>
|
||||||
<xsl:with-param name="media" select="./@media"/>
|
<xsl:with-param name="media" select="./@media"/>
|
||||||
|
|
@ -75,8 +75,8 @@
|
||||||
conditional comments in the other CSS files instead? -->
|
conditional comments in the other CSS files instead? -->
|
||||||
<xsl:if test="$msie_version >= '5' and $msie_version < '7'">
|
<xsl:if test="$msie_version >= '5' and $msie_version < '7'">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="document(concat($theme-prefix, '/settings/css-files.xml'))/css-files/application[@name=$application]">
|
<xsl:when test="document(concat($theme-prefix, '/conf/css-files.xml'))/css-files/application[@name=$application]">
|
||||||
<xsl:for-each select="document(concat($theme-prefix, '/settings/css-files.xml'))/css-files/application[@name=$application]/iehacks">
|
<xsl:for-each select="document(concat($theme-prefix, '/conf/css-files.xml'))/css-files/application[@name=$application]/iehacks">
|
||||||
<xsl:call-template name="foundry:load-css-file">
|
<xsl:call-template name="foundry:load-css-file">
|
||||||
<xsl:with-param name="filename" select="."/>
|
<xsl:with-param name="filename" select="."/>
|
||||||
<xsl:with-param name="media" select="./@media"/>
|
<xsl:with-param name="media" select="./@media"/>
|
||||||
|
|
@ -84,7 +84,7 @@
|
||||||
</xsl:for-each>
|
</xsl:for-each>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:for-each select="document(concat($theme-prefix, '/settings/css-files.xml'))/css-files/default/iehacks">
|
<xsl:for-each select="document(concat($theme-prefix, '/conf/css-files.xml'))/css-files/default/iehacks">
|
||||||
<xsl:call-template name="foundry:load-css-file">
|
<xsl:call-template name="foundry:load-css-file">
|
||||||
<xsl:with-param name="filename" select="."/>
|
<xsl:with-param name="filename" select="."/>
|
||||||
<xsl:with-param name="media" select="./@media"/>
|
<xsl:with-param name="media" select="./@media"/>
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,189 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE stylesheet>
|
||||||
|
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns:foundry="http://foundry.libreccm.org"
|
||||||
|
xmlns:func="http://exslt.org/functions"
|
||||||
|
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
|
||||||
|
xmlns:nav="http://ccm.redhat.com/navigation"
|
||||||
|
exclude-result-prefixes="xsl bebop foundry nav"
|
||||||
|
version="1.0">
|
||||||
|
|
||||||
|
<xsl:template match="navigation-layout">
|
||||||
|
<xsl:apply-templates>
|
||||||
|
<xsl:with-param name="navigation-id"
|
||||||
|
select="foundry:get-attribute-value('navigation-id', 'categoryMenu')"/>
|
||||||
|
<xsl:with-param name="with-colorset"
|
||||||
|
select="foundry:get-attribute-value('with-colorset', 'false')"/>
|
||||||
|
<xsl:with-param name="min-level"
|
||||||
|
select="foundry:get-attribute-value('min-level', '1')"/>
|
||||||
|
<xsl:with-param name="max-level"
|
||||||
|
select="foundry:get-attribute-value('max-level', '999')"/>
|
||||||
|
<xsl:with-param name="show-description-text"
|
||||||
|
select="foundry:get-attribute-value('show-description-text', 'true')"/>
|
||||||
|
<xsl:with-param name="current-level-tree"
|
||||||
|
select="$data-tree//nav:categoryMenu[@id=foundry:get-attribute-value('navigation-id', 'categoryMenu')]/nav:category/nav:category"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="navigation-layout//navigation-home-link">
|
||||||
|
<xsl:param name="navigation-id"/>
|
||||||
|
<xsl:param name="show-description-text"/>
|
||||||
|
|
||||||
|
<a href="{$data-tree//nav:categoryMenu[@id=$navigation-id]/nav:category/@url}">
|
||||||
|
<xsl:attribute name="title">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="./@show-description-text = 'false'">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="./@use-static-title = 'false'">
|
||||||
|
<xsl:value-of select="$data-tree//nav:categoryMenu[@id=$navigation-id]/nav:category/@title"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="foundry:get-static-text('navigation',
|
||||||
|
$data-tree//nav:categoryMenu[@id=$navigation-id]/@navigation-id,
|
||||||
|
'false')"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="$data-tree//nav:categoryMenu[@id=$navigation-id]/nav:category/@description"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:value-of select="foundry:shying($data-tree//nav:categoryMenu[@id=$navigation-id]/nav:category/@title)"/>
|
||||||
|
</a>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="navigation-layout//navigation-link-list"
|
||||||
|
name="navigation-link-list">
|
||||||
|
<xsl:param name="navigation-id"/>
|
||||||
|
<xsl:param name="with-colorset"/>
|
||||||
|
<xsl:param name="min-level"/>
|
||||||
|
<xsl:param name="max-level"/>
|
||||||
|
<xsl:param name="show-description-text"/>
|
||||||
|
<xsl:param name="current-level" select="1"/>
|
||||||
|
<xsl:param name="current-level-tree"/>
|
||||||
|
<xsl:param name="navigation-link-layout" select="."/>
|
||||||
|
|
||||||
|
<xsl:message>
|
||||||
|
navigation-link-list applied
|
||||||
|
</xsl:message>
|
||||||
|
|
||||||
|
<xsl:apply-templates>
|
||||||
|
<xsl:with-param name="navigation-id" select="$navigation-id"/>
|
||||||
|
<xsl:with-param name="with-colorset" select="$with-colorset"/>
|
||||||
|
<xsl:with-param name="min-level" select="$min-level"/>
|
||||||
|
<xsl:with-param name="max-level" select="$max-level"/>
|
||||||
|
<xsl:with-param name="show-description-text" select="$show-description-text"/>
|
||||||
|
<xsl:with-param name="current-level" select="$current-level"/>
|
||||||
|
<xsl:with-param name="current-level-tree" select="$current-level-tree"/>
|
||||||
|
<xsl:with-param name="navigation-link-layout" select="$navigation-link-layout"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="navigation-link-list//navigation-link-layout">
|
||||||
|
<xsl:param name="navigation-id"/>
|
||||||
|
<xsl:param name="with-colorset"/>
|
||||||
|
<xsl:param name="min-level"/>
|
||||||
|
<xsl:param name="max-level"/>
|
||||||
|
<xsl:param name="show-description-text"/>
|
||||||
|
<xsl:param name="current-level" select="1"/>
|
||||||
|
<xsl:param name="current-level-tree"
|
||||||
|
select="$data-tree//nav:categoryMenu[@id=$navigation-id]/nav:category/nav:category"/>
|
||||||
|
<xsl:param name="navigation-link-layout" select="."/>
|
||||||
|
|
||||||
|
<dl>
|
||||||
|
<dt>navigation-id</dt>
|
||||||
|
<dd><xsl:value-of select="$navigation-id"/></dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
<dt>
|
||||||
|
<dt>navigation-id</dt>
|
||||||
|
<dd><xsl:value-of select="$navigation-id"/></dd>
|
||||||
|
<dt>min-level</dt>
|
||||||
|
<dd><xsl:value-of select="$min-level"/></dd>
|
||||||
|
<xsl:value-of select="concat('navigation-id = ', $navigation-id)"/>
|
||||||
|
<xsl:value-of select="concat('min-level = ', $min-level)"/>
|
||||||
|
<xsl:value-of select="concat('max-level = ', $max-level)"/>
|
||||||
|
<xsl:value-of select="concat('current-level = ', $current-level, '; ')"/>
|
||||||
|
<xsl:value-of select="count($current-level-tree)"/>
|
||||||
|
</dt>
|
||||||
|
|
||||||
|
<xsl:if test="$current-level >= min-level">
|
||||||
|
|
||||||
|
<xsl:message>
|
||||||
|
Processing current level categories...
|
||||||
|
|
||||||
|
</xsl:message>
|
||||||
|
|
||||||
|
|
||||||
|
<xsl:apply-templates select="$current-level-tree">
|
||||||
|
<xsl:with-param name="with-colorset"/>
|
||||||
|
<xsl:with-param name="show-description-text"/>
|
||||||
|
<xsl:with-param name="navigation-link-layout" select="$navigation-link-layout"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
</xsl:if>
|
||||||
|
|
||||||
|
<xsl:if test="($current-level < $max-level) and $current-level-tree/nav:category">
|
||||||
|
|
||||||
|
<xsl:message>Processing sub level categories</xsl:message>
|
||||||
|
|
||||||
|
<xsl:call-template name="navigation-link-list">
|
||||||
|
<xsl:with-param name="navigation-id" select="$navigation-id"/>
|
||||||
|
<xsl:with-param name="with-colorset" select="$with-colorset"/>
|
||||||
|
<xsl:with-param name="min-level" select="$min-level"/>
|
||||||
|
<xsl:with-param name="max-level" select="$max-level"/>
|
||||||
|
<xsl:with-param name="show-description-text" select="$show-description-text"/>
|
||||||
|
<xsl:with-param name="current-level" select="$current-level + 1"/>
|
||||||
|
<xsl:with-param name="current-level-tree" select="$current-level-tree/nav:category"/>
|
||||||
|
<xsl:with-param name="navigation-link-layout" select="$navigation-link-layout"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:if>
|
||||||
|
|
||||||
|
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="nav:category">
|
||||||
|
<xsl:param name="with-colorset"/>
|
||||||
|
<xsl:param name="show-description-text"/>
|
||||||
|
<xsl:param name="navigation-link-layout"/>
|
||||||
|
|
||||||
|
<xsl:message>nav:category applied</xsl:message>
|
||||||
|
|
||||||
|
<xsl:apply-templates select="$navigation-link-layout">
|
||||||
|
<xsl:with-param name="url" select="./@url"/>
|
||||||
|
<xsl:with-param name="title" select="./@title"/>
|
||||||
|
<xsl:with-param name="description" select="./@description"/>
|
||||||
|
<xsl:with-param name="with-colorset" select="$with-colorset"/>
|
||||||
|
<xsl:with-param name="show-description-text" select="$show-description-text"/>
|
||||||
|
</xsl:apply-templates>
|
||||||
|
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template match="navigation-link">
|
||||||
|
<xsl:param name="url"/>
|
||||||
|
<xsl:param name="title"/>
|
||||||
|
<xsl:param name="description"/>
|
||||||
|
<xsl:param name="with-colorset"/>
|
||||||
|
<xsl:param name="show-description-text"/>
|
||||||
|
|
||||||
|
<xsl:message>navigation-link applied</xsl:message>
|
||||||
|
|
||||||
|
<a href="{$url}">
|
||||||
|
<xsl:attribute name="title">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="$show-description-text = 'true'">
|
||||||
|
<xsl:value-of select="$description"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="$title"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:attribute>
|
||||||
|
<xsl:value-of select="$title"/>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
||||||
|
|
@ -0,0 +1,34 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!DOCTYPE stylesheet [<!ENTITY nbsp ' '>]>
|
||||||
|
|
||||||
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
|
||||||
|
xmlns:cms="http://www.arsdigita.com/cms/1.0"
|
||||||
|
xmlns:foundry="http://foundry.libreccm.org"
|
||||||
|
xmlns:ui="http://www.arsdigita.com/ui/1.0"
|
||||||
|
exclude-result-prefixes="xsl bebop cms foundry ui"
|
||||||
|
version="1.0">
|
||||||
|
|
||||||
|
<xsl:template match="subsite-name">
|
||||||
|
<xsl:variable name="subsite-banner-text">
|
||||||
|
<xsl:value-of select="foundry:get-static-text('subsite-banner', $data-tree//ui:siteBanner[@bebop:classname='com.arsdigita.subsite.ui.SubSiteBanner']/@sitename)"/>
|
||||||
|
</xsl:variable>
|
||||||
|
|
||||||
|
<xsl:variable name="exclude">
|
||||||
|
<xsl:value-of select="foundry:get-setting('subsite-banner', concat($data-tree//ui:siteBanner[@bebop:classname='com.arsdigita.subsite.ui.SubSiteBanner']/@sitename, '/exclude'), 'false')"/>
|
||||||
|
</xsl:variable>
|
||||||
|
|
||||||
|
<xsl:if test="$exclude != 'true'">
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="(string-length($subsite-banner-text) < 1) or (contains(subsite-banner-text, 'missing translation'))">
|
||||||
|
<xsl:value-of select="$data-tree//ui:siteBanner[@bebop:classname='com.arsdigita.subsite.ui.SubSiteBanner']/@sitename"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="$subsite-banner-text"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</xsl:if>
|
||||||
|
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
||||||
|
|
@ -26,13 +26,14 @@
|
||||||
EXSLT functions.
|
EXSLT functions.
|
||||||
-->
|
-->
|
||||||
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
|
xmlns:bebop="http://www.arsdigita.com/bebop/1.0"
|
||||||
|
xmlns:cms="http://www.arsdigita.com/cms/1.0"
|
||||||
xmlns:foundry="http://foundry.libreccm.org"
|
xmlns:foundry="http://foundry.libreccm.org"
|
||||||
xslns:func="http://exslt.org/functions"
|
xmlns:func="http://exslt.org/functions"
|
||||||
|
xmlns:nav="http://ccm.redhat.com/navigation"
|
||||||
version="1.0">
|
version="1.0">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<foundry:doc section="devel">
|
<foundry:doc section="devel">
|
||||||
<foundry:doc-param name="level"
|
<foundry:doc-param name="level"
|
||||||
mandatory="yes">
|
mandatory="yes">
|
||||||
|
|
@ -66,7 +67,7 @@ EXSLT functions.
|
||||||
<xsl:param name="message"/>
|
<xsl:param name="message"/>
|
||||||
|
|
||||||
<func:result>
|
<func:result>
|
||||||
<xsl:value-of select="concat('[Foundry', $level', '] ', $message)"/>
|
<xsl:value-of select="concat('[Foundry ', $level, '] ', $message)"/>
|
||||||
</func:result>
|
</func:result>
|
||||||
</func:function>
|
</func:function>
|
||||||
|
|
||||||
|
|
@ -163,11 +164,66 @@ EXSLT functions.
|
||||||
</foundry:doc-see-also>
|
</foundry:doc-see-also>
|
||||||
</foundry:doc>
|
</foundry:doc>
|
||||||
<func:function name="foundry:message-error">
|
<func:function name="foundry:message-error">
|
||||||
|
<xsl:param name="message"/>
|
||||||
<func:result>
|
<func:result>
|
||||||
<xsl:value-of select="foundry:message('ERROR', $message)"/>
|
<xsl:value-of select="foundry:message('ERROR', $message)"/>
|
||||||
</func:result>
|
</func:result>
|
||||||
</func:function>
|
</func:function>
|
||||||
|
|
||||||
|
<foundry:doc section="devel">
|
||||||
|
<foundry:doc-param name="attribute-name"
|
||||||
|
mandatory="yes">
|
||||||
|
The attribute to check for.
|
||||||
|
</foundry:doc-param>
|
||||||
|
<foundry:doc-param name="default-value"
|
||||||
|
mandatory="yes">
|
||||||
|
The default value if the attribute is not set.
|
||||||
|
</foundry:doc-param>
|
||||||
|
<foundry:doc-result>
|
||||||
|
The value of the attribute if it is set on the current element, the
|
||||||
|
<code>default-value</code> otherwise.
|
||||||
|
</foundry:doc-result>
|
||||||
|
<foundry:doc-desc>
|
||||||
|
<p>
|
||||||
|
A helper function for retrieving an attribute value from an element. If the attribute is
|
||||||
|
set on the current element the value of the attribute is used as result. If the
|
||||||
|
attribute is not set the <code>default-value</code> is used. This method is used
|
||||||
|
by several layout tags with optional attributes. A common use pattern looks like this:
|
||||||
|
</p>
|
||||||
|
<pre>
|
||||||
|
<xsl:template match="example">
|
||||||
|
<xsl:variable name="width"
|
||||||
|
select="foundry:get-attribute-value('width', '640')" />
|
||||||
|
<xsl:variable name="height"
|
||||||
|
select="foundry:get-attribute-value('height', '480')" />
|
||||||
|
/<xsl:template>
|
||||||
|
</pre>
|
||||||
|
<p>
|
||||||
|
In this example, the element <code>example</code> has two optional attributes:
|
||||||
|
<code>with</code> and <code>height</code>. If the attribute is set in processed XML,
|
||||||
|
the value set there is used. Otherwise the default value (<code>640</code>
|
||||||
|
respectively <code>480</code>) is used. Without this function a code block like the
|
||||||
|
one in the <code>xsl:choose</code> block of this function would be necessary for
|
||||||
|
each of the variables.
|
||||||
|
</p>
|
||||||
|
</foundry:doc-desc>
|
||||||
|
</foundry:doc>
|
||||||
|
<func:function name="foundry:get-attribute-value">
|
||||||
|
<xsl:param name="attribute-name"/>
|
||||||
|
<xsl:param name="default-value"/>
|
||||||
|
|
||||||
|
<func:result>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="./@*[name() = $attribute-name]">
|
||||||
|
<xsl:value-of select="./@*[name() = $attribute-name]"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:value-of select="$default-value"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</func:result>
|
||||||
|
</func:function>
|
||||||
|
|
||||||
<foundry:doc section="devel">
|
<foundry:doc section="devel">
|
||||||
<foundry:doc-param name="module"
|
<foundry:doc-param name="module"
|
||||||
mandatory="yes">
|
mandatory="yes">
|
||||||
|
|
@ -275,22 +331,21 @@ EXSLT functions.
|
||||||
<func:function name="foundry:get-static-text">
|
<func:function name="foundry:get-static-text">
|
||||||
<xsl:param name="module"/>
|
<xsl:param name="module"/>
|
||||||
<xsl:param name="id"/>
|
<xsl:param name="id"/>
|
||||||
<xsl:param name="html" Select="'true'"/>
|
<xsl:param name="html" select="'true'"/>
|
||||||
<xsl:param name="lang" select="$lang"/>
|
<xsl:param name="lang" select="$lang"/>
|
||||||
|
<func:result>
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$module = '' and document(concat($theme-prefix}, '/texts/global.xml'))/foundry:staticTexts/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]">
|
||||||
<func:result select="document'{$theme-prefix}/texts/global.xml')/foundry:staticTexts/text[@id=$id]"/>
|
<xsl:value-of select="document(concat($theme-prefix, '/texts/global.xml'))/foundry:static-texts/text[@id=$id]"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="not($module = '') and document(concat($theme-prefix}, '/texts/', $module, '.xml'))/foundry:staticTexts/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]">
|
||||||
<func:result select="document(concat($theme-prefix}, '/texts/', $module, '.xml'))/foundry:staticTexts/text[@id=$id]/translation[@lang = $lang]"/>
|
<xsl:value-of 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:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="foundry:debugEnabled()">
|
<xsl:when test="foundry:debug-enabled()">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$html = 'true'">
|
<xsl:when test="$html = 'true'">
|
||||||
<func:result>
|
|
||||||
<span class="foundry-debug-missing-translation">
|
<span class="foundry-debug-missing-translation">
|
||||||
<span class="foundry-placeholder">
|
<span class="foundry-placeholder">
|
||||||
<xsl:value-of select="$id"/>
|
<xsl:value-of select="$id"/>
|
||||||
|
|
@ -298,15 +353,14 @@ EXSLT functions.
|
||||||
<span class="foundry-missing-translation-path">
|
<span class="foundry-missing-translation-path">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$module = ''">
|
<xsl:when test="$module = ''">
|
||||||
<xsl:value-of select="concat($theme-prefix, '/texts/global.xml/foundry:staticTexts/text[@id=', $id, ']/translation[@lang=', $lang, ']'"/>
|
<xsl:value-of select="document(concat($theme-prefix, '/texts/global.xml'))/foundry:static-texts/text[@id=$id]/translation[@lang=$lang]"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="'concat($theme-prefix, '/texts/', $module, '.xml/foundry:staticTexts/text[@id=', $id, ']/translation[@lang=', $lang, ']'"/>
|
<xsl:value-of select="document(concat($theme-prefix, '/texts/', $module, '.xml'))/foundry:static-texts/text[@id=$id]/translation[@lang=$lang]"/>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</func:result>
|
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:value-of select="$id"/>
|
<xsl:value-of select="$id"/>
|
||||||
|
|
@ -316,17 +370,17 @@ EXSLT functions.
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
|
</func:result>
|
||||||
</func:function>
|
</func:function>
|
||||||
|
|
||||||
<foundry:doc section="devel">
|
<foundry:doc section="devel">
|
||||||
<foundry:doc-result>
|
<foundry:doc-result>
|
||||||
<code>true</code> if the debug mode if active, <code>false</code> otherwise.
|
<code>true</code> if the debug mode if active, <code>false</code> otherwise.
|
||||||
</foundry:doc-result>
|
</foundry:doc-result>
|
||||||
<foudry:doc-desc>
|
<foundry:doc-desc>
|
||||||
A helper function to determine if the debug mode should be enabled. The debug mode
|
A helper function to determine if the debug mode should be enabled. The debug mode
|
||||||
of foundry is automatically enabled if the theme is viewed as development theme.
|
of foundry is automatically enabled if the theme is viewed as development theme.
|
||||||
</foudry:doc-desc>
|
</foundry:doc-desc>
|
||||||
</foundry:doc>
|
</foundry:doc>
|
||||||
<func:function name="foundry:debug-enabled">
|
<func:function name="foundry:debug-enabled">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
|
|
@ -365,7 +419,7 @@ EXSLT functions.
|
||||||
|
|
||||||
<func:function name="foundry:shying">
|
<func:function name="foundry:shying">
|
||||||
<xsl:param name="text"/>
|
<xsl:param name="text"/>
|
||||||
<func:result select="translate($text, '\-', '­'"/>
|
<func:result select="translate($text, '\-', '­')"/>
|
||||||
</func:function>
|
</func:function>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -376,17 +430,16 @@ EXSLT functions.
|
||||||
<xsl:when test="$data-tree//cms:contentPanel">
|
<xsl:when test="$data-tree//cms:contentPanel">
|
||||||
<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:value-of select="foundry:get-static-text('layout/page/title/glossary')"/>
|
<xsl:value-of 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:value-of select="foundry:get-static-text('layout/page/title/faq')"/>
|
<xsl:value-of 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>
|
||||||
<xsl:value-of select="foundry:shying($data-tree//cms:contentPanel/cms:item/title)"/>
|
<xsl:value-of select="foundry:shying($data-tree//cms:contentPanel/cms:item/title)"/>
|
||||||
</xsl:call-template>
|
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<?xml version="1.0"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<!DOCTYPE stylesheet [<!ENTITY nbsp ' '>]>
|
<!DOCTYPE stylesheet [<!ENTITY nbsp ' '>]>
|
||||||
|
|
||||||
<!--
|
<!--
|
||||||
|
|
@ -49,16 +49,22 @@
|
||||||
<xsl:variable name="class" select="@class" />
|
<xsl:variable name="class" select="@class" />
|
||||||
|
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="document(concat($theme-prefix, '/settings/templates.xml'))/applications/application[@name=$application and @class=$class]">
|
<xsl:when test="document(concat($theme-prefix, '/conf/templates.xml'))/applications/application[@name=$application and @class=$class]">
|
||||||
<xsl:call-template name="foundry:parse-template">
|
<xsl:message>
|
||||||
|
<xsl:value-of select="foundry:message-info('Using application template')"/>
|
||||||
|
</xsl:message>
|
||||||
|
<xsl:call-template name="foundry:process-template">
|
||||||
<xsl:with-param name="template-file"
|
<xsl:with-param name="template-file"
|
||||||
select="document(concat($theme-prefix, '/settings/templates.xml'))/applications/application[@name=$application and @class=$class]"/>
|
select="document(concat($theme-prefix, '/conf/templates.xml'))/applications/application[@name=$application and @class=$class]"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
|
<xsl:message>
|
||||||
|
<xsl:value-of select="foundry:message-info('Using default layout')"/>
|
||||||
|
</xsl:message>
|
||||||
<xsl:call-template name="foundry:process-template">
|
<xsl:call-template name="foundry:process-template">
|
||||||
<xsl:with-param name="template-file"
|
<xsl:with-param name="template-file"
|
||||||
select="document(concat($theme-prefix, '/settings/templates.xml'))/applications/default"/>
|
select="document(concat($theme-prefix, '/conf/templates.xml'))/applications/default"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
|
|
@ -69,11 +75,11 @@
|
||||||
|
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<fondry:doc section="devel">
|
<foundry:doc section="devel">
|
||||||
<foundry:doc-desc>
|
<foundry:doc-desc>
|
||||||
The entry point for creating Foundry documentation.
|
The entry point for creating Foundry documentation.
|
||||||
</foundry:doc-desc>
|
</foundry:doc-desc>
|
||||||
</fondry:doc>
|
</foundry:doc>
|
||||||
<xsl:template match="/foundry:documentation">
|
<xsl:template match="/foundry:documentation">
|
||||||
<xsl:value-of select="'<!DOCTYPE HTML>'"
|
<xsl:value-of select="'<!DOCTYPE HTML>'"
|
||||||
disable-output-escaping="yes" />
|
disable-output-escaping="yes" />
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<page-layout>
|
||||||
|
<head>
|
||||||
|
<title>
|
||||||
|
<separator>: </separator>
|
||||||
|
<show-text>layout/page/head/title</show-text>
|
||||||
|
<show-page-title/>
|
||||||
|
</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<nav>
|
||||||
|
<navigation-layout>
|
||||||
|
<navigation-home-link/>
|
||||||
|
<navigation-link-list>
|
||||||
|
<ul>
|
||||||
|
<navigation-link-layout>
|
||||||
|
<li>
|
||||||
|
<navigation-link/>
|
||||||
|
</li>
|
||||||
|
</navigation-link-layout>
|
||||||
|
</ul>
|
||||||
|
</navigation-link-list>
|
||||||
|
</navigation-layout>
|
||||||
|
</nav>
|
||||||
|
<main>
|
||||||
|
<div>
|
||||||
|
<h1>TEST</h1>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
</body>
|
||||||
|
</page-layout>
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<foundry:static-texts xmlns:foundry="http://foundry.libreccm.org">
|
||||||
|
<text id="layout/page/head/title">
|
||||||
|
<translation lang="de">Foundry</translation>
|
||||||
|
<translation lang="en">Foundry</translation>
|
||||||
|
</text>
|
||||||
|
</foundry:static-texts>
|
||||||
Loading…
Reference in New Issue