xref: /AOO41X/main/extras/source/misc_config/wizard/web/layouts/diagonal/index.html.xsl (revision 54628ca40d27d15cc98fe861da7fff7e60c2f7d6)
1<?xml version="1.0" encoding="UTF-8"?>
2<!--***********************************************************
3 *
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements.  See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership.  The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License.  You may obtain a copy of the License at
11 *
12 *   http://www.apache.org/licenses/LICENSE-2.0
13 *
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied.  See the License for the
18 * specific language governing permissions and limitations
19 * under the License.
20 *
21 ***********************************************************-->
22
23<xsl:stylesheet version="1.0"
24   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
25    xmlns="http://www.w3.org/1999/xhtml">
26
27    <xsl:output method               = "html"
28                media-type           = "text/html"
29                indent               = "yes"
30                doctype-public       = "-//W3C//DTD HTML 4.0 Transitional//EN"
31                omit-xml-declaration = "yes"
32                standalone           = "yes" />
33
34    <xsl:include href="../layout.xsl"/>
35
36
37     <!-- =============================
38                   HTML BODY
39     ================================== -->
40
41     <xsl:template name="body">
42       <xsl:call-template name="title"/>
43        <xsl:call-template name="toc"/>
44     </xsl:template>
45
46
47     <xsl:template name="toc">
48        <!--
49             @ pre toc html here
50        -->
51
52        <xsl:apply-templates select="/session/content/document"/>
53
54        <!--
55             @ post toc html here
56        -->
57
58     </xsl:template>
59
60    <!-- also when using groups, in the end it comes
61    to this template, which is called for each document -->
62    <xsl:template match="document">
63      <xsl:variable name="i" select="position() - 1"/>
64      <xsl:variable name="x" select="( $i mod 3 ) * 250 + 50"/>
65      <xsl:variable name="y" select="( $i mod 3 ) * 50 + (floor( $i div 3 )) * 300 + 80"/>
66      <div style="position:absolute; padding:15px; left:{$x}px; top:{$y}px; width:170px; height:220px; z-index:1" class="tcolor">
67        <div align="center">
68
69            <xsl:apply-templates select="@icon"/>
70            <p>
71            <xsl:apply-templates select="@title"/>
72            <xsl:apply-templates select="@description"/>
73            <xsl:apply-templates select="@author"/>
74            <xsl:apply-templates select="@create-date"/>
75            <xsl:apply-templates select="@update-date"/>
76            <xsl:apply-templates select="@filename"/>
77            <xsl:apply-templates select="@format"/>
78            <xsl:apply-templates select="@pages"/>
79            <xsl:apply-templates select="@size"/>
80            </p>
81          </div>
82      </div>
83    </xsl:template>
84
85
86
87     <xsl:template name="document-group">
88        <xsl:param name="group"/>
89
90        <!-- @ pre group code here -->
91
92        <!-- - - -->
93
94            <xsl:variable name="count" select="(position() - 1) * $group + 1"/>
95
96            <xsl:for-each select="/session/content/document[$count &lt;= position() and position() &lt; ($count + $group)]">
97
98                <xsl:apply-templates select="."/>
99
100            </xsl:for-each>
101
102        <!-- @ post group code here -->
103
104        <!-- - - -->
105
106     </xsl:template>
107
108
109     <xsl:template name="title">
110        <!--
111          @ Pre title html code here
112        -->
113       <div style="position:absolute; left:280px; top:8px; width:220px; z-index:2; padding:10px" class="ccolor">
114          <div align="center" class="toctitle">
115            <xsl:value-of select="/session/general-info/@title"/>
116        <!--
117          @ Post title html code here
118        -->
119            </div>
120        </div>
121     </xsl:template>
122
123
124</xsl:stylesheet>
125