Debian Codegraph @

daps-xslt/common/search4includedfiles.xsl

raw symbols SCIP
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!--
3 Purpose:
4 Prints a list of files which are included by XIncludes, observing
5 the @xml:base attribute and the rootid parameter
6
7 Parameters:
8 * separator (default: " ")
9 Split each filename with the content of this parameter
10
11 * terminator (default: "\n")
12 Terminate the list with the content of this parameter
13
14 * rootid (imported)
15 Applies stylesheet only to part of the document
16
17 Input:
18 DocBook 4/Novdoc document
19
20 Output:
21 Text, prints a list of (included) files separated by $separator
22 and terminated by $terminator
23
24 See also:
25 * xml:base Specification
26 http://www.w3.org/TR/xmlbase/
27
28 Author: Thomas Schraitle <[email protected]>
29 Copyright (C) 2012-2020 SUSE Software Solutions Germany GmbH
30
31 -->
32
33
34 <xsl:stylesheet version="1.0"
35 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
36 xmlns:xi="http://www.w3.org/2001/XInclude"
37 xmlns:xi3="http://www.w3.org/2003/XInclude">
38
39 <xsl:import href="rootid.xsl"/>
40 <xsl:output method="text"/>
41
42 <xsl:param name="separator"><xsl:text> </xsl:text></xsl:param>
43 <xsl:param name="terminator"><xsl:text>&#10;</xsl:text></xsl:param>
44
45
46 <xsl:template match="/">
47 <xsl:apply-imports/>
48 <xsl:value-of select="$terminator"/>
49 </xsl:template>
50
51
52 <xsl:template name="rootid.process">
53 <xsl:apply-templates select="key('id',$rootid)" mode="xmlbase" />
54 </xsl:template>
55
56
57 <xsl:template name="normal.process">
58 <xsl:apply-templates mode="xmlbase"/>
59 </xsl:template>
60
61
62 <xsl:template match="/" mode="xmlbase">
63 <xsl:apply-templates mode="xmlbase"/>
64 </xsl:template>
65
66 <xsl:template match="*" mode="xmlbase">
67 <xsl:apply-templates select="@xml:base" mode="xmlbase"/>
68 <xsl:apply-templates mode="xmlbase"/>
69 </xsl:template>
70
71 <xsl:template match="text()" mode="xmlbase"/>
72
73 <xsl:template match="@xml:base" mode="xmlbase">
74 <xsl:value-of select="concat(., $separator)"/>
75 </xsl:template>
76
77 </xsl:stylesheet>