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

Last change on this file since 3160 was 3160, checked in by Martin Svensson, 16 years ago

Added the files for developer documentation and set the parser to indent the html tags when parsing.

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="generate.toc">book toc,title</xsl:param>         
15<xsl:param name="make.graphic.viewport" select="0"/>
16<xsl:param name="callout.graphics" select="1" />
17<xsl:param name="callout.graphics.path">gfx/admonitions/callouts/</xsl:param>
18<xsl:param name="callout.graphics.extension">.gif</xsl:param>
19<xsl:param name="admon.graphics" select="1"/>
20<xsl:param name="admon.graphics.path">gfx/admonitions/</xsl:param>
21<xsl:param name="admon.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<!-- (MM20040315) base.dir and root.filename are coming from the ant-build-docbook.xml -->
28<xsl:param name="base.dir">@base.dir@/</xsl:param>
29<xsl:param name="root.filename">@root.filename@</xsl:param>
30
31
32<!-- convert url-only references to a format that is wrappable -->
33
34<xsl:template match="ulink" name="ulink">
35  <xsl:choose>
36  <xsl:when test="count(child::node())=0">
37  <a>
38      <xsl:if test="@id">
39        <xsl:attribute name="name">
40          <xsl:value-of select="@id"/>
41        </xsl:attribute>
42      </xsl:if>
43      <xsl:attribute name="href"><xsl:value-of select="@url"/></xsl:attribute>
44      <xsl:if test="$ulink.target != ''">
45        <xsl:attribute name="target">
46          <xsl:value-of select="$ulink.target"/>
47        </xsl:attribute>
48      </xsl:if> 
49    <xsl:if test="count(child::node())=0">
50        <xsl:call-template name="insertInvisibleBreaks">
51            <xsl:with-param name="url" select="@url" />
52            <xsl:with-param name="breakat" select="translate(@url, '/-_:', '____')" />
53        </xsl:call-template>
54    </xsl:if>
55  </a>
56  </xsl:when>
57  <xsl:otherwise>
58  <xsl:apply-imports/>
59  </xsl:otherwise>
60  </xsl:choose>
61</xsl:template> 
62
63<xsl:template name="insertInvisibleBreaks">
64    <xsl:param name="url" />
65    <xsl:param name="breakat" />
66    <!-- <xsl:message><xsl:value-of select="concat('param:', $url, $breakat)" /></xsl:message> -->
67    <xsl:choose>
68        <xsl:when test="contains($breakat, '_')">
69            <xsl:value-of select="substring($url, 1, string-length(substring-before($breakat, '_'))+1)" /><wbr/>
70            <xsl:call-template name="insertInvisibleBreaks">
71                <xsl:with-param name="url" select="substring($url, string-length(substring-before($breakat, '_'))+2)"/>
72                <xsl:with-param name="breakat" select="substring($breakat, string-length(substring-before($breakat, '_'))+2)"/>
73            </xsl:call-template>
74        </xsl:when>
75        <xsl:otherwise>
76            <xsl:value-of select="$url" />
77        </xsl:otherwise>
78    </xsl:choose>
79</xsl:template>
80
81</xsl:stylesheet>
82
83
Note: See TracBrowser for help on using the repository browser.