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

Last change on this file since 3160 was 3153, checked in by Nicklas Nordborg, 17 years ago

Added docbook DTD:s and stylesheets

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
26<!-- convert url-only references to a format that is wrappable -->
27
28<xsl:template match="ulink" name="ulink">
29  <xsl:choose>
30  <xsl:when test="count(child::node())=0">
31  <a>
32      <xsl:if test="@id">
33        <xsl:attribute name="name">
34          <xsl:value-of select="@id"/>
35        </xsl:attribute>
36      </xsl:if>
37      <xsl:attribute name="href"><xsl:value-of select="@url"/></xsl:attribute>
38      <xsl:if test="$ulink.target != ''">
39        <xsl:attribute name="target">
40          <xsl:value-of select="$ulink.target"/>
41        </xsl:attribute>
42      </xsl:if> 
43    <xsl:if test="count(child::node())=0">
44        <xsl:call-template name="insertInvisibleBreaks">
45            <xsl:with-param name="url" select="@url" />
46            <xsl:with-param name="breakat" select="translate(@url, '/-_:', '____')" />
47        </xsl:call-template>
48    </xsl:if>
49  </a>
50  </xsl:when>
51  <xsl:otherwise>
52  <xsl:apply-imports/>
53  </xsl:otherwise>
54  </xsl:choose>
55</xsl:template> 
56
57<xsl:template name="insertInvisibleBreaks">
58    <xsl:param name="url" />
59    <xsl:param name="breakat" />
60    <!-- <xsl:message><xsl:value-of select="concat('param:', $url, $breakat)" /></xsl:message> -->
61    <xsl:choose>
62        <xsl:when test="contains($breakat, '_')">
63            <xsl:value-of select="substring($url, 1, string-length(substring-before($breakat, '_'))+1)" /><wbr/>
64            <xsl:call-template name="insertInvisibleBreaks">
65                <xsl:with-param name="url" select="substring($url, string-length(substring-before($breakat, '_'))+2)"/>
66                <xsl:with-param name="breakat" select="substring($breakat, string-length(substring-before($breakat, '_'))+2)"/>
67            </xsl:call-template>
68        </xsl:when>
69        <xsl:otherwise>
70            <xsl:value-of select="$url" />
71        </xsl:otherwise>
72    </xsl:choose>
73</xsl:template>
74
75</xsl:stylesheet>
76
77
Note: See TracBrowser for help on using the repository browser.