annotate docbook-update-source-data.xsl @ 9:ec5c1b653ee6

Prevent NULL pointer dereference Creating the end field may fail, thus try to allocate it in advance.
author Guido Berhoerster <guido+libpws@berhoerster.name>
date Tue, 30 Jul 2019 14:52:29 +0200
parents e1309515d111
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
1 <?xml version="1.0"?>
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
2 <xsl:stylesheet
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
3 version="1.0"
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
4 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
5 xmlns:db="http://docbook.org/ns/docbook"
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
6 xmlns="http://docbook.org/ns/docbook"
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
7 exclude-result-prefixes="xsl db">
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
8
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
9 <xsl:param name="package" select="''" />
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
10 <xsl:param name="version" select="''" />
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
11
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
12 <xsl:template match="db:refmeta/db:refmiscinfo[@class = 'source' or
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
13 @class = 'version']"/>
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
14
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
15 <xsl:template match="db:refmeta">
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
16 <xsl:copy>
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
17 <xsl:apply-templates/>
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
18 <refmiscinfo class="source"><xsl:value-of select="$package"/></refmiscinfo>
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
19 <refmiscinfo class="version"><xsl:value-of select="$version"/></refmiscinfo>
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
20 </xsl:copy>
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
21 </xsl:template>
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
22
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
23 <xsl:template match="@*|node()">
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
24 <xsl:copy>
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
25 <xsl:apply-templates select="@*|node()"/>
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
26 </xsl:copy>
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
27 </xsl:template>
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
28
e1309515d111 Add README file and manpages
Guido Berhoerster <guido+libpws@berhoerster.name>
parents:
diff changeset
29 </xsl:stylesheet>