Made log messages from Foundry configurable.
git-svn-id: https://svn.libreccm.org/ccm/trunk@3109 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
ea4326838d
commit
d34ff0c008
|
|
@ -13,6 +13,8 @@
|
||||||
-->
|
-->
|
||||||
<!--<setting id="parent-theme">foundry</setting>-->
|
<!--<setting id="parent-theme">foundry</setting>-->
|
||||||
|
|
||||||
|
<setting id="log-level">warn</setting>
|
||||||
|
|
||||||
<setting id="site-logo">images/cms-logo.png</setting>
|
<setting id="site-logo">images/cms-logo.png</setting>
|
||||||
|
|
||||||
</foundry:configuration>
|
</foundry:configuration>
|
||||||
|
|
@ -13,6 +13,8 @@
|
||||||
-->
|
-->
|
||||||
<!--<setting id="parent-theme">foundry</setting>-->
|
<!--<setting id="parent-theme">foundry</setting>-->
|
||||||
|
|
||||||
|
<setting id="log-level">warn</setting>
|
||||||
|
|
||||||
<setting id="site-logo">images/scientificcms_logo.png</setting>
|
<setting id="site-logo">images/scientificcms_logo.png</setting>
|
||||||
|
|
||||||
</foundry:configuration>
|
</foundry:configuration>
|
||||||
|
|
@ -26,14 +26,13 @@
|
||||||
Processing bebop tables
|
Processing bebop tables
|
||||||
-->
|
-->
|
||||||
|
|
||||||
<xsl:stylesheet
|
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
|
||||||
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: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"
|
exclude-result-prefixes="xsl bebop cms foundry nav"
|
||||||
exclude-result-prefixes="xsl bebop cms foundry nav"
|
version="1.0">
|
||||||
version="1.0">
|
|
||||||
|
|
||||||
<!-- DE Erzeuge Tabelle. Da die einzelnen Bestandteile (thead, tbody und tfoot) nicht
|
<!-- DE Erzeuge Tabelle. Da die einzelnen Bestandteile (thead, tbody und tfoot) nicht
|
||||||
in der von HTML vorgesehenen Reihenfolge im XML stehen, müssen diese hier in
|
in der von HTML vorgesehenen Reihenfolge im XML stehen, müssen diese hier in
|
||||||
|
|
@ -151,10 +150,8 @@
|
||||||
<xsl:with-param name="alt" select="'[ ]'"/>
|
<xsl:with-param name="alt" select="'[ ]'"/>
|
||||||
<xsl:with-param name="title" select="'[ ]'"/>
|
<xsl:with-param name="title" select="'[ ]'"/>
|
||||||
<xsl:with-param name="src"
|
<xsl:with-param name="src"
|
||||||
select="foundry:parse-link(foundry:get-setting('bebop',
|
select="foundry:gen-path('/images/bebop/checkBox-unchecked.gif',
|
||||||
'table/setImage/checkbox-unchecked',
|
'internal')"/>
|
||||||
'/images/bebop/checkBox-unchecked.gif'),
|
|
||||||
$theme-prefix)"/>
|
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
|
@ -163,10 +160,8 @@
|
||||||
<xsl:with-param name="alt" select="'{X}'"/>
|
<xsl:with-param name="alt" select="'{X}'"/>
|
||||||
<xsl:with-param name="title" select="'{X}'"/>
|
<xsl:with-param name="title" select="'{X}'"/>
|
||||||
<xsl:with-param name="src"
|
<xsl:with-param name="src"
|
||||||
select="foundry:parse-link(foundry:get-setting('bebop',
|
select="foundry:gen-path('/images/bebop/checkbox-grey-checked.gif',
|
||||||
'table/setImage/checkbox-grey-checked',
|
'internal')"/>
|
||||||
'/images/bebop/checkbox-grey-checked.gif'),
|
|
||||||
$theme-prefix)"/>
|
|
||||||
</xsl:apply-templates>
|
</xsl:apply-templates>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
|
@ -175,10 +170,8 @@
|
||||||
<xsl:with-param name="alt" select="'{ }'"/>
|
<xsl:with-param name="alt" select="'{ }'"/>
|
||||||
<xsl:with-param name="title" select="'{ }'"/>
|
<xsl:with-param name="title" select="'{ }'"/>
|
||||||
<xsl:with-param name="src"
|
<xsl:with-param name="src"
|
||||||
select="foundry:parse-link(foundry:get-setting('bebop',
|
select="foundry:gen-path('/images/bebop/checkbox-grey-unchecked.gif',
|
||||||
'table/setImage/checkbox-grey-unchecked',
|
'internal')"/>
|
||||||
'/images/bebop/checkbox-grey-unchecked.gif'),
|
|
||||||
$theme-prefix)"/>
|
|
||||||
</xsl:apply-templates>
|
</xsl:apply-templates>
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -349,8 +349,8 @@
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<img>
|
<img>
|
||||||
<xsl:attribute name="src">
|
<xsl:attribute name="src">
|
||||||
<xsl:value-of select="concat($context-prefix,
|
<xsl:value-of select="foundry:gen-path('images/gray-triangle-up.gif',
|
||||||
'/assets/gray-triangle-up.gif')"/>
|
'internal')"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="title">
|
<xsl:attribute name="title">
|
||||||
<xsl:value-of select="'moveUp'"/>
|
<xsl:value-of select="'moveUp'"/>
|
||||||
|
|
@ -370,8 +370,8 @@
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<img>
|
<img>
|
||||||
<xsl:attribute name="src">
|
<xsl:attribute name="src">
|
||||||
<xsl:value-of select="concat($context-prefix,
|
<xsl:value-of select="foundry:gen-path('images/gray-triangle-down.gif',
|
||||||
'/assets/gray-triangle-down.gif')"/>
|
'internal')"/>
|
||||||
</xsl:attribute>
|
</xsl:attribute>
|
||||||
<xsl:attribute name="title">
|
<xsl:attribute name="title">
|
||||||
<xsl:value-of select="'moveDown'"/>
|
<xsl:value-of select="'moveDown'"/>
|
||||||
|
|
@ -488,15 +488,21 @@
|
||||||
<xsl:param name="template-file" as="xs:string"/>
|
<xsl:param name="template-file" as="xs:string"/>
|
||||||
<xsl:param name="origin" as="xs:string" select="''"/>
|
<xsl:param name="origin" as="xs:string" select="''"/>
|
||||||
|
|
||||||
<xsl:message>
|
<xsl:call-template name="foundry:message-debug">
|
||||||
<xsl:value-of select="concat('process-template called with template-file = ', $template-file, ' and origin = ', $origin)"/>
|
<xsl:with-param name="message"
|
||||||
</xsl:message>
|
select="concat('process-template called with template-file = ',
|
||||||
<xsl:message>
|
$template-file,
|
||||||
<xsl:value-of select="concat('using template file: ', foundry:gen-path(
|
' and origin = ',
|
||||||
concat('templates/',
|
$origin)"/>
|
||||||
normalize-space($template-file)),
|
</xsl:call-template>
|
||||||
$origin))"/>
|
|
||||||
</xsl:message>
|
<xsl:call-template name="foundry:message-debug">
|
||||||
|
<xsl:with-param name="message"
|
||||||
|
select="concat('using template file: ',
|
||||||
|
foundry:gen-path(concat('templates/',
|
||||||
|
normalize-space($template-file)),
|
||||||
|
$origin))" />
|
||||||
|
</xsl:call-template>
|
||||||
|
|
||||||
<xsl:apply-templates select="document(foundry:gen-path(
|
<xsl:apply-templates select="document(foundry:gen-path(
|
||||||
concat('templates/',
|
concat('templates/',
|
||||||
|
|
|
||||||
|
|
@ -168,9 +168,10 @@
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$template-map/content-item[@oid = $oid]">
|
<xsl:when test="$template-map/content-item[@oid = $oid]">
|
||||||
|
|
||||||
<xsl:message>
|
<xsl:call-template name="foundry:message-info">
|
||||||
<xsl:value-of select="foundry:message-info('Found template for this special item.')"/>
|
<xsl:with-param name="message"
|
||||||
</xsl:message>
|
select="'Found template for this special item.'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
|
||||||
<xsl:call-template name="foundry:process-contentitem-template">
|
<xsl:call-template name="foundry:process-contentitem-template">
|
||||||
<xsl:with-param name="template-file"
|
<xsl:with-param name="template-file"
|
||||||
|
|
@ -272,9 +273,10 @@
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
|
|
||||||
<xsl:when test="$template-map/default">
|
<xsl:when test="$template-map/default">
|
||||||
<xsl:message>
|
<xsl:call-template name="foundry:message-warn">
|
||||||
<xsl:value-of select="foundry:message-info('No template for item found. Using default')"/>
|
<xsl:with-param name="message"
|
||||||
</xsl:message>
|
select="'No layout template for item found. Using default'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
|
||||||
<xsl:call-template name="foundry:process-contentitem-template">
|
<xsl:call-template name="foundry:process-contentitem-template">
|
||||||
<xsl:with-param name="template-file"
|
<xsl:with-param name="template-file"
|
||||||
|
|
@ -285,9 +287,10 @@
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
|
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:message>
|
<xsl:call-template name="foundry:message-warn">
|
||||||
<xsl:value-of select="foundry:message-info('No template for item found and not default configured. Using internal default')"/>
|
<xsl:with-param name="message"
|
||||||
</xsl:message>
|
select="'No template for item found and not default configured. Using internal default'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
|
||||||
<xsl:call-template name="foundry:process-contentitem-template">
|
<xsl:call-template name="foundry:process-contentitem-template">
|
||||||
<xsl:with-param name="template-file"
|
<xsl:with-param name="template-file"
|
||||||
|
|
@ -340,9 +343,10 @@
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:message>
|
<xsl:call-template name="foundry:message-warn">
|
||||||
<xsl:value-of select="foundry:message-info('No template for item found and not default configured. Using internal default')"/>
|
<xsl:with-param name="message"
|
||||||
</xsl:message>
|
select="'No template for item found and not default configured. Using internal default'"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
|
||||||
<xsl:call-template name="foundry:process-contentitem-template">
|
<xsl:call-template name="foundry:process-contentitem-template">
|
||||||
<xsl:with-param name="template-file"
|
<xsl:with-param name="template-file"
|
||||||
|
|
|
||||||
|
|
@ -186,10 +186,6 @@
|
||||||
<xsl:template match="xsl:import" mode="doc">
|
<xsl:template match="xsl:import" mode="doc">
|
||||||
<xsl:param name="section-generate" tunnel="yes"/>
|
<xsl:param name="section-generate" tunnel="yes"/>
|
||||||
|
|
||||||
<!--<xsl:message>
|
|
||||||
<xsl:value-of select="concat('parsing ', ./@href)"/>
|
|
||||||
</xsl:message>-->
|
|
||||||
|
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="count(document(./@href)//foundry:doc[@section=$section-generate]) > 0">
|
<xsl:when test="count(document(./@href)//foundry:doc[@section=$section-generate]) > 0">
|
||||||
<!-- Only generate a section for the file if there is document. -->
|
<!-- Only generate a section for the file if there is document. -->
|
||||||
|
|
|
||||||
|
|
@ -295,50 +295,16 @@
|
||||||
select="$data-tree//nav:categoryMenu[@id=$navigation-id]/nav:category/nav:category"
|
select="$data-tree//nav:categoryMenu[@id=$navigation-id]/nav:category/nav:category"
|
||||||
tunnel="yes"/>
|
tunnel="yes"/>
|
||||||
|
|
||||||
<xsl:message>
|
<xsl:call-template name="foundry:message-debug">
|
||||||
<xsl:value-of select="'navigation-links template called with these parameters:'"/>
|
<xsl:with-param name="message"
|
||||||
</xsl:message>
|
select="concat('navigation-links template called with these parameters:
',
|
||||||
<xsl:message>
|
' navigation-id = ', $navigation-id, '
',
|
||||||
<xsl:value-of select="concat(' navigation-id = ', $navigation-id)"/>
|
' with-colorset = ', $with-colorset, '
',
|
||||||
</xsl:message>
|
' min-level = ', $min-level, '
',
|
||||||
<xsl:message>
|
' max-level = ', $max-level, ' 
',
|
||||||
<xsl:value-of select="concat(' with-colorset = ', $with-colorset)"/>
|
' current-level = ', $current-level, '
',
|
||||||
</xsl:message>
|
' count(category) = ', count($current-level-tree), '
')"/>
|
||||||
<xsl:message>
|
</xsl:call-template>
|
||||||
<xsl:value-of select="concat(' min-level = ', $min-level)"/>
|
|
||||||
</xsl:message>
|
|
||||||
<xsl:message>
|
|
||||||
<xsl:value-of select="concat(' max-level = ', $max-level)"/>
|
|
||||||
</xsl:message>
|
|
||||||
<xsl:message>
|
|
||||||
<xsl:value-of select="concat(' current-level = ', $current-level)"/>
|
|
||||||
</xsl:message>
|
|
||||||
<xsl:message>
|
|
||||||
<xsl:value-of select="concat(' count(category)', count($current-level-tree))"/>
|
|
||||||
</xsl:message>
|
|
||||||
|
|
||||||
<!--<dl>
|
|
||||||
<dt>navigation-id</dt>
|
|
||||||
<dd>
|
|
||||||
<xsl:value-of select="$navigation-id"/>
|
|
||||||
</dd>
|
|
||||||
<dt>with-colorset</dt>
|
|
||||||
<dd>
|
|
||||||
<xsl:value-of select="$with-colorset"/>
|
|
||||||
</dd>
|
|
||||||
<dt>min-level</dt>
|
|
||||||
<dd>
|
|
||||||
<xsl:value-of select="$min-level"/>
|
|
||||||
</dd>
|
|
||||||
<dt>max-level</dt>
|
|
||||||
<dd>
|
|
||||||
<xsl:value-of select="$max-level"/>
|
|
||||||
</dd>
|
|
||||||
<dt>current-level</dt>
|
|
||||||
<dd>
|
|
||||||
<xsl:value-of select="$current-level"/>
|
|
||||||
</dd>
|
|
||||||
</dl>-->
|
|
||||||
|
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="($current-level >= $min-level) and ($current-level <= $max-level)">
|
<xsl:when test="($current-level >= $min-level) and ($current-level <= $max-level)">
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@
|
||||||
<foundry:doc-file-title>Utility functions</foundry:doc-file-title>
|
<foundry:doc-file-title>Utility functions</foundry:doc-file-title>
|
||||||
<foundry:doc-file-desc>
|
<foundry:doc-file-desc>
|
||||||
<p>
|
<p>
|
||||||
Utility functions.
|
This file provides several utility functions and templates.
|
||||||
</p>
|
</p>
|
||||||
</foundry:doc-file-desc>
|
</foundry:doc-file-desc>
|
||||||
</foundry:doc-file>
|
</foundry:doc-file>
|
||||||
|
|
@ -180,84 +180,85 @@
|
||||||
<xsl:param name="path" as="xs:string"/>
|
<xsl:param name="path" as="xs:string"/>
|
||||||
|
|
||||||
<xsl:sequence select="foundry:gen-path($path, '')"/>
|
<xsl:sequence select="foundry:gen-path($path, '')"/>
|
||||||
</xsl:function>
|
</xsl:function>
|
||||||
|
|
||||||
<foundry:doc section="devel" type="function">
|
<foundry:doc section="devel" type="function">
|
||||||
<foundry:doc-desc>
|
<foundry:doc-desc>
|
||||||
<p>
|
<p>
|
||||||
Variant of <code>gen-path</code> with an additional <code>origin</code>
|
Variant of <code>gen-path</code> with an additional <code>origin</code>
|
||||||
parameter. This parameter can have three values:
|
parameter. This parameter can have three values:
|
||||||
If set to <code>true</code> the file is loaded from the
|
If set to <code>true</code> the file is loaded from the
|
||||||
<code>foundry</code> directory.
|
<code>foundry</code> directory.
|
||||||
</p>
|
</p>
|
||||||
<dl>
|
<dl>
|
||||||
<dt>empty string (<code>''</code>)</dt>
|
<dt>empty string (<code>''</code>)</dt>
|
||||||
<dd>
|
<dd>
|
||||||
The path points to a resource in the theme directory. The return value is the
|
The path points to a resource in the theme directory. The return value is the
|
||||||
concatenation of the theme-prefix, a slash and the path provided as first
|
concatenation of the theme-prefix, a slash and the path provided as first
|
||||||
parameter. In XPath Syntax: <code>concat($theme-prefix, '/', $path</code>.
|
parameter. In XPath Syntax: <code>concat($theme-prefix, '/', $path</code>.
|
||||||
</dd>
|
</dd>
|
||||||
<dt>master</dt>
|
<dt>master</dt>
|
||||||
<dd>
|
<dd>
|
||||||
If the theme mode (which is set in <code>conf/global.xml</code>) is set to
|
If the theme mode (which is set in <code>conf/global.xml</code>) is set to
|
||||||
<code>master</code> the result is the same as for the empty string. If the
|
<code>master</code> the result is the same as for the empty string. If the
|
||||||
the theme mode is set to <code>child</code> the generated path points to
|
the theme mode is set to <code>child</code> the generated path points to
|
||||||
the parent/master theme. More exactly the result is the concatenation of the
|
the parent/master theme. More exactly the result is the concatenation of the
|
||||||
context-prefix environment variable, the string <code>/themes/</code>, the
|
context-prefix environment variable, the string <code>/themes/</code>, the
|
||||||
name of the master theme (set in <code>conf/global.xml</code>,
|
name of the master theme (set in <code>conf/global.xml</code>,
|
||||||
usally <code>foundry</code>), a slash the the path provided as first parameter.
|
usally <code>foundry</code>), a slash the the path provided as first parameter.
|
||||||
Or in XPath syntax:
|
Or in XPath syntax:
|
||||||
<code>concat($content-prefix, '/themes/', $master-theme, '/', $path.)</code>.
|
<code>concat($content-prefix, '/themes/', $master-theme, '/', $path.)</code>.
|
||||||
</dd>
|
</dd>
|
||||||
<dt>internal</dt>
|
<dt>internal</dt>
|
||||||
<dd>
|
<dd>
|
||||||
The path points to an internal resource which is provided by Foundry. If the
|
The path points to an internal resource which is provided by Foundry. If the
|
||||||
theme mode is <code>master</code> the generated path is the concatenation of
|
theme mode is <code>master</code> the generated path is the concatenation of
|
||||||
the theme prefix, the string <code>/foundry/</code> and the path provided as
|
the theme prefix, the string <code>/foundry/</code> and the path provided as
|
||||||
first parameter (XPath: <code>concat($theme-prefix, '/foundry/', $path)</code>.
|
first parameter (XPath: <code>concat($theme-prefix, '/foundry/', $path)</code>.
|
||||||
If the theme mode is <code>child</code> the generated path
|
If the theme mode is <code>child</code> the generated path
|
||||||
is the concatenation of the context prefix, the string
|
is the concatenation of the context prefix, the string
|
||||||
<code>/themes/foundry/foundry/</code> and the path provided as first parameter
|
<code>/themes/foundry/foundry/</code> and the path provided as first parameter
|
||||||
(XPath: <code>concat($context-prefix, '/themes/foundry/foundry/', $path)</code>).
|
(XPath: <code>concat($context-prefix, '/themes/foundry/foundry/', $path)</code>).
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</foundry:doc-desc>
|
</foundry:doc-desc>
|
||||||
</foundry:doc>
|
</foundry:doc>
|
||||||
<xsl:function name="foundry:gen-path" as="xs:string">
|
<xsl:function name="foundry:gen-path" as="xs:string">
|
||||||
<xsl:param name="path" as="xs:string"/>
|
<xsl:param name="path" as="xs:string"/>
|
||||||
<xsl:param name="origin" as="xs:string"/>
|
<xsl:param name="origin" as="xs:string"/>
|
||||||
|
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$origin = ''">
|
<xsl:when test="$origin = ''">
|
||||||
<xsl:sequence select="concat($theme-prefix, '/', $path)"/>
|
<xsl:sequence select="concat($theme-prefix, '/', $path)"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="$origin = 'master' and $theme-mode = 'master'">
|
<xsl:when test="$origin = 'master' and $theme-mode = 'master'">
|
||||||
<xsl:sequence select="concat($theme-prefix, '/', $path)"/>
|
<xsl:sequence select="concat($theme-prefix, '/', $path)"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="$origin = 'master' and $theme-mode = 'child'">
|
<xsl:when test="$origin = 'master' and $theme-mode = 'child'">
|
||||||
<xsl:sequence select="concat($context-prefix,
|
<xsl:sequence select="concat($context-prefix,
|
||||||
'/themes/',
|
'/themes/',
|
||||||
$master-theme,
|
$master-theme,
|
||||||
'/',
|
'/',
|
||||||
$path)"/>
|
$path)"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="$origin = 'internal' and $theme-mode = 'master'">
|
<xsl:when test="$origin = 'internal' and $theme-mode = 'master'">
|
||||||
<xsl:sequence select="concat($theme-prefix, '/foundry/', $path)"/>
|
<xsl:sequence select="concat($theme-prefix, '/foundry/', $path)"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="$origin = 'internal' and $theme-mode = 'child'">
|
<xsl:when test="$origin = 'internal' and $theme-mode = 'child'">
|
||||||
<xsl:sequence select="concat($context-prefix,
|
<xsl:sequence select="concat($context-prefix,
|
||||||
'/themes/foundry/foundry/',
|
'/themes/foundry/foundry/',
|
||||||
$path)"/>
|
$path)"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:sequence select="concat($theme-prefix, '/', $path)"/>
|
<xsl:sequence select="concat($theme-prefix, '/', $path)"/>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:function>
|
</xsl:function>
|
||||||
|
|
||||||
<foundry:doc section="devel" type="function">
|
<!-- Templates for outputting log messages -->
|
||||||
|
<foundry:doc section="devel" type="function-template">
|
||||||
<foundry:doc-params>
|
<foundry:doc-params>
|
||||||
<foundry:doc-param name="level"
|
<foundry:doc-param name="msg-level"
|
||||||
mandatory="yes"
|
mandatory="yes"
|
||||||
type="string">
|
type="string">
|
||||||
The level of the message, indicating its severity
|
The level of the message, indicating its severity
|
||||||
|
|
@ -277,13 +278,18 @@
|
||||||
</foundry:doc-result>
|
</foundry:doc-result>
|
||||||
<foundry:doc-desc>
|
<foundry:doc-desc>
|
||||||
<p>
|
<p>
|
||||||
A helper function used by the other message functions like
|
A helper template used by the other message templates like
|
||||||
<code>foundry:message-warn</code>. Concatenates the message level with the message.
|
<code>foundry:message-warn</code>. Outputs a message (for example in the
|
||||||
|
application servers log using <code>xsl:message</code>.
|
||||||
|
Concatenates the message level with the message.
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
This function should not be used directly. Use the other message functions instead.
|
This template should not be used directly. Use the other message templates instead.
|
||||||
</p>
|
</p>
|
||||||
</foundry:doc-desc>
|
</foundry:doc-desc>
|
||||||
|
<foundry:doc-see-also>
|
||||||
|
#foundry-message-debug
|
||||||
|
</foundry:doc-see-also>
|
||||||
<foundry:doc-see-also>
|
<foundry:doc-see-also>
|
||||||
#foundry-message-info
|
#foundry-message-info
|
||||||
</foundry:doc-see-also>
|
</foundry:doc-see-also>
|
||||||
|
|
@ -294,14 +300,29 @@
|
||||||
#foundry-message-error
|
#foundry-message-error
|
||||||
</foundry:doc-see-also>
|
</foundry:doc-see-also>
|
||||||
</foundry:doc>
|
</foundry:doc>
|
||||||
<xsl:function name="foundry:message" as="xs:string">
|
<xsl:template name="foundry:message">
|
||||||
<xsl:param name="level" as="xs:string"/>
|
<xsl:param name="msg-level" as="xs:string"/>
|
||||||
<xsl:param name="message" as="xs:string"/>
|
<xsl:param name="message" as="xs:string"/>
|
||||||
|
|
||||||
<xsl:sequence select="concat('[Foundry ', $level, '] ', $message)"/>
|
<xsl:variable name="log-level" select="foundry:get-setting('', 'log-level')"/>
|
||||||
</xsl:function>
|
|
||||||
|
|
||||||
<foundry:doc section="devel" type="function">
|
<xsl:if test="foundry:log-level($log-level) >= foundry:log-level($msg-level)">
|
||||||
|
<xsl:message>
|
||||||
|
<xsl:value-of select="concat('[Foundry ', upper-case($log-level), '] ', $message)"/>
|
||||||
|
</xsl:message>
|
||||||
|
</xsl:if>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:template name="foundry:message-debug">
|
||||||
|
<xsl:param name="message" as="xs:string"/>
|
||||||
|
|
||||||
|
<xsl:call-template name="foundry:message">
|
||||||
|
<xsl:with-param name="msg-level" select="'debug'"/>
|
||||||
|
<xsl:with-param name="message" select="$message"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<foundry:doc section="devel" type="function-template">
|
||||||
<foundry:doc-params>
|
<foundry:doc-params>
|
||||||
<foundry:doc-param name="message"
|
<foundry:doc-param name="message"
|
||||||
mandatory="yes"
|
mandatory="yes"
|
||||||
|
|
@ -317,15 +338,11 @@
|
||||||
</foundry:doc-result>
|
</foundry:doc-result>
|
||||||
<foundry:doc-desc>
|
<foundry:doc-desc>
|
||||||
<p>
|
<p>
|
||||||
Helper function to generate an info message. This function be used together with
|
Helper function to generate an info message. This template generates a
|
||||||
<code><xsl:message></code> to output a message in the CCM log. Example:
|
<code><xsl:message></code> element which causes the XSL processor to output
|
||||||
|
a message in the application server log. The message will on shown if the log level
|
||||||
|
in the global configuration is set to <code>info</code> or <code>error</code>.
|
||||||
</p>
|
</p>
|
||||||
<pre>
|
|
||||||
...
|
|
||||||
<xsl:message>
|
|
||||||
<xsl:message select="foundry:message-info('Hello from Foundry')" />
|
|
||||||
</xsl:message>
|
|
||||||
</pre>
|
|
||||||
</foundry:doc-desc>
|
</foundry:doc-desc>
|
||||||
<foundry:doc-see-also>
|
<foundry:doc-see-also>
|
||||||
#foundry-message-warn
|
#foundry-message-warn
|
||||||
|
|
@ -334,11 +351,14 @@
|
||||||
#foundry-message-error
|
#foundry-message-error
|
||||||
</foundry:doc-see-also>
|
</foundry:doc-see-also>
|
||||||
</foundry:doc>
|
</foundry:doc>
|
||||||
<xsl:function name="foundry:message-info" as="xs:string">
|
<xsl:template name="foundry:message-info">
|
||||||
<xsl:param name="message" as="xs:string"/>
|
<xsl:param name="message" as="xs:string"/>
|
||||||
|
|
||||||
<xsl:sequence select="foundry:message('INFO', $message)"/>
|
<xsl:call-template name="foundry:message">
|
||||||
</xsl:function>
|
<xsl:with-param name="msg-level" select="'info'"/>
|
||||||
|
<xsl:with-param name="message" select="$message"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
<foundry:doc section="devel" type="function">
|
<foundry:doc section="devel" type="function">
|
||||||
<foundry:doc-params>
|
<foundry:doc-params>
|
||||||
|
|
@ -374,11 +394,14 @@
|
||||||
#foundry-message-error
|
#foundry-message-error
|
||||||
</foundry:doc-see-also>
|
</foundry:doc-see-also>
|
||||||
</foundry:doc>
|
</foundry:doc>
|
||||||
<xsl:function name="foundry:message-warn" as="xs:string">
|
<xsl:template name="foundry:message-warn">
|
||||||
<xsl:param name="message" as="xs:string"/>
|
<xsl:param name="message" as="xs:string"/>
|
||||||
|
|
||||||
<xsl:sequence select="foundry:message('WARNING', $message)"/>
|
<xsl:call-template name="foundry:message">
|
||||||
</xsl:function>
|
<xsl:with-param name="msg-level" select="'warn'"/>
|
||||||
|
<xsl:with-param name="message" select="$message"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
<foundry:doc section="devel" type="function">
|
<foundry:doc section="devel" type="function">
|
||||||
<foundry:doc-params>
|
<foundry:doc-params>
|
||||||
|
|
@ -415,12 +438,40 @@
|
||||||
#foundry-message-warn
|
#foundry-message-warn
|
||||||
</foundry:doc-see-also>
|
</foundry:doc-see-also>
|
||||||
</foundry:doc>
|
</foundry:doc>
|
||||||
<xsl:function name="foundry:message-error" as="xs:string">
|
<xsl:template name="foundry:message-error">
|
||||||
<xsl:param name="message" as="xs:string"/>
|
<xsl:param name="message" as="xs:string"/>
|
||||||
|
|
||||||
<xsl:sequence select="foundry:message('ERROR', $message)"/>
|
<xsl:call-template name="foundry:message">
|
||||||
|
<xsl:with-param name="msg-level" select="'error'"/>
|
||||||
|
<xsl:with-param name="message" select="$message"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
<xsl:function name="foundry:log-level" as="xs:integer">
|
||||||
|
<xsl:param name="level"/>
|
||||||
|
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="lower-case($level) = 'error'">
|
||||||
|
<xsl:sequence select="0"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="lower-case($level) = 'warn'">
|
||||||
|
<xsl:sequence select="1"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="lower-case($level) = 'info'">
|
||||||
|
<xsl:sequence select="2"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:when test="lower-case($level) = 'debug'">
|
||||||
|
<xsl:sequence select="3"/>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<xsl:sequence select="-1"/>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
|
||||||
</xsl:function>
|
</xsl:function>
|
||||||
|
|
||||||
|
<!-- End templates for outputting log messages -->
|
||||||
|
|
||||||
<foundry:doc section="devel" type="function">
|
<foundry:doc section="devel" type="function">
|
||||||
<foundry:doc-params>
|
<foundry:doc-params>
|
||||||
<foundry:doc-param name="node">
|
<foundry:doc-param name="node">
|
||||||
|
|
@ -604,16 +655,23 @@
|
||||||
<xsl:sequence select="document(foundry:gen-path(concat('conf/', $module, '.xml', '')))/foundry:configuration/setting[@id=$setting]"/>
|
<xsl:sequence select="document(foundry:gen-path(concat('conf/', $module, '.xml', '')))/foundry:configuration/setting[@id=$setting]"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:message>
|
<xsl:choose>
|
||||||
<xsl:choose>
|
<xsl:when test="$module = ''">
|
||||||
<xsl:when test="$module=''">
|
<xsl:message>
|
||||||
<xsl:sequence select="foundry:message-warn(concat('Setting "', $setting, '" not found in global.xml'))"/>
|
<xsl:value-of select="concat('[WARN] Setting "',
|
||||||
</xsl:when>
|
$setting,
|
||||||
<xsl:otherwise>
|
'" not found in global.xml')"/>
|
||||||
<xsl:sequence select="foundry:message-warn(concat('Setting "', $setting, '" not found in ', $module, '.xml'))"/>
|
</xsl:message>
|
||||||
</xsl:otherwise>
|
</xsl:when>
|
||||||
</xsl:choose>
|
<xsl:otherwise>
|
||||||
</xsl:message>
|
<xsl:message>
|
||||||
|
<xsl:value-of select="concat('[WARN] Setting "',
|
||||||
|
$setting,
|
||||||
|
'" not found in ',
|
||||||
|
$module, '.xml')"/>
|
||||||
|
</xsl:message>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
|
||||||
<xsl:sequence select="$default"/>
|
<xsl:sequence select="$default"/>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
|
|
@ -625,10 +683,6 @@
|
||||||
<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>
|
||||||
|
|
||||||
|
|
@ -708,39 +762,18 @@
|
||||||
then 'internal'
|
then 'internal'
|
||||||
else ''"/>
|
else ''"/>
|
||||||
|
|
||||||
<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 ',
|
|
||||||
foundry:gen-path(concat('texts/',
|
|
||||||
$module,
|
|
||||||
'.xml')),
|
|
||||||
'/foundry:static-texts/text[@id=', $id, ']/translation[@lang = ', $lang, ']'))"/>
|
|
||||||
</xsl:message>
|
|
||||||
|
|
||||||
|
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$module = '' and document(foundry:gen-path('texts/global.xml', $origin))/foundry:static-texts/text[@id=$id]/translation[@lang=$lang]">
|
<xsl:when test="$module = '' and document(foundry:gen-path('texts/global.xml', $origin))/foundry:static-texts/text[@id=$id]/translation[@lang=$lang]">
|
||||||
<xsl:message>
|
|
||||||
<xsl:value-of select="'using global.xml for texts...'"/>
|
|
||||||
</xsl:message>
|
|
||||||
<xsl:sequence select="document(foundry:gen-path('texts/global.xml', $origin))/foundry:static-texts/text[@id=$id]/translation[@lang=$lang]"/>
|
<xsl:sequence select="document(foundry:gen-path('texts/global.xml', $origin))/foundry:static-texts/text[@id=$id]/translation[@lang=$lang]"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="not($module = '') and document(foundry:gen-path(concat('texts/', $module, '.xml'), $origin))/foundry:static-texts/text[@id=$id]/translation[@lang=$lang]">
|
<xsl:when test="not($module = '') and document(foundry:gen-path(concat('texts/', $module, '.xml'), $origin))/foundry:static-texts/text[@id=$id]/translation[@lang=$lang]">
|
||||||
<xsl:sequence select="document(foundry:gen-path(concat('texts/', $module, '.xml'), $origin))/foundry:static-texts/text[@id=$id]/translation[@lang=$lang]"/>
|
<xsl:sequence select="document(foundry:gen-path(concat('texts/', $module, '.xml'), $origin))/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">
|
||||||
<xsl:message>
|
|
||||||
<xsl:value-of select="'Otherwise w/ html'"/>
|
|
||||||
</xsl:message>
|
|
||||||
<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"/>
|
||||||
|
|
@ -759,9 +792,6 @@
|
||||||
|
|
||||||
</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>
|
||||||
|
|
@ -790,15 +820,9 @@
|
||||||
<xsl:function name="foundry:debug-enabled" as="xs:boolean">
|
<xsl:function name="foundry:debug-enabled" as="xs:boolean">
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="contains($theme-prefix, 'devel-themedir')">
|
<xsl:when test="contains($theme-prefix, 'devel-themedir')">
|
||||||
<xsl:message>
|
|
||||||
debug mode active
|
|
||||||
</xsl:message>
|
|
||||||
<xsl:sequence select="true()"/>
|
<xsl:sequence select="true()"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:otherwise>
|
<xsl:otherwise>
|
||||||
<xsl:message>
|
|
||||||
debug mode NOT active
|
|
||||||
</xsl:message>
|
|
||||||
<xsl:sequence select="false()"/>
|
<xsl:sequence select="false()"/>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
|
|
@ -835,7 +859,7 @@
|
||||||
<xsl:param name="prefix"/>
|
<xsl:param name="prefix"/>
|
||||||
|
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="starts-with($link, 'http://')">
|
<xsl:when test="starts-with($link, 'http://')">
|
||||||
<xsl:sequence select="$link"/>
|
<xsl:sequence select="$link"/>
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
|
|
||||||
|
|
@ -918,13 +942,6 @@
|
||||||
<xsl:function name="foundry:shying" as="xs:string">
|
<xsl:function name="foundry:shying" as="xs:string">
|
||||||
<xsl:param name="text" as="xs:string"/>
|
<xsl:param name="text" as="xs:string"/>
|
||||||
|
|
||||||
<xsl:message>
|
|
||||||
<xsl:sequence select="concat('foundry:shying called with ', $text)"/>
|
|
||||||
</xsl:message>
|
|
||||||
<xsl:message>
|
|
||||||
<xsl:sequence select="concat('Result: ', translate($text, '\-', '­'))"/>
|
|
||||||
</xsl:message>
|
|
||||||
|
|
||||||
<xsl:sequence select="translate($text, '\-', '­')"/>
|
<xsl:sequence select="translate($text, '\-', '­')"/>
|
||||||
</xsl:function>
|
</xsl:function>
|
||||||
|
|
||||||
|
|
@ -1120,7 +1137,6 @@
|
||||||
</xsl:when>
|
</xsl:when>
|
||||||
<xsl:when test="$length - $limit > $min-length">
|
<xsl:when test="$length - $limit > $min-length">
|
||||||
<!-- Truncate to length - limit -->
|
<!-- Truncate to length - limit -->
|
||||||
<xsl:message>truncate length - limit</xsl:message>
|
|
||||||
<xsl:variable name="part-length">
|
<xsl:variable name="part-length">
|
||||||
<xsl:value-of select="(($limit - 3) div 2) - 1"/>
|
<xsl:value-of select="(($limit - 3) div 2) - 1"/>
|
||||||
</xsl:variable>
|
</xsl:variable>
|
||||||
|
|
|
||||||
|
|
@ -45,9 +45,10 @@
|
||||||
select="foundry:get-app-layout-template(foundry:get-current-application(),
|
select="foundry:get-app-layout-template(foundry:get-current-application(),
|
||||||
foundry:get-current-application-class())"/>
|
foundry:get-current-application-class())"/>
|
||||||
|
|
||||||
<xsl:message>
|
<xsl:call-template name="foundry:message-debug">
|
||||||
<xsl:value-of select="concat('app-layout-template-file = ', $app-layout-template-file)"/>
|
<xsl:with-param name="message"
|
||||||
</xsl:message>
|
select="concat('app-layout-template-file = ', $app-layout-template-file)"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="$app-layout-template-file = ''">
|
<xsl:when test="$app-layout-template-file = ''">
|
||||||
|
|
@ -95,9 +96,11 @@
|
||||||
<xsl:param name="application" as="xs:string"/>
|
<xsl:param name="application" as="xs:string"/>
|
||||||
<xsl:param name="class" as="xs:string"/>
|
<xsl:param name="class" as="xs:string"/>
|
||||||
|
|
||||||
<xsl:message>
|
<xsl:call-template name="foundry:message-debug">
|
||||||
<xsl:value-of select="concat('templates.xml path: ', foundry:gen-path('conf/templates.xml'))"/>
|
<xsl:with-param name="message"
|
||||||
</xsl:message>
|
select="concat('templates.xml path: ',
|
||||||
|
foundry:gen-path('conf/templates.xml'))"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="document(foundry:gen-path('conf/templates.xml'))/templates/applications/application[@name=$application and @class=$class]">
|
<xsl:when test="document(foundry:gen-path('conf/templates.xml'))/templates/applications/application[@name=$application and @class=$class]">
|
||||||
|
|
@ -123,12 +126,18 @@
|
||||||
<xsl:param name="application" as="xs:string"/>
|
<xsl:param name="application" as="xs:string"/>
|
||||||
<xsl:param name="class" as="xs:string"/>
|
<xsl:param name="class" as="xs:string"/>
|
||||||
|
|
||||||
<xsl:message>
|
<xsl:call-template name="foundry:message-debug">
|
||||||
<xsl:value-of select="concat('trying to determine origin for template file for application = ', $application, ' and class = ', $class)"/>
|
<xsl:with-param name="message"
|
||||||
</xsl:message>
|
select="concat('trying to determine origin for template file for application = ',
|
||||||
<xsl:message>
|
$application,
|
||||||
<xsl:value-of select="concat('using templates file: ', foundry:gen-path('conf/templates.xml'))"/>
|
' and class = ',
|
||||||
</xsl:message>
|
$class)"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
<xsl:call-template name="foundry:message-debug">
|
||||||
|
<xsl:with-param name="message"
|
||||||
|
select="concat('using template configuration file: ',
|
||||||
|
foundry:gen-path('conf/templates.xml'))"/>
|
||||||
|
</xsl:call-template>
|
||||||
|
|
||||||
<xsl:choose>
|
<xsl:choose>
|
||||||
<xsl:when test="document(foundry:gen-path('conf/templates.xml'))/templates/applications/application[@name=$application and @class=$class]
|
<xsl:when test="document(foundry:gen-path('conf/templates.xml'))/templates/applications/application[@name=$application and @class=$class]
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue