-
Notifications
You must be signed in to change notification settings - Fork 4
/
hub2processSummary.xsl
56 lines (48 loc) · 1.71 KB
/
hub2processSummary.xsl
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
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
exclude-result-prefixes="xs"
version="2.0">
<!--this is not at all optimized since it is a one-off each revision-->
<!--this needs to point to the old version of the hub document in
order to know which entries have to be emphasized
-->
<xsl:output indent="yes" omit-xml-declaration="yes"/>
<xsl:param name="old" required="yes" as="xs:string"/>
<xsl:variable name="oldDoc" select="document($old,/)"/>
<xsl:key name="ids" match="*[@id]" use="@id"/>
<xsl:template match="/">
<xsl:message select="'Creating process summary'"/>
<xsl:comment>
To get an updated version of this entity file, please run the build process
and obtain a copy from the archive-only-not-in-final-distribution/new-entities
directory.
</xsl:comment><xsl:text>
</xsl:text>
<xsl:for-each select="//section[@role='processes']">
<itemizedlist spacing="compact" mark="none" role="processLinkSummary">
<xsl:apply-templates select="section[position()>1]"/>
</itemizedlist>
</xsl:for-each>
</xsl:template>
<xsl:template match="section">
<listitem>
<para>
<xsl:choose>
<xsl:when test="not(key('ids',@id,$oldDoc))">
<emphasis><emphasis role="bold">
<xref linkend="{@id}"/>
</emphasis></emphasis>
</xsl:when>
<xsl:otherwise>
<xref linkend="{@id}"/>
</xsl:otherwise>
</xsl:choose>
</para>
<xsl:if test="section">
<itemizedlist spacing="compact" mark="none">
<xsl:apply-templates select="section"/>
</itemizedlist>
</xsl:if>
</listitem>
</xsl:template>
</xsl:stylesheet>