source: trunk/lib/docbook/custom-styles/docbook/plain/xsl/customized.single.xsl

Last change on this file was 3283, checked in by Jari Häkkinen, 16 years ago

Removing stray carriage returns. Setting proper eol-style.

  • Property svn:eol-style set to native
File size: 3.1 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/docbook.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="generate.toc">book toc,title</xsl:param>         
15<xsl:param name="make.graphic.viewport" select="0"/>
16<xsl:param name="admon.graphics" select="1"/>
17<xsl:param name="admon.graphics.path">gfx/admonitions/</xsl:param>
18<xsl:param name="admon.graphics.extension">.gif</xsl:param>
19<xsl:param name="callout.graphics" select="1" />
20<xsl:param name="callout.graphics.path">gfx/admonitions/callouts/</xsl:param>
21<xsl:param name="callout.graphics.extension">.gif</xsl:param>
22<xsl:param name="admonition.title.properties">text-align: left</xsl:param>
23
24<xsl:param name="chunker.output.encoding">utf-8</xsl:param>
25<xsl:param name="chunker.output.indent">yes</xsl:param>
26
27<!-- convert url-only references to a format that is wrappable -->
28
29<xsl:template match="ulink" name="ulink">
30  <xsl:choose>
31  <xsl:when test="count(child::node())=0">
32  <a>
33      <xsl:if test="@id">
34        <xsl:attribute name="name">
35          <xsl:value-of select="@id"/>
36        </xsl:attribute>
37      </xsl:if>
38      <xsl:attribute name="href"><xsl:value-of select="@url"/></xsl:attribute>
39      <xsl:if test="$ulink.target != ''">
40        <xsl:attribute name="target">
41          <xsl:value-of select="$ulink.target"/>
42        </xsl:attribute>
43      </xsl:if> 
44    <xsl:if test="count(child::node())=0">
45        <xsl:call-template name="insertInvisibleBreaks">
46            <xsl:with-param name="url" select="@url" />
47            <xsl:with-param name="breakat" select="translate(@url, '/-_:', '____')" />
48        </xsl:call-template>
49    </xsl:if>
50  </a>
51  </xsl:when>
52  <xsl:otherwise>
53  <xsl:apply-imports/>
54  </xsl:otherwise>
55  </xsl:choose>
56</xsl:template> 
57
58<xsl:template name="insertInvisibleBreaks">
59    <xsl:param name="url" />
60    <xsl:param name="breakat" />
61    <!-- <xsl:message><xsl:value-of select="concat('param:', $url, $breakat)" /></xsl:message> -->
62    <xsl:choose>
63        <xsl:when test="contains($breakat, '_')">
64            <xsl:value-of select="substring($url, 1, string-length(substring-before($breakat, '_'))+1)" /><wbr/>
65            <xsl:call-template name="insertInvisibleBreaks">
66                <xsl:with-param name="url" select="substring($url, string-length(substring-before($breakat, '_'))+2)"/>
67                <xsl:with-param name="breakat" select="substring($breakat, string-length(substring-before($breakat, '_'))+2)"/>
68            </xsl:call-template>
69        </xsl:when>
70        <xsl:otherwise>
71            <xsl:value-of select="$url" />
72        </xsl:otherwise>
73    </xsl:choose>
74</xsl:template>
75
76</xsl:stylesheet>
77
78
Note: See TracBrowser for help on using the repository browser.