PageRenderTime 24ms CodeModel.GetById 12ms app.highlight 6ms RepoModel.GetById 2ms app.codeStats 0ms

/hazelcast-documentation/src/main/docbook/manual/stylesheet/docbook-fo.xsl

https://bitbucket.org/gabral6_gmailcom/hazelcast
Extensible Stylesheet Language Transformations | 114 lines | 107 code | 7 blank | 0 comment | 0 complexity | d9e0ed4c7b684dbe5a94725b5c81c90a MD5 | raw file
  1<?xml version="1.0" encoding="utf-8"?>
  2<!--
  3  ~ Copyright (c) 2008-2013, Hazelcast, Inc. All Rights Reserved.
  4  ~
  5  ~ Licensed under the Apache License, Version 2.0 (the "License");
  6  ~ you may not use this file except in compliance with the License.
  7  ~ You may obtain a copy of the License at
  8  ~
  9  ~ http://www.apache.org/licenses/LICENSE-2.0
 10  ~
 11  ~ Unless required by applicable law or agreed to in writing, software
 12  ~ distributed under the License is distributed on an "AS IS" BASIS,
 13  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 14  ~ See the License for the specific language governing permissions and
 15  ~ limitations under the License.
 16  -->
 17
 18<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 19                xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xslthl="http://xslthl.sf.net"
 20                exclude-result-prefixes="xslthl" version='1.0'>
 21
 22    <!-- import the main stylesheet, here pointing to fo/docbook.xsl -->
 23    <xsl:import href="urn:docbkx:stylesheet"/>
 24
 25    <!-- highlight.xsl must be imported in order to enable highlighting support,
 26         highlightSource=1 parameter is not sufficient -->
 27    <xsl:import href="urn:docbkx:stylesheet/highlight.xsl"/>
 28
 29    <xsl:param name="highlight.source" select="1"/>
 30    <xsl:param name="highlight.default.language" select="xml"/>
 31    <xsl:param name="admon.graphics" select="1"/>
 32    <xsl:param name="chapter.autolabel" select="1"/>
 33    <xsl:param name="section.autolabel" select="1"/>
 34    <xsl:param name="section.label.includes.component.label" select="1"/>
 35
 36    <xsl:param name="page.margin.inner">10mm</xsl:param>
 37    <xsl:param name="page.margin.outer">10mm</xsl:param>
 38    <xsl:param name="alignment">left</xsl:param>
 39    <xsl:param name="symbol.font.family" select="'Symbol,ZapfDingbats,Monospaced'"/>
 40
 41    <!-- some customization -->
 42    <xsl:template match='xslthl:keyword' mode="xslthl">
 43        <fo:inline font-weight="bold" color="#0A1777">
 44            <xsl:apply-templates mode="xslthl"/>
 45        </fo:inline>
 46    </xsl:template>
 47    <xsl:template match='xslthl:comment' mode="xslthl">
 48        <fo:inline font-style="italic" color="#7C7C7C">
 49            <xsl:apply-templates mode="xslthl"/>
 50        </fo:inline>
 51    </xsl:template>
 52    <xsl:template match='xslthl:multiline-comment' mode="xslthl">
 53        <fo:inline font-style="italic" color="#7C7C7C">
 54            <xsl:apply-templates mode="xslthl"/>
 55        </fo:inline>
 56    </xsl:template>
 57    <xsl:template match='xslthl:string' mode="xslthl">
 58        <fo:inline font-style="normal" color="#008000">
 59            <xsl:apply-templates mode="xslthl"/>
 60        </fo:inline>
 61    </xsl:template>
 62    <xsl:template match='xslthl:number' mode="xslthl">
 63        <fo:inline font-style="italic" color="#1930D1">
 64            <xsl:apply-templates mode="xslthl"/>
 65        </fo:inline>
 66    </xsl:template>
 67    <xsl:template match='xslthl:tag' mode="xslthl">
 68        <fo:inline font-style="normal" color="#0A1777">
 69            <xsl:apply-templates mode="xslthl"/>
 70        </fo:inline>
 71    </xsl:template>
 72    <xsl:template match='xslthl:attribute' mode="xslthl">
 73        <fo:inline font-style="bold" color="#0A1777">
 74            <xsl:apply-templates mode="xslthl"/>
 75        </fo:inline>
 76    </xsl:template>
 77    <xsl:template match='xslthl:value' mode="xslthl">
 78        <fo:inline font-style="bold" color="#008000">
 79            <xsl:apply-templates mode="xslthl"/>
 80        </fo:inline>
 81    </xsl:template>
 82
 83    <xsl:attribute-set name="monospace.verbatim.properties">
 84        <xsl:attribute name="font-family">Monospaced</xsl:attribute>
 85        <xsl:attribute name="font-size">8pt</xsl:attribute>
 86        <xsl:attribute name="keep-together.within-column">always</xsl:attribute>
 87    </xsl:attribute-set>
 88    <xsl:param name="shade.verbatim" select="1"/>
 89    <xsl:attribute-set name="shade.verbatim.style">
 90        <xsl:attribute name="background-color">#f0f0f0</xsl:attribute>
 91        <xsl:attribute name="border-width">0.5pt</xsl:attribute>
 92        <xsl:attribute name="border-style">solid</xsl:attribute>
 93        <xsl:attribute name="border-color">#f0f0f0</xsl:attribute>
 94        <xsl:attribute name="padding">3pt</xsl:attribute>
 95    </xsl:attribute-set>
 96    <xsl:attribute-set name="component.title.properties">
 97        <xsl:attribute name="font-family">
 98            <xsl:value-of select="$title.font.family"/>
 99        </xsl:attribute>
100        <xsl:attribute name="font-weight">bold</xsl:attribute>
101        <xsl:attribute name="font-size">20pt</xsl:attribute>
102        <xsl:attribute name="keep-with-next.within-column">always</xsl:attribute>
103        <xsl:attribute name="text-align">left</xsl:attribute>
104        <xsl:attribute name="space-before.minimum">0.8em</xsl:attribute>
105        <xsl:attribute name="space-before.optimum">1.0em</xsl:attribute>
106        <xsl:attribute name="space-before.maximum">1.2em</xsl:attribute>
107    </xsl:attribute-set>
108    <xsl:attribute-set name="section.title.level1.properties">
109        <xsl:attribute name="font-size">16pt</xsl:attribute>
110    </xsl:attribute-set>
111    <xsl:attribute-set name="section.title.level2.properties">
112        <xsl:attribute name="font-size">12pt</xsl:attribute>
113    </xsl:attribute-set>
114</xsl:stylesheet>