2
<xsl:stylesheet exclude-result-prefixes="d"
3
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
4
xmlns:d="http://docbook.org/ns/docbook"
5
xmlns:fo="http://www.w3.org/1999/XSL/Format"
8
<!-- Metadata support ("Document Properties" in Adobe Reader) -->
9
<xsl:template name="fop1-document-information">
10
<xsl:variable name="authors" select="(//d:author|//d:editor|//d:corpauthor|//d:authorgroup)[1]"/>
12
<xsl:variable name="title">
13
<xsl:apply-templates select="/*[1]" mode="label.markup"/>
14
<xsl:apply-templates select="/*[1]" mode="title.markup"/>
15
<xsl:variable name="subtitle">
16
<xsl:apply-templates select="/*[1]" mode="subtitle.markup"/>
18
<xsl:if test="$subtitle !=''">
19
<xsl:text> - </xsl:text>
20
<xsl:value-of select="$subtitle"/>
23
<xsl:variable name="ccid">
24
<xsl:value-of select="substring-after(string(/*/d:info/d:legalnotice/@role),'cc-')"/>
26
<xsl:variable name="ccidURL">
27
<xsl:text>http://creativecommons.org/licenses/</xsl:text>
28
<xsl:value-of select="$ccid"/>
29
<xsl:text>/3.0/legalcode</xsl:text>
32
<x:xmpmeta xmlns:x="adobe:ns:meta/">
33
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
34
<rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/"
35
xmlns:xapRights='http://ns.adobe.com/xap/1.0/rights/'
37
<xapRights:Marked>True</xapRights:Marked>
39
<rdf:Description rdf:about="" xmlns:dc="http://purl.org/dc/elements/1.1/">
40
<!-- Dublin Core properties go here -->
43
<rdf:li xml:lang="x-default">
44
<xsl:apply-templates mode="titlepage.mode" select="//d:copyright"/>
45
<xsl:if test="starts-with(string(/*/d:info/d:legalnotice/@role),'cc-')">
46
<xsl:text> Licensed to the public under Creative Commons Attribution </xsl:text>
48
<xsl:when test="$ccid = 'by'" />
49
<xsl:when test="$ccid = 'by-sa'">
50
<xsl:text>ShareAlike</xsl:text>
52
<xsl:when test="$ccid = 'by-nd'">
53
<xsl:text>NoDerivatives</xsl:text>
55
<xsl:when test="$ccid = 'by-nc'">
56
<xsl:text>NonCommercial</xsl:text>
58
<xsl:when test="$ccid = 'by-nc-sa'">
59
<xsl:text>NonCommercial ShareAlike</xsl:text>
61
<xsl:when test="$ccid = 'by-nc-nd'">
62
<xsl:text>NonCommercial NoDerivatives</xsl:text>
65
<xsl:message terminate="yes">I don't understand licence <xsl:value-of select="$ccid"/></xsl:message>
68
<xsl:text> 3.0 License</xsl:text>
74
<dc:title><xsl:value-of select="normalize-space($title)"/></dc:title>
77
<xsl:if test="$authors">
78
<xsl:variable name="author">
80
<xsl:when test="$authors[self::d:authorgroup]">
81
<xsl:call-template name="person.name.list">
82
<xsl:with-param name="person.list"
83
select="$authors/*[self::d:author|self::d:corpauthor|
84
self::d:othercredit|self::d:editor]"/>
87
<xsl:when test="$authors[self::d:corpauthor]">
88
<xsl:value-of select="$authors"/>
91
<xsl:call-template name="person.name">
92
<xsl:with-param name="node" select="$authors"/>
98
<dc:creator><xsl:value-of select="normalize-space($author)"/></dc:creator>
102
<xsl:if test="//d:subjectterm">
104
<xsl:for-each select="//d:subjectterm">
105
<xsl:value-of select="normalize-space(.)"/>
106
<xsl:if test="position() != last()">
107
<xsl:text>, </xsl:text>
113
<rdf:Description rdf:about="" xmlns:pdf="http://ns.adobe.com/pdf/1.3/">
114
<!-- PDF properties go here -->
117
<xsl:if test="//d:keyword">
119
<xsl:for-each select="//d:keyword">
120
<xsl:value-of select="normalize-space(.)"/>
121
<xsl:if test="position() != last()">
122
<xsl:text>, </xsl:text>
129
<rdf:Description rdf:about="" xmlns:xmp="http://ns.adobe.com/xap/1.0/">
130
<!-- XMP properties go here -->
132
<!-- Creator Tool -->
133
<xmp:CreatorTool>Cloud API Docs Plugin</xmp:CreatorTool>
135
<xsl:if test="starts-with(string(/*/d:info/d:legalnotice/@role),'cc-')">
136
<rdf:Description rdf:about=''
137
xmlns:cc='http://creativecommons.org/ns#'>
138
<xsl:element name="cc:license">
139
<xsl:attribute name="rdf:resource">
140
<xsl:value-of select="$ccidURL"/>