source: trunk/lib/docbook/custom-styles/docbook/plain/xsl/customized.chunked.xsl @ 3162

Last change on this file since 3162 was 3162, checked in by Martin Svensson, 17 years ago

Added copyright text to userdoc/index.xml and some more changes to TOC on chunked subpages

File size: 3.4 KB
Line 
1<?xml version='1.0'?>
2<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3                xmlns:fo="http://www.w3.org/1999/XSL/Format"
4                version='1.0'>
5
6<xsl:import href="@ant.docbook.styler.fileuri@/docbook/xsl/html/chunk.xsl" />
7
8<!-- (MM20040315) xsl parameters moved from ant-build-docbook.xml to here -->
9<xsl:param name="table.borders.with.css" select="1"/>
10<xsl:param name="html.stylesheet">css/docbook.css</xsl:param>
11<xsl:param name="html.stylesheet.type">text/css</xsl:param>       
12<xsl:param name="section.label.includes.component.label" select="1" />         
13<xsl:param name="section.autolabel" select="1" />
14<xsl:param name="section.autolabel.max.depth" select="2" />
15<xsl:param name="toc.max.depth" select="2"/>
16<xsl:param name="make.graphic.viewport" select="0"/>
17<xsl:param name="callout.graphics" select="1" />
18<xsl:param name="callout.graphics.path">gfx/admonitions/callouts/</xsl:param>
19<xsl:param name="callout.graphics.extension">.gif</xsl:param>
20<xsl:param name="admon.graphics" select="1"/>
21<xsl:param name="admon.graphics.path">gfx/admonitions/</xsl:param>
22<xsl:param name="admon.graphics.extension">.gif</xsl:param>
23<xsl:param name="admonition.title.properties">text-align: left</xsl:param>
24
25<xsl:param name="chunker.output.encoding">utf-8</xsl:param>
26<xsl:param name="chunker.output.indent">yes</xsl:param>
27
28<!-- (MM20040315) base.dir and root.filename are coming from the ant-build-docbook.xml -->
29<xsl:param name="base.dir">@base.dir@/</xsl:param>
30<xsl:param name="root.filename">@root.filename@</xsl:param>
31
32
33<!-- convert url-only references to a format that is wrappable -->
34
35<xsl:template match="ulink" name="ulink">
36  <xsl:choose>
37  <xsl:when test="count(child::node())=0">
38  <a>
39      <xsl:if test="@id">
40        <xsl:attribute name="name">
41          <xsl:value-of select="@id"/>
42        </xsl:attribute>
43      </xsl:if>
44      <xsl:attribute name="href"><xsl:value-of select="@url"/></xsl:attribute>
45      <xsl:if test="$ulink.target != ''">
46        <xsl:attribute name="target">
47          <xsl:value-of select="$ulink.target"/>
48        </xsl:attribute>
49      </xsl:if> 
50    <xsl:if test="count(child::node())=0">
51        <xsl:call-template name="insertInvisibleBreaks">
52            <xsl:with-param name="url" select="@url" />
53            <xsl:with-param name="breakat" select="translate(@url, '/-_:', '____')" />
54        </xsl:call-template>
55    </xsl:if>
56  </a>
57  </xsl:when>
58  <xsl:otherwise>
59  <xsl:apply-imports/>
60  </xsl:otherwise>
61  </xsl:choose>
62</xsl:template> 
63
64<xsl:template name="insertInvisibleBreaks">
65    <xsl:param name="url" />
66    <xsl:param name="breakat" />
67    <!-- <xsl:message><xsl:value-of select="concat('param:', $url, $breakat)" /></xsl:message> -->
68    <xsl:choose>
69        <xsl:when test="contains($breakat, '_')">
70            <xsl:value-of select="substring($url, 1, string-length(substring-before($breakat, '_'))+1)" /><wbr/>
71            <xsl:call-template name="insertInvisibleBreaks">
72                <xsl:with-param name="url" select="substring($url, string-length(substring-before($breakat, '_'))+2)"/>
73                <xsl:with-param name="breakat" select="substring($breakat, string-length(substring-before($breakat, '_'))+2)"/>
74            </xsl:call-template>
75        </xsl:when>
76        <xsl:otherwise>
77            <xsl:value-of select="$url" />
78        </xsl:otherwise>
79    </xsl:choose>
80</xsl:template>
81
82</xsl:stylesheet>
83
84
Note: See TracBrowser for help on using the repository browser.