/usr/share/xnav/xml/dpnd.xsl is in xnav 0.05-0ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 | <?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exslt="http://exslt.org/common" version="1.0"
exclude-result-prefixes="exslt">
<!--
This file contains the XSL templates used to construct a
list of XML files used by XNav.
Copyright © 2004-2007 Brendt Wohlberg <osspkg@gmail.com>
Please see the XNav distribution README file for license
information.
-->
<xsl:output method="text"/>
<!-- Stylesheet parameter setting base path for processing -->
<xsl:param name="basep" select="'./'"/>
<!-- Template matching root to initiate processing on top level
xnav file -->
<xsl:template match="/">
<xsl:call-template name="navtreedepend">
<xsl:with-param name="p" select="$basep"/>
<xsl:with-param name="y" select="."/>
</xsl:call-template>
</xsl:template>
<!-- Main template, called recursively -->
<xsl:template name="navtreedepend">
<!-- Cumulative path to this level -->
<xsl:param name="p" select="'./'"/>
<!-- The xnav element for this level -->
<xsl:param name="y" select="/.."/>
<!-- A cumulative list of xnav files -->
<xsl:param name="c" select="''"/>
<xsl:variable name="nc" select="concat($c, ' ', $p, 'xnav.xml')"/>
<xsl:value-of select="concat($p, 'index.html')"/>
<xsl:text> </xsl:text>
<xsl:value-of select="concat($p, 'index.xml')"/>
<xsl:value-of select="$c"/>
<xsl:text> </xsl:text>
<xsl:for-each select="$y/xnav/file">
<xsl:value-of select="concat($p, substring-before(@href, '.xml'),
'.html')"/>
<xsl:text> </xsl:text>
<xsl:value-of select="concat($p, @href)"/>
<xsl:value-of select="$nc"/>
<xsl:text> </xsl:text>
</xsl:for-each>
<!-- Descend down the tree -->
<xsl:for-each select="$y/xnav/directory[not(@enter='no')]">
<!-- Variable $dhref is @href with a single final '/' character -->
<xsl:variable name="dhref" select="concat(
substring(@href,1,
string-length(@href)-1),
translate(
substring(@href,
string-length(@href)),
'/',''),
'/'
)"/>
<xsl:variable name="xnav"
select="document(concat($dhref, 'xnav.xml'), /)"/>
<!-- Detect and signal problems parsing xnav.xml document -->
<xsl:if test="count($xnav)=0">
<xsl:text>error-path </xsl:text>
<xsl:value-of select="concat($basep, $dhref, 'xnav.xml')"/>
<xsl:text> </xsl:text>
<xsl:message terminate='yes'>
<xsl:text>Error in processing file </xsl:text>
<xsl:value-of select="concat($basep, $dhref, 'xnav.xml')"/>
</xsl:message>
</xsl:if>
<xsl:call-template name="navtreedepend">
<xsl:with-param name="p" select="concat($p, $dhref)"/>
<xsl:with-param name="y" select="$xnav"/>
<xsl:with-param name="c" select="$nc"/>
</xsl:call-template>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
|