xref: /AOO41X/main/extras/source/misc_config/wizard/web/layouts/layout.xsl (revision ff0525f24f03981d56b7579b645949f111420994)
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
24<!-- =================================================
25
26This template is a skeleton for single level TOC pages
27Do not overwrite this ! copy it and complete the missing
28code.
29
30I use the @ character whereever there is a missing code, so
31you can use a simple find to navigate and find the
32places...
33
34====================================================== -->
35
36<xsl:stylesheet version="1.0"
37   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
38    xmlns="http://www.w3.org/1999/xhtml">
39
40    <xsl:output method               = "html"
41                media-type           = "text/html"
42                indent               = "yes"
43                doctype-public       = "-//W3C//DTD HTML 4.0 Transitional//EN"
44                omit-xml-declaration = "yes"
45                standalone           = "yes" />
46
47     <!-- =============================
48                   ROOT
49     ================================== -->
50
51
52    <xsl:template  match="/">
53        <html>
54                   <xsl:call-template name="head"/>
55                  <xsl:call-template name="body"/>
56           </html>
57     </xsl:template>
58
59
60     <!-- =============================
61             Document properties
62
63     This section contains templates which
64     give the document properties...
65
66     ================================== -->
67
68     <!-- this tempaltes gives the
69     relative href of the document. To use
70     with the <a href="..."> attribute-->
71
72
73     <xsl:template match="document" mode="href">
74       <xsl:value-of select="concat(../@directory,'/')"/>
75       <xsl:if test="@dir">
76         <xsl:value-of select="concat(@dir,'/')"/>
77       </xsl:if>
78       <xsl:value-of select="@fn"/>
79     </xsl:template>
80
81
82    <xsl:template match="document/@title">
83        <xsl:param name="target" select="''"/>
84
85        <span class="doctitle">
86            <a>
87            <xsl:attribute name="href">
88                <xsl:apply-templates select=".." mode="href"/>
89            </xsl:attribute>
90
91            <xsl:if test=" $target != ''">
92                <xsl:attribute name="target">
93                    <xsl:value-of select="$target"/>
94                </xsl:attribute>
95            </xsl:if>
96
97            <xsl:value-of select="."/>
98            </a>
99        </span>
100        <br/>
101     </xsl:template>
102
103
104     <xsl:template match="document/@description">
105        <span class="docdescription">
106            <xsl:value-of select="."/>
107        </span>
108        <br/>
109     </xsl:template>
110
111
112     <xsl:template match="document/@author">
113        <span class="docauthor">
114            <xsl:value-of select="."/>
115        </span>
116        <br/>
117     </xsl:template>
118
119
120     <xsl:template match="document/@create-date">
121        <span class="doccreationdate">
122            <xsl:value-of select="."/>
123        </span>
124        <br/>
125     </xsl:template>
126
127
128     <xsl:template match="document/@update-date">
129        <span class="doclastchangedate">
130            <xsl:value-of select="."/>
131        </span>
132        <br/>
133     </xsl:template>
134
135
136     <xsl:template match="document/@filename">
137        <span class="docfilename">
138            <xsl:value-of select="."/>
139        </span>
140        <br/>
141     </xsl:template>
142
143
144     <xsl:template match="document/@format">
145        <span class="docfileformatinfo">
146            <xsl:value-of select="."/>
147        </span>
148        <br/>
149     </xsl:template>
150
151
152     <xsl:template match="document/@pages">
153        <span class="docnumberofpages">
154            <xsl:value-of select="."/>
155        </span>
156        <br/>
157     </xsl:template>
158
159
160     <xsl:template match="document/@size">
161        <span class="docsizeinkb">
162            <xsl:value-of select="."/>
163        </span>
164        <br/>
165     </xsl:template>
166
167     <xsl:template match="document/@icon">
168       <img src="images/{.}"/>
169        <br/>
170     </xsl:template>
171
172
173     <!-- =============================
174                   HTML HEAD
175
176    this section should not be changed
177     ================================== -->
178
179     <xsl:template name="head">
180        <head>
181                <title>
182                    <xsl:value-of select="/session/general-info/@title"/>
183                </title>
184                <!-- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> -->
185                <meta HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=UTF-8"/>
186                <meta name="description" content="{/session/general-info/@description}"/>
187                <meta name="keywords" content="{/session/general-info/@keywords}"/>
188                <meta name="author" content="{/session/general-info/@author}"/>
189                <meta name="email" content="{/session/general-info/@email}"/>
190                <meta name="copyright" content="{/session/general-info/@copyright}"/>
191                <!-- create date?
192                     update date?
193                     fav icon?
194                     -->
195             <link href="style.css" rel="stylesheet" type="text/css"/>
196
197        </head>
198     </xsl:template>
199
200</xsl:stylesheet>
201