1 | <?xml version="1.0"?> |
---|
2 | <!-- |
---|
3 | Licensed to the Apache Software Foundation (ASF) under one or more |
---|
4 | contributor license agreements. See the NOTICE file distributed with |
---|
5 | this work for additional information regarding copyright ownership. |
---|
6 | The ASF licenses this file to You under the Apache License, Version 2.0 |
---|
7 | (the "License"); you may not use this file except in compliance with |
---|
8 | the License. You may obtain a copy of the License at |
---|
9 | |
---|
10 | http://www.apache.org/licenses/LICENSE-2.0 |
---|
11 | |
---|
12 | Unless required by applicable law or agreed to in writing, software |
---|
13 | distributed under the License is distributed on an "AS IS" BASIS, |
---|
14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
---|
15 | See the License for the specific language governing permissions and |
---|
16 | limitations under the License. |
---|
17 | --> |
---|
18 | <!-- |
---|
19 | This stylesheet generates 'tabs' at the top left of the screen. Tabs are |
---|
20 | visual indicators that a certain subsection of the URI space is being browsed. |
---|
21 | For example, if we had tabs with paths: |
---|
22 | |
---|
23 | Tab1: '' |
---|
24 | Tab2: 'community' |
---|
25 | Tab3: 'community/howto' |
---|
26 | Tab4: 'community/howto/form/index.html' |
---|
27 | |
---|
28 | Then if the current path was 'community/howto/foo', Tab3 would be highlighted. |
---|
29 | The rule is: the tab with the longest path that forms a prefix of the current |
---|
30 | path is enabled. |
---|
31 | |
---|
32 | The output of this stylesheet is HTML of the form: |
---|
33 | <div class="tab"> |
---|
34 | ... |
---|
35 | </div> |
---|
36 | |
---|
37 | which is then merged by site-to-xhtml.xsl |
---|
38 | |
---|
39 | --> |
---|
40 | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
---|
41 | <xsl:import href="../../../common/xslt/html/tab-to-menu.xsl"/> |
---|
42 | <xsl:template match="tabs"> |
---|
43 | <ul id="tabs"> |
---|
44 | <xsl:call-template name="base-tabs"/> |
---|
45 | </ul> |
---|
46 | <span id="level2tabs"> |
---|
47 | <xsl:call-template name="level2tabs"/> |
---|
48 | </span> |
---|
49 | </xsl:template> |
---|
50 | <xsl:template name="pre-separator"></xsl:template> |
---|
51 | <xsl:template name="post-separator"></xsl:template> |
---|
52 | <xsl:template name="separator"></xsl:template> |
---|
53 | <xsl:template name="level2-separator"></xsl:template> |
---|
54 | <xsl:template name="selected"> |
---|
55 | <li class="current"><xsl:call-template name="base-selected"/></li> |
---|
56 | </xsl:template> |
---|
57 | <xsl:template name="not-selected"> |
---|
58 | <li><xsl:call-template name="base-not-selected"/></li> |
---|
59 | </xsl:template> |
---|
60 | <xsl:template name="level2-not-selected"> |
---|
61 | <xsl:call-template name="base-not-selected"/> |
---|
62 | </xsl:template> |
---|
63 | <xsl:template name="level2-selected"> |
---|
64 | <xsl:call-template name="base-selected"/> |
---|
65 | </xsl:template> |
---|
66 | </xsl:stylesheet> |
---|