source: stylesheets/lfs-xsl/docbook-xsl-snapshot/fo/axf.xsl@ 369d8b1

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 6.3 6.4 6.5 6.6 6.7 6.8 7.0 7.1 7.2 7.3 7.4 7.5 7.5-systemd 7.6 7.6-systemd 7.7 7.7-systemd 7.8 7.8-systemd 7.9 7.9-systemd 8.0 8.1 8.2 8.3 8.4 9.0 9.1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 369d8b1 was c873d807, checked in by Manuel Canales Esparcia <manuel@…>, 17 years ago

Added new-xsl files.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@8196 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 3.9 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 xmlns:axf="http://www.antennahouse.com/names/XSL/Extensions"
5 version='1.0'>
6
7<!-- ********************************************************************
8 $Id$
9 ******************************************************************** -->
10
11<xsl:template name="axf-document-information">
12
13 <xsl:variable name="authors" select="(//author|//editor|
14 //corpauthor|//authorgroup)[1]"/>
15 <xsl:if test="$authors">
16 <xsl:variable name="author">
17 <xsl:choose>
18 <xsl:when test="$authors[self::authorgroup]">
19 <xsl:call-template name="person.name.list">
20 <xsl:with-param name="person.list"
21 select="$authors/*[self::author|self::corpauthor|
22 self::othercredit|self::editor]"/>
23 </xsl:call-template>
24 </xsl:when>
25 <xsl:when test="$authors[self::corpauthor]">
26 <xsl:value-of select="$authors"/>
27 </xsl:when>
28 <xsl:otherwise>
29 <xsl:call-template name="person.name">
30 <xsl:with-param name="node" select="$authors"/>
31 </xsl:call-template>
32 </xsl:otherwise>
33 </xsl:choose>
34 </xsl:variable>
35
36 <xsl:element name="axf:document-info">
37 <xsl:attribute name="name">author</xsl:attribute>
38 <xsl:attribute name="value">
39 <xsl:value-of select="normalize-space($author)"/>
40 </xsl:attribute>
41 </xsl:element>
42 </xsl:if>
43
44 <xsl:variable name="title">
45 <xsl:apply-templates select="/*[1]" mode="label.markup"/>
46 <xsl:apply-templates select="/*[1]" mode="title.markup"/>
47 </xsl:variable>
48
49 <!-- * see bug report #1465301 - mzjn -->
50 <axf:document-info name="title">
51 <xsl:attribute name="value">
52 <xsl:value-of select="normalize-space($title)"/>
53 </xsl:attribute>
54 </axf:document-info>
55
56 <xsl:if test="//keyword">
57 <xsl:element name="axf:document-info">
58 <xsl:attribute name="name">keywords</xsl:attribute>
59 <xsl:attribute name="value">
60 <xsl:for-each select="//keyword">
61 <xsl:value-of select="normalize-space(.)"/>
62 <xsl:if test="position() != last()">
63 <xsl:text>, </xsl:text>
64 </xsl:if>
65 </xsl:for-each>
66 </xsl:attribute>
67 </xsl:element>
68 </xsl:if>
69
70 <xsl:if test="//subjectterm">
71 <xsl:element name="axf:document-info">
72 <xsl:attribute name="name">subject</xsl:attribute>
73 <xsl:attribute name="value">
74 <xsl:for-each select="//subjectterm">
75 <xsl:value-of select="normalize-space(.)"/>
76 <xsl:if test="position() != last()">
77 <xsl:text>, </xsl:text>
78 </xsl:if>
79 </xsl:for-each>
80 </xsl:attribute>
81 </xsl:element>
82 </xsl:if>
83
84</xsl:template>
85
86<!-- These properties are added to fo:simple-page-master -->
87<xsl:template name="axf-page-master-properties">
88 <xsl:param name="page.master" select="''"/>
89
90 <xsl:if test="$crop.marks != 0">
91 <xsl:attribute name="axf:printer-marks">crop</xsl:attribute>
92 <xsl:attribute name="axf:bleed"><xsl:value-of
93 select="$crop.mark.bleed"/></xsl:attribute>
94 <xsl:attribute name="axf:printer-marks-line-width"><xsl:value-of
95 select="$crop.mark.width"/></xsl:attribute>
96 <xsl:attribute name="axf:crop-offset"><xsl:value-of
97 select="$crop.mark.offset"/></xsl:attribute>
98 </xsl:if>
99
100 <xsl:call-template name="user-axf-page-master-properties">
101 <xsl:with-param name="page.master" select="$page.master"/>
102 </xsl:call-template>
103
104</xsl:template>
105
106<xsl:template name="user-axf-page-master-properties">
107 <xsl:param name="page.master" select="''"/>
108</xsl:template>
109
110</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.