Syncing Foundry files
git-svn-id: https://svn.libreccm.org/ccm/trunk@2948 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
8fe17b54fd
commit
6b40d9159c
|
|
@ -48,7 +48,7 @@
|
|||
<xsl:if test="not(@method)">
|
||||
<xsl:attribute name="method">post</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:call-template name="foundry:process-attributes"/>
|
||||
<xsl:call-template name="foundry:process-datatree-attributes"/>
|
||||
<xsl:apply-templates/>
|
||||
</form>
|
||||
</xsl:template>
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
<!-- EN Processing images -->
|
||||
<xsl:template name="bebop:image" match="bebop:image">
|
||||
<img class="bebop-image">
|
||||
<xsl:call-template name="foundry:process-attributes"/>
|
||||
<xsl:call-template name="foundry:process-datatree-attributes"/>
|
||||
</img>
|
||||
</xsl:template>
|
||||
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@
|
|||
<xsl:param name="mode"/>
|
||||
|
||||
<span>
|
||||
<xsl:call-template name="foundry:process-attributes"/>
|
||||
<xsl:call-template name="foundry:process-datatree-attributes"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="$color != ''">
|
||||
<xsl:attribute name="style">
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@
|
|||
</xsl:variable>
|
||||
|
||||
<a>
|
||||
<xsl:call-template name="foundry:process-attributes"/>
|
||||
<xsl:call-template name="foundry:process-datatree-attributes"/>
|
||||
<xsl:attribute name="href" select="foundry:parse-link(./@href_no_javascript)"/>
|
||||
<xsl:attribute name="onclick">
|
||||
<xsl:value-of select="$onclick"/>
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@
|
|||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<ul class="bebop-list">
|
||||
<xsl:call-template name="foundry:process-attributes"/>
|
||||
<xsl:call-template name="foundry:process-datatree-attributes"/>
|
||||
<xsl:apply-templates mode="list"/>
|
||||
</ul>
|
||||
</xsl:otherwise>
|
||||
|
|
@ -61,7 +61,7 @@
|
|||
<!-- EN a horizontal list with spans -->
|
||||
<xsl:template match="bebop:list[@layout = 'horizontal']">
|
||||
<div>
|
||||
<xsl:call-template name="foundry:process-attributes"/>
|
||||
<xsl:call-template name="foundry:process-datatree-attributes"/>
|
||||
<xsl:apply-templates mode="span"/>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@
|
|||
<xsl:template match="bebop:segmentedPanel">
|
||||
<div class="bebop-segmented-panel">
|
||||
<!-- DE Verarbeite vorhandene Parameter -->
|
||||
<xsl:call-template name="foundry:process-attributes"/>
|
||||
<xsl:call-template name="foundry:process-datatree-attributes"/>
|
||||
<xsl:apply-templates/>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
|
@ -75,7 +75,7 @@
|
|||
the surrounding segmented panel. -->
|
||||
<xsl:template match="bebop:segment | bebop:section">
|
||||
<div class="bebop-segment">
|
||||
<xsl:call-template name="foundry:process-attributes"/>
|
||||
<xsl:call-template name="foundry:process-datatree-attributes"/>
|
||||
<xsl:apply-templates select="bebop:segmentHeader | bebop:heading" mode="segment"/>
|
||||
<xsl:apply-templates select="bebop:segmentBody | bebop:body" mode="segment"/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
<!-- EN Create a property list -->
|
||||
<xsl:template match="bebop:propertyList">
|
||||
<div class="bebop-property-list">
|
||||
<xsl:call-template name="foundry:process-attributes"/>
|
||||
<xsl:call-template name="foundry:process-datatree-attributes"/>
|
||||
<xsl:apply-templates/>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
correct order. -->
|
||||
<xsl:template match="bebop:table">
|
||||
<table>
|
||||
<xsl:call-template name="foundry:process-attributes"/>
|
||||
<xsl:call-template name="foundry:process-datatree-attributes"/>
|
||||
<xsl:apply-templates select="bebop:thead"/>
|
||||
<xsl:apply-templates select="bebop:tfoot"/>
|
||||
<xsl:apply-templates select="bebop:tbody"/>
|
||||
|
|
@ -55,7 +55,7 @@
|
|||
<xsl:template match="bebop:thead">
|
||||
<thead>
|
||||
<tr>
|
||||
<xsl:call-template name="foundry:process-attributes"/>
|
||||
<xsl:call-template name="foundry:process-datatree-attributes"/>
|
||||
<xsl:apply-templates mode="table-head"/>
|
||||
</tr>
|
||||
</thead>
|
||||
|
|
@ -65,7 +65,7 @@
|
|||
<!-- EN Table body -->
|
||||
<xsl:template match="bebop:tbody">
|
||||
<tbody>
|
||||
<xsl:call-template name="foundry:process-attributes"/>
|
||||
<xsl:call-template name="foundry:process-datatree-attributes"/>
|
||||
<xsl:apply-templates/>
|
||||
</tbody>
|
||||
</xsl:template>
|
||||
|
|
@ -74,7 +74,7 @@
|
|||
<!-- EN Table footer -->
|
||||
<xsl:template match="bebop:tfoot">
|
||||
<tfoot>
|
||||
<xsl:call-template name="foundry:process-attributes"/>
|
||||
<xsl:call-template name="foundry:process-datatree-attributes"/>
|
||||
<xsl:apply-templates/>
|
||||
</tfoot>
|
||||
</xsl:template>
|
||||
|
|
@ -84,7 +84,7 @@
|
|||
<!-- EN Creates a table row. is able to set two different class attributes -->
|
||||
<xsl:template match="bebop:trow">
|
||||
<tr>
|
||||
<xsl:call-template name="foundry:process-attributes"/>
|
||||
<xsl:call-template name="foundry:process-datatree-attributes"/>
|
||||
<xsl:choose>
|
||||
<xsl:when test="(../@striped or ../../@class = 'dataTable')
|
||||
and (position() mod 2) = 1">
|
||||
|
|
@ -106,7 +106,7 @@
|
|||
<!-- EN A table cell for table header -->
|
||||
<xsl:template match="bebop:cell" mode="table-head">
|
||||
<th>
|
||||
<xsl:call-template name="foundry:process-attributes"/>
|
||||
<xsl:call-template name="foundry:process-datatree-attributes"/>
|
||||
<xsl:apply-templates select="."/>
|
||||
</th>
|
||||
</xsl:template>
|
||||
|
|
@ -115,7 +115,7 @@
|
|||
<!-- EN A table cell for table body or table footer -->
|
||||
<xsl:template match="bebop:cell" mode="table">
|
||||
<td>
|
||||
<xsl:call-template name="foundry:process-attributes"/>
|
||||
<xsl:call-template name="foundry:process-datatree-attributes"/>
|
||||
<xsl:apply-templates/>
|
||||
</td>
|
||||
</xsl:template>
|
||||
|
|
@ -127,7 +127,7 @@
|
|||
These special versions of bebop:cell are defined in the corresponding template file
|
||||
of Mandalay. -->
|
||||
<xsl:template match="bebop:cell">
|
||||
<!--<xsl:call-template name="foundry:process-attributes"/>-->
|
||||
<!--<xsl:call-template name="foundry:process-datatree-attributes"/>-->
|
||||
<xsl:apply-templates/>
|
||||
</xsl:template>
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
|
||||
<!-- EN
|
||||
Processing bebop widgets. Because bebop is recreating the html attributes,
|
||||
most of the attributes can be simply copied by foundry:process-attributes.
|
||||
most of the attributes can be simply copied by foundry:process-datatree-attributes.
|
||||
This is especially true for <input>.
|
||||
-->
|
||||
|
||||
|
|
@ -68,7 +68,7 @@
|
|||
<!-- EN Create a radio button with all given attributes -->
|
||||
<xsl:template match="bebop:radio">
|
||||
<input type="radio" id="{@name}:{@value}">
|
||||
<xsl:call-template name="foundry:process-attributes"/>
|
||||
<xsl:call-template name="foundry:process-datatree-attributes"/>
|
||||
<xsl:for-each select="../@readonly | ../@disabled | ../@title | ../@onclick">
|
||||
<xsl:attribute name="{name()}">
|
||||
<xsl:value-of select="."/>
|
||||
|
|
@ -92,7 +92,7 @@
|
|||
<!-- EN Create a checkbox with all given attributes -->
|
||||
<xsl:template match="bebop:checkbox">
|
||||
<input type="checkbox" id="{@name}:{@value}">
|
||||
<xsl:call-template name="foundry:process-attributes"/>
|
||||
<xsl:call-template name="foundry:process-datatree-attributes"/>
|
||||
<xsl:for-each select="../@readonly | ../@disabled | ../@title | ../@onclick">
|
||||
<xsl:attribute name="{name()}">
|
||||
<xsl:value-of select="."/>
|
||||
|
|
@ -144,7 +144,7 @@
|
|||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<select id="@name">
|
||||
<xsl:call-template name="foundry:process-attributes"/>
|
||||
<xsl:call-template name="foundry:process-datatree-attributes"/>
|
||||
<xsl:apply-templates/>
|
||||
</select>
|
||||
</xsl:otherwise>
|
||||
|
|
@ -155,7 +155,7 @@
|
|||
<!-- EN Create an entry for a select widget -->
|
||||
<xsl:template match="bebop:option">
|
||||
<option>
|
||||
<xsl:call-template name="foundry:process-attributes"/>
|
||||
<xsl:call-template name="foundry:process-datatree-attributes"/>
|
||||
<xsl:apply-templates/>
|
||||
</option>
|
||||
</xsl:template>
|
||||
|
|
@ -172,7 +172,7 @@
|
|||
<xsl:with-param name="widget" select="."/>
|
||||
</xsl:call-template>
|
||||
<input>
|
||||
<xsl:call-template name="foundry:process-attributes"/>
|
||||
<xsl:call-template name="foundry:process-datatree-attributes"/>
|
||||
<!-- DE Besondere Behandlung von Submit-Button Double-Click-Protection -->
|
||||
<!-- EN Special processing for submit button: doble click protection -->
|
||||
<xsl:if test="$dcp-on-buttons and @type='submit' and boolean(@onclick)=false()">
|
||||
|
|
@ -191,7 +191,7 @@
|
|||
<xsl:with-param name="widget" select="."/>
|
||||
</xsl:call-template>
|
||||
<textarea>
|
||||
<xsl:call-template name="foundry:process-attributes"/>
|
||||
<xsl:call-template name="foundry:process-datatree-attributes"/>
|
||||
<xsl:value-of select="@value"/>
|
||||
</textarea>
|
||||
</xsl:template>
|
||||
|
|
@ -238,7 +238,7 @@
|
|||
|
||||
<xsl:template match="bebop:fieldset">
|
||||
<fieldset>
|
||||
<xsl:call-template name="foundry:process-attributes"/>
|
||||
<xsl:call-template name="foundry:process-datatree-attributes"/>
|
||||
<legend>
|
||||
<xsl:value-of select="@legend"/>
|
||||
</legend>
|
||||
|
|
|
|||
|
|
@ -35,10 +35,12 @@ processor, some are read from the configuration files of Foundry and some are de
|
|||
version="2.0">
|
||||
|
||||
<!-- Foundry internal variables -->
|
||||
<foundry:doc section="devel">
|
||||
<foundry:doc section="devel" type="env-var">
|
||||
<foundry:doc-desc>
|
||||
<p>
|
||||
The version of Foundry. Kept in sync with the version of CCM, so the first version
|
||||
was be 2.2.3.
|
||||
</p>
|
||||
</foundry:doc-desc>
|
||||
</foundry:doc>
|
||||
<xsl:variable name="foundry-version" select="'2.2.3-SNAPSHOT'"/>
|
||||
|
|
@ -46,10 +48,12 @@ processor, some are read from the configuration files of Foundry and some are de
|
|||
<!-- **************************************************************************** -->
|
||||
|
||||
<!-- CCM Environment variables -->
|
||||
<foundry:doc section="devel">
|
||||
<foundry:doc section="devel" type="env-var">
|
||||
<foundry:doc-desc>
|
||||
<p>
|
||||
The path the to theme file. This path is used at several points to load files which are
|
||||
part of the theme, like CSS files, images and fonts.
|
||||
</p>
|
||||
</foundry:doc-desc>
|
||||
</foundry:doc>
|
||||
<xsl:param name="theme-prefix"/>
|
||||
|
|
|
|||
|
|
@ -94,8 +94,26 @@
|
|||
Common helper templates/functions for all templates tags
|
||||
-->
|
||||
|
||||
<foundry:doc section="devel" type="function-template">
|
||||
<foundry:doc-param name="current-layout-node">
|
||||
<p>
|
||||
The layout node to use. Defaults the the current node.
|
||||
</p>
|
||||
</foundry:doc-param>
|
||||
<foundry:doc-param name="attributes">
|
||||
<p>
|
||||
The attributes to copy separated by an empty space. For example:
|
||||
<code>autofocus disabled form formaction formenctype formmethod formnovalidate formtarget name type value</code>.
|
||||
</p>
|
||||
</foundry:doc-param>
|
||||
<foundry:doc-desc>
|
||||
<p>
|
||||
A helper template for copying attributes from the layout tree to the result tree.
|
||||
</p>
|
||||
</foundry:doc-desc>
|
||||
</foundry:doc>
|
||||
<xsl:template name="foundry:copy-attributes">
|
||||
<xsl:param name="current-layout-node" select="."/>
|
||||
<xsl:param name="current-layout-node" select="current()"/>
|
||||
<xsl:param name="attributes" select="''"/>
|
||||
|
||||
<xsl:for-each select="tokenize($attributes, ' ')">
|
||||
|
|
@ -104,6 +122,11 @@
|
|||
</xsl:template>
|
||||
|
||||
<foundry:doc section="devel" type="function-template">
|
||||
<foundry:doc-param name="current-layout-node">
|
||||
<p>
|
||||
The layout node to use. Defaults the the current node.
|
||||
</p>
|
||||
</foundry:doc-param>
|
||||
<foundry:doc-desc>
|
||||
<p>
|
||||
Helper template for copying <code>data-</code> attributes from the the layout XML
|
||||
|
|
@ -113,11 +136,131 @@
|
|||
<foundry:doc-see-also>http://www.w3.org/TR/html5/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes</foundry:doc-see-also>
|
||||
</foundry:doc>
|
||||
<xsl:template name="foundry:copy-data-attributes">
|
||||
<xsl:param name="current-layout-node" select="."/>
|
||||
<xsl:param name="current-layout-node" select="current()"/>
|
||||
|
||||
<xsl:copy-of select="$current-layout-node/@*[starts-with(name(), 'data-')]"/>
|
||||
</xsl:template>
|
||||
|
||||
<foundry:doc section="devel" type="function">
|
||||
<foundry:doc-desc>
|
||||
<p>
|
||||
Variant of <code>foundry:gen-src-url</code> without the <code>parameters</code> string
|
||||
parameter.
|
||||
</p>
|
||||
</foundry:doc-desc>
|
||||
</foundry:doc>
|
||||
<xsl:function name="foundry:gen-src-url">
|
||||
<xsl:param name="src-raw" as="xs:string"/>
|
||||
|
||||
<xsl:sequence select="foundry:gen-src-url($src-raw, '')"/>
|
||||
</xsl:function>
|
||||
|
||||
<foundry:doc section="devel" type="function">
|
||||
<foundry:doc-params>
|
||||
<foundry:doc-param name="src-raw" mandatory="yes" type="string">
|
||||
<p>
|
||||
The raw URL to process.
|
||||
</p>
|
||||
</foundry:doc-param>
|
||||
<foundry:doc-param name="parameters" mandatory="yes" type="string">
|
||||
<p>
|
||||
Parameters to append to the URL.
|
||||
</p>
|
||||
</foundry:doc-param>
|
||||
</foundry:doc-params>
|
||||
<foundry:doc-result type="string">
|
||||
<p>
|
||||
The processed URL.
|
||||
</p>
|
||||
</foundry:doc-result>
|
||||
<foundry:doc-desc>
|
||||
<p>
|
||||
Processes a given URL for use in the <code>src</code> attribute of an
|
||||
<code>audio</code>, <code>img</code> or <code>video</code> element. The function
|
||||
distigushes between this cases:
|
||||
</p>
|
||||
<dl>
|
||||
<dt>The URL starts with <code>http://</code> or <code>https://</code></dt>
|
||||
<dd>
|
||||
In this case the URL is threated as an absolute URL pointing to a resource
|
||||
outside of CCM. If any parameters are passed to the function they are appended
|
||||
to the URL.
|
||||
</dd>
|
||||
<dt>The URL starts with a slash (<code>/</code>)</dt>
|
||||
<dd>
|
||||
In this case the URL points to a resource managed by the CCM which also
|
||||
manages the theme. In this case the URL is prefixed with the
|
||||
<code>dispatcher-prefix</code> and the parameters, if any, are appended.
|
||||
</dd>
|
||||
<dt>Other cases</dt>
|
||||
<dd>
|
||||
If none of the two other cases match the URL points to a URL in the theme. In
|
||||
this case the URL is processed by the
|
||||
<a href="#gen-path">
|
||||
<code>gen-path</code>
|
||||
</a> function. The parameters, if any
|
||||
are appended.
|
||||
</dd>
|
||||
</dl>
|
||||
<p>
|
||||
If parameters are passed to this function they are appended to the URL. The
|
||||
parameters are passed as string formatted as URL parameters, for example
|
||||
<code>foo=hello&bar=world</code>. A leading <code>?</code> or <code>&</code>
|
||||
is removed before adding the string the URL. If the URL already contains parameters
|
||||
(if the URL contains a <code>?</code>) the paramters string is added with a leading
|
||||
ampersand (<code>&</code>). If not the parameters are appended using a
|
||||
<code>?</code> character.
|
||||
</p>
|
||||
</foundry:doc-desc>
|
||||
</foundry:doc>
|
||||
<xsl:function name="foundry:gen-src-url">
|
||||
<xsl:param name="src-raw" as="xs:string"/>
|
||||
<xsl:param name="parameters" as="xs:string"/>
|
||||
|
||||
<xsl:variable name="src-url">
|
||||
<xsl:choose>
|
||||
<xsl:when test="starts-with($src-raw, 'http://')
|
||||
or starts-with($src-raw, 'https://')">
|
||||
<xsl:value-of select="$src-raw"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="starts-with($src-raw, '/')">
|
||||
<xsl:value-of select="concat($dispatcher-prefix, $src-raw)"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="foundry:gen-path($src-raw)"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:variable name="parameters-string">
|
||||
<xsl:choose>
|
||||
<xsl:when test="starts-with($parameters, '?') or starts-with($parameters, '&')">
|
||||
<xsl:value-of select="substring($parameters, 1)"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:value-of select="$parameters"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<xsl:choose>
|
||||
<xsl:when test="string-length($parameters-string) > 0">
|
||||
<xsl:choose>
|
||||
<xsl:when test="contains($src-url, '?')">
|
||||
<xsl:sequence select="concat($src-url, '&', $parameters-string)"/>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:sequence select="concat($src-url, '?', $parameters-string)"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:when>
|
||||
<xsl:otherwise>
|
||||
<xsl:sequence select="$src-url"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
|
||||
</xsl:function>
|
||||
|
||||
<foundry:doc section="devel" type="function-template">
|
||||
<foundry:doc-desc>
|
||||
Helper functions for generating the name of the colorset class.
|
||||
|
|
@ -198,7 +341,7 @@
|
|||
literally from the XML the HTML.
|
||||
</foundry:doc-desc>
|
||||
</foundry:doc>
|
||||
<xsl:template name="foundry:process-attributes">
|
||||
<xsl:template name="foundry:process-datatree-attributes">
|
||||
<xsl:for-each select="@*">
|
||||
<xsl:if test="(name() != 'href_no_javascript')
|
||||
and (name() != 'hint')
|
||||
|
|
@ -214,6 +357,61 @@
|
|||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
|
||||
<foundry:doc section="devel" type="function-template">
|
||||
<foundry:doc-param name="current-layout-node">
|
||||
<p>
|
||||
The layout node to process. Default the the current node.
|
||||
</p>
|
||||
</foundry:doc-param>
|
||||
<foundry:doc-param name="attributes">
|
||||
<p>
|
||||
Additional attributes to copy from the layout tree. <code>data</code> attributes
|
||||
(e.g.<code>data-toggle</code>) are
|
||||
copied automatically. Also <code>id</code> and <code>class</code> are already
|
||||
processed by this template.
|
||||
</p>
|
||||
</foundry:doc-param>
|
||||
<foundry:doc-desc>
|
||||
<p>
|
||||
A convenient helper template which calls three other helper templates:
|
||||
</p>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="#set-id-and-class">
|
||||
<code>foundry:set-id-and-class</code>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#copy-data-attributes">
|
||||
<code>foundry:copy-data-attributes</code>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#copy-attributes">
|
||||
<code>foundry:copy-attributes</code>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</foundry:doc-desc>
|
||||
</foundry:doc>
|
||||
<xsl:template name="foundry:process-layouttree-attributes">
|
||||
<xsl:param name="current-layout-node" select="current()"/>
|
||||
<xsl:param name="copy-attributes" select="''"/>
|
||||
|
||||
<xsl:call-template name="foundry:set-id-and-class">
|
||||
<xsl:with-param name="current-layout-node" select="$current-layout-node"/>
|
||||
</xsl:call-template>
|
||||
|
||||
<xsl:call-template name="foundry:copy-data-attributes">
|
||||
<xsl:with-param name="current-layout-node" select="$current-layout-node"/>
|
||||
</xsl:call-template>
|
||||
|
||||
<xsl:call-template name="foundry:copy-attributes">
|
||||
<xsl:with-param name="current-layout-node" select="$current-layout-node"/>
|
||||
<xsl:with-param name="attributes" select="$copy-attributes"/>
|
||||
</xsl:call-template>
|
||||
</xsl:template>
|
||||
|
||||
<foundry:doc section="devel" type="function-template">
|
||||
<foundry:doc-param name="template-file"
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@
|
|||
<xsl:if test="not(@method)">
|
||||
<xsl:attribute name="method">post</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:call-template name="foundry:process-attributes"/>
|
||||
<xsl:call-template name="foundry:process-datatree-attributes"/>
|
||||
<xsl:apply-templates select="$data-tree//bebop:currentPane/bebop:form//bebop:layoutPanel/bebop:body
|
||||
| $data-tree//bebop:currentPane/bebop:form//bebop:layoutPanel/bebop:right"/>
|
||||
</form>
|
||||
|
|
@ -86,7 +86,7 @@
|
|||
<xsl:if test="not(@method)">
|
||||
<xsl:attribute name="method">post</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:call-template name="foundry:process-attributes"/>
|
||||
<xsl:call-template name="foundry:process-datatree-attributes"/>
|
||||
<xsl:apply-templates select="$data-tree//bebop:currentPane/bebop:form//bebop:layoutPanel/bebop:left"/>
|
||||
</form>
|
||||
</xsl:when>
|
||||
|
|
|
|||
|
|
@ -68,6 +68,27 @@
|
|||
The third variant for providing an URL is to call the template with a href
|
||||
parameter in the XSL.
|
||||
</p>
|
||||
<p>
|
||||
Values for some other attributes can also be passed to the this template as XSL
|
||||
parameters:
|
||||
</p>
|
||||
<dl>
|
||||
<dt>
|
||||
<code>hreflang</code>
|
||||
</dt>
|
||||
<dd>Language of the resource the link is pointing to.</dd>
|
||||
<dt>
|
||||
<code>title</code>
|
||||
</dt>
|
||||
<dd>
|
||||
Value for the <code>title</code> attribute of the link. Usally this should
|
||||
a very brief description of the target of the link
|
||||
</dd>
|
||||
<dt>
|
||||
<code>type</code>
|
||||
</dt>
|
||||
<dd>The media type of the link target.</dd>
|
||||
</dl>
|
||||
</foundry:doc-desc>
|
||||
<foundry:doc-attributes>
|
||||
<foundry:doc-attribute name="download">
|
||||
|
|
@ -86,11 +107,6 @@
|
|||
A static URL for the link.
|
||||
</p>
|
||||
</foundry:doc-attribute>
|
||||
<foundry:doc-attribute name="href-lang">
|
||||
<p>
|
||||
The language of the target of the link.
|
||||
</p>
|
||||
</foundry:doc-attribute>
|
||||
<foundry:doc-attribute name="rel">
|
||||
<p>
|
||||
The relationship of the linking document with the target document.
|
||||
|
|
@ -106,26 +122,25 @@
|
|||
Static, not translated title of the link.
|
||||
</p>
|
||||
</foundry:doc-attribute>
|
||||
<foundry:doc-attribute name="type">
|
||||
<p>
|
||||
Value for the <code>title</code> attribute of the link.
|
||||
</p>
|
||||
</foundry:doc-attribute>
|
||||
</foundry:doc-attributes>
|
||||
<foundry:doc-see-also>
|
||||
<foundry:doc-link href="http://www.w3.org/TR/html5/text-level-semantics.html#the-a-element"/>
|
||||
<foundry:doc-link href="http://www.w3.org/TR/html5/text-level-semantics.html#the-a-element">
|
||||
Description of the <code>a</code> element in the HTML5 specification.
|
||||
</foundry:doc-link>
|
||||
</foundry:doc-see-also>
|
||||
</foundry:doc>
|
||||
<xsl:template match="a">
|
||||
<xsl:param name="href" select="''" tunnel="yes"/>
|
||||
<xsl:param name="hreflang" select="''" tunnel="yes"/>
|
||||
<xsl:param name="title" select="''" tunnel="yes"/>
|
||||
<xsl:param name="type" select="''" tunnel="yes"/>
|
||||
|
||||
<a>
|
||||
<xsl:if test="./@download">
|
||||
<!--<xsl:if test="./@download">
|
||||
<xsl:attribute name="download">
|
||||
<xsl:value-of select="./@download"/>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
</xsl:if>-->
|
||||
<xsl:if test="./@href-property">
|
||||
<xsl:attribute name="href">
|
||||
<xsl:value-of select="$data-tree/*[name = ./@href-property]"/>
|
||||
|
|
@ -141,16 +156,16 @@
|
|||
<xsl:value-of select="$href"/>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:if test="./@href-lang">
|
||||
<xsl:if test="string-length($hreflang) > 0">
|
||||
<xsl:attribute name="hreflang">
|
||||
<xsl:value-of select="./@href-lang"/>
|
||||
<xsl:value-of select="$hreflang"/>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:if test="./@rel">
|
||||
<!--<xsl:if test="./@rel">
|
||||
<xsl:attribute name="rel">
|
||||
<xsl:value-of select="./@rel"/>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
</xsl:if>-->
|
||||
<xsl:if test="./title-static">
|
||||
<xsl:attribute name="title">
|
||||
<xsl:value-of select="foundry:get-static-text('', ./@static-title)"/>
|
||||
|
|
@ -161,65 +176,158 @@
|
|||
<xsl:value-of select="$title"/>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:if test="./@type">
|
||||
<xsl:if test="string-length($type) > 0">
|
||||
<xsl:attribute name="type">
|
||||
<xsl:value-of select="./@type"/>
|
||||
<xsl:value-of select="$type"/>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
<xsl:call-template name="foundry:set-id-and-class"/>
|
||||
<xsl:call-template name="foundry:process-layouttree-attributes">
|
||||
<xsl:with-param name="copy-attributes"
|
||||
select="'download rel type'"/>
|
||||
</xsl:call-template>
|
||||
<xsl:apply-templates/>
|
||||
</a>
|
||||
</xsl:template>
|
||||
|
||||
<foundry:doc>
|
||||
<foundry:doc section="user" type="template-tag">
|
||||
<foundry:doc-desc>
|
||||
<p>
|
||||
Generates a HTML <code>abbr</code> element used to tag abbreviations.
|
||||
</p>
|
||||
</foundry:doc-desc>
|
||||
<foundry:doc-see-also>
|
||||
<foundry:doc-link href="http://www.w3.org/TR/html5/text-level-semantics.html#the-abbr-element">
|
||||
Description of the <code>abbr</code> element in the HTML 5 specification.
|
||||
</foundry:doc-link>
|
||||
</foundry:doc-see-also>
|
||||
</foundry:doc>
|
||||
<xsl:template match="abbr">
|
||||
<abbr>
|
||||
<xsl:call-template name="foundry:process-layouttree-attributes"/>
|
||||
<xsl:apply-templates/>
|
||||
</abbr>
|
||||
</xsl:template>
|
||||
|
||||
<foundry:doc section="user" type="template-tag">
|
||||
<foundry:doc-desc>
|
||||
<p>
|
||||
Generates a <code>address</code> element in the HTML output.
|
||||
The <code>address</code> elements represents the contact information of the
|
||||
responsible author of <code>article</code> or <code>body</code> it appears in.
|
||||
</p>
|
||||
</foundry:doc-desc>
|
||||
<foundry:doc-see-also>
|
||||
<foundry:doc-link href="http://www.w3.org/TR/html5/sections.html#the-address-element">
|
||||
Description of the <code>address</code> element in the HTML5 specification
|
||||
</foundry:doc-link>
|
||||
</foundry:doc-see-also>
|
||||
</foundry:doc>
|
||||
<xsl:template match="address">
|
||||
<address>
|
||||
<xsl:call-template name="foundry:process-layouttree-attributes"/>
|
||||
<xsl:apply-templates/>
|
||||
</address>
|
||||
</xsl:template>
|
||||
|
||||
<foundry:doc section="user" type="template-tag">
|
||||
<foundry:doc-desc>
|
||||
<p>
|
||||
Generates the HTML5 <code>article</code> element.
|
||||
</p>
|
||||
</foundry:doc-desc>
|
||||
<foundry:doc-see-also>
|
||||
<foundry:doc-link href="http://www.w3.org/TR/html5/sections.html#the-article-element"/>
|
||||
<foundry:doc-link href="http://www.w3.org/TR/html5/sections.html#the-article-element">
|
||||
Description of the <code>article</code> element in the HTML5 specification
|
||||
</foundry:doc-link>
|
||||
</foundry:doc-see-also>
|
||||
</foundry:doc>
|
||||
<xsl:template match="article">
|
||||
<xsl:param name="article-id" select="''"/>
|
||||
|
||||
<article>
|
||||
<!--
|
||||
We are not using the foundry:process-layout-attributes template here because we
|
||||
have to handle the id attribute in special way here. The id if maybe provided using
|
||||
a XSL parameter.
|
||||
-->
|
||||
<xsl:call-template name="foundry:set-id-and-class">
|
||||
<xsl:with-param name="id" select="$article-id"/>
|
||||
</xsl:call-template>
|
||||
<xsl:call-template name="foundry:copy-data-attributes"/>
|
||||
<xsl:apply-templates/>
|
||||
</article>
|
||||
</xsl:template>
|
||||
|
||||
<foundry:doc section="user" type="template-tag">
|
||||
<foundry:doc-desc>
|
||||
Generates a HTML5 <code>aside</code> element.
|
||||
<p>
|
||||
Generates a HTML5 <code>aside</code> element.
|
||||
</p>
|
||||
</foundry:doc-desc>
|
||||
<foundry:doc-see-also>
|
||||
<foundry:doc-link href="http://www.w3.org/TR/html5/sections.html#the-aside-element"/>
|
||||
<foundry:doc-link href="http://www.w3.org/TR/html5/sections.html#the-aside-element">
|
||||
Description of the <code>aside</code> element in the HTML5 specification.
|
||||
</foundry:doc-link>
|
||||
</foundry:doc-see-also>
|
||||
</foundry:doc>
|
||||
<xsl:template match="aside">
|
||||
<aside>
|
||||
<xsl:call-template name="foundry:set-id-and-class"/>
|
||||
<xsl:call-template name="foundry:process-layouttree-attributes"/>
|
||||
<xsl:apply-templates/>
|
||||
</aside>
|
||||
</xsl:template>
|
||||
|
||||
<xsl:template match="audio">
|
||||
<!-- Source URL of the audio document provided by a surrounding tag -->
|
||||
<xsl:param name="src" tunnel="yes" as="xs:string" select="''"/>
|
||||
|
||||
<xsl:variable name="src-raw">
|
||||
<xsl:choose>
|
||||
<xsl:when test="$src != ''">
|
||||
<xsl:value-of select="$src"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="./@src-static">
|
||||
<xsl:value-of select="./@src-static"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="./@src-property">
|
||||
<xsl:value-of select="$data-tree/*[name() = ./@src-property]"/>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
<!--
|
||||
Generate src of the audio document. If the path is not an external path (a path starting
|
||||
with http:// or https://) add the theme-prefix or the dispatcher prefix. The
|
||||
dispatcher-prefix is added ifthe path does start with a slash (/). This indicates
|
||||
that the audio file is served from the CCM database. If the path does *not* start with a
|
||||
slash the audio file is part of the theme and the theme-prefix is added.
|
||||
-->
|
||||
<!--<xsl:variable name="audio-src">
|
||||
|
||||
</xsl:variable>-->
|
||||
|
||||
<audio>
|
||||
|
||||
</audio>
|
||||
</xsl:template>
|
||||
|
||||
<foundry:doc section="user" type="template-tag">
|
||||
<foundry:doc-desc>
|
||||
Generates the HTML <code>body</code> element.
|
||||
<p>
|
||||
Generates the HTML <code>body</code> element.
|
||||
</p>
|
||||
</foundry:doc-desc>
|
||||
<foundry:doc-see-also>
|
||||
<foundry:doc-link href="http://www.w3.org/TR/html5/sections.html#the-body-element"/>
|
||||
<foundry:doc-link href="http://www.w3.org/TR/html5/sections.html#the-body-element">
|
||||
Description of the <code>body</code> element in the HTML5 specification.
|
||||
</foundry:doc-link>
|
||||
</foundry:doc-see-also>
|
||||
</foundry:doc>
|
||||
<xsl:template match="body">
|
||||
|
||||
|
||||
<body>
|
||||
<xsl:call-template name="foundry:set-id-and-class"/>
|
||||
<xsl:call-template name="foundry:process-layouttree-attributes"/>
|
||||
|
||||
<xsl:if test="foundry:debug-enabled()">
|
||||
<div id="foundry-debug-panel">
|
||||
|
|
@ -300,12 +408,23 @@
|
|||
</body>
|
||||
</xsl:template>
|
||||
|
||||
<foundry:doc section="user" type="template-tag">
|
||||
<foundry:doc-desc>
|
||||
<p>
|
||||
Generates a button element.
|
||||
</p>
|
||||
</foundry:doc-desc>
|
||||
<foundry:doc-see-also>
|
||||
<foundry:doc-link href="http://www.w3.org/TR/html5/forms.html#the-button-element">
|
||||
Description of the <code>button</code> element in the HTML5 specification.
|
||||
</foundry:doc-link>
|
||||
</foundry:doc-see-also>
|
||||
</foundry:doc>
|
||||
<xsl:template match="button">
|
||||
<button>
|
||||
<xsl:call-template name="foundry:set-id-and-class"/>
|
||||
<xsl:call-template name="foundry:copy-data-attributes"/>
|
||||
<xsl:call-template name="foundry:copy-attributes">
|
||||
<xsl:with-param name="attributes" select="'autofocus disabled form formaction formenctype formmethod formnovalidate formtarget name type value'"/>
|
||||
<xsl:call-template name="foundry:process-layouttree-attributes">
|
||||
<xsl:with-param name="copy-attributes"
|
||||
select="'autofocus disabled form formaction formenctype formmethod formnovalidate formtarget name type value'"/>
|
||||
</xsl:call-template>
|
||||
<xsl:apply-templates/>
|
||||
</button>
|
||||
|
|
@ -317,12 +436,14 @@
|
|||
Generates a HTML <code>div</code> element.
|
||||
</foundry:doc-desc>
|
||||
<foundry:doc-see-also>
|
||||
<foundry:doc-link href="http://www.w3.org/TR/html5/grouping-content.html#the-div-element"/>
|
||||
<foundry:doc-link href="http://www.w3.org/TR/html5/grouping-content.html#the-div-element">
|
||||
Description of the <code>div</code> element in the HTML5 specification.
|
||||
</foundry:doc-link>
|
||||
</foundry:doc-see-also>
|
||||
</foundry:doc>
|
||||
<xsl:template match="div">
|
||||
<div>
|
||||
<xsl:call-template name="foundry:set-id-and-class"/>
|
||||
<xsl:call-template name="foundry:process-layouttree-attributes"/>
|
||||
<xsl:apply-templates/>
|
||||
</div>
|
||||
</xsl:template>
|
||||
|
|
@ -610,7 +731,7 @@
|
|||
<xsl:value-of select="./@src-static"/>
|
||||
</xsl:when>
|
||||
<xsl:when test="./@src-property">
|
||||
<xsl:value-of select="$data-tree/*[name = ./@src-property]"/>
|
||||
<xsl:value-of select="$data-tree/*[name() = ./@src-property]"/>
|
||||
</xsl:when>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
|
@ -685,6 +806,8 @@
|
|||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
Generate src URL of the image. If the path is not an external path (a path starting
|
||||
with http:// or https://) add the theme-prefix or the dispatcher-prefix. The
|
||||
|
|
@ -692,7 +815,9 @@
|
|||
that the image is served from the CCM database. If the path does *not* start with a
|
||||
slash the image is part of the theme and the theme-prefix is added.
|
||||
-->
|
||||
<xsl:variable name="img-src">
|
||||
<!-- Logic moved to the foundry:gen-src-url function in template-parser.xsl because the
|
||||
logic is also needed for other elements like audio and video-->
|
||||
<!--<xsl:variable name="img-src">
|
||||
<xsl:choose>
|
||||
<xsl:when test="substring($src-raw, 1, 7) = 'http://'
|
||||
or substring($src-raw, 1, 8) = 'https://'" >
|
||||
|
|
@ -721,7 +846,14 @@
|
|||
<xsl:value-of select="foundry:gen-path($src-raw)"/>
|
||||
</xsl:otherwise>
|
||||
</xsl:choose>
|
||||
</xsl:variable>
|
||||
</xsl:variable>-->
|
||||
|
||||
<xsl:variable name="img-src"
|
||||
select="foundry:gen-src-url($src-raw,
|
||||
concat('width=',
|
||||
$width,
|
||||
'&height=',
|
||||
$height))"/>
|
||||
|
||||
<img>
|
||||
|
||||
|
|
|
|||
|
|
@ -807,10 +807,10 @@ XSLT 2.0 functions.
|
|||
|
||||
</xsl:function>
|
||||
|
||||
<foundry:doc section="devel" type="function-template">
|
||||
<!--<foundry:doc section="devel" type="function-template">
|
||||
<foundry:doc-desc>
|
||||
<p>
|
||||
Helper template for processing additional attributes. This are copied from the result
|
||||
Helper template for processing additional attributes. This are copied from the data
|
||||
tree XML created by CCM to the HTML output generated by Foundry without any further
|
||||
processing.
|
||||
</p>
|
||||
|
|
@ -831,7 +831,7 @@ XSLT 2.0 functions.
|
|||
<xsl:sequence select="@name"/>
|
||||
</xsl:attribute>
|
||||
</xsl:if>
|
||||
</xsl:template>
|
||||
</xsl:template>-->
|
||||
|
||||
<foundry:doc section="devel" type="function">
|
||||
<xsl:doc-desc>
|
||||
|
|
|
|||
Loading…
Reference in New Issue