xref: /minix3/external/bsd/bind/dist/doc/xsl/copyright.xsl (revision 00b67f09dd46474d133c95011a48590a8e8f94c7)
1<!--
2 - Copyright (C) 2005, 2007, 2009  Internet Systems Consortium, Inc. ("ISC")
3 -
4 - Permission to use, copy, modify, and/or distribute this software for any
5 - purpose with or without fee is hereby granted, provided that the above
6 - copyright notice and this permission notice appear in all copies.
7 -
8 - THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
9 - REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10 - AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
11 - INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12 - LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
13 - OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14 - PERFORMANCE OF THIS SOFTWARE.
15-->
16
17<!-- Id: copyright.xsl,v 1.8 2009/07/10 23:47:58 tbox Exp  -->
18
19<!-- Generate ISC copyright comments from Docbook copyright metadata. -->
20
21<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
22
23  <xsl:template name="isc.copyright.format">
24    <xsl:param name="text"/>
25    <xsl:value-of select="$isc.copyright.leader"/>
26    <xsl:value-of select="normalize-space(substring-before($text, '&#10;'))"/>
27    <xsl:text>&#10;</xsl:text>
28    <xsl:variable name="rest" select="substring-after($text, '&#10;')"/>
29    <xsl:if test="translate($rest, '&#9;&#32;', '')">
30      <xsl:call-template name="isc.copyright.format">
31        <xsl:with-param name="text" select="$rest"/>
32      </xsl:call-template>
33    </xsl:if>
34  </xsl:template>
35
36  <xsl:variable name="isc.copyright.text">
37    <xsl:text>
38      Permission to use, copy, modify, and/or distribute this software for any
39      purpose with or without fee is hereby granted, provided that the above
40      copyright notice and this permission notice appear in all copies.
41
42      THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
43      REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
44      AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
45      INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
46      LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
47      OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
48      PERFORMANCE OF THIS SOFTWARE.
49    </xsl:text>
50  </xsl:variable>
51
52  <xsl:variable name="isc.copyright">
53    <xsl:call-template name="isc.copyright.format">
54      <xsl:with-param name="text">
55	<xsl:for-each select="/refentry/docinfo/copyright | /book/bookinfo/copyright">
56	  <xsl:text>Copyright (C) </xsl:text>
57	  <xsl:call-template name="copyright.years">
58	    <xsl:with-param name="years" select="year"/>
59	  </xsl:call-template>
60	  <xsl:text> </xsl:text>
61	  <xsl:value-of select="holder"/>
62	  <xsl:text>&#10;</xsl:text>
63	</xsl:for-each>
64	<xsl:value-of select="$isc.copyright.text"/>
65      </xsl:with-param>
66    </xsl:call-template>
67  </xsl:variable>
68
69</xsl:stylesheet>
70
71<!--
72  - Local variables:
73  - mode: sgml
74  - End:
75 -->
76