170
|
1 <?xml version="1.0" encoding="utf-8"?>
|
|
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
|
|
3
|
|
4 <xsl:template match="img">
|
|
5 <img src="{@href}">
|
|
6 <xsl:apply-templates/>
|
|
7 </img>
|
|
8 </xsl:template>
|
|
9
|
601
|
10 <xsl:template match="origin">
|
|
11
|
|
12 <a href="{document($ORIGIN)/*/@link}">
|
|
13 <xsl:apply-templates/>
|
|
14 </a>
|
|
15 </xsl:template>
|
|
16
|
492
|
17 <xsl:template match="link[@url]">
|
|
18
|
170
|
19 <a href="{@url}">
|
492
|
20 <xsl:choose>
|
|
21
|
|
22 <xsl:when test="count(node()) != 0">
|
|
23 <xsl:apply-templates/>
|
|
24 </xsl:when>
|
|
25 <xsl:otherwise>
|
|
26 <xsl:value-of select="@url"/>
|
|
27 </xsl:otherwise>
|
|
28 </xsl:choose>
|
|
29
|
170
|
30 </a>
|
|
31 </xsl:template>
|
|
32
|
|
33 <xsl:template match="link[@id and not(@doc)]">
|
|
34
|
|
35 <a href="#{@id}">
|
|
36 <xsl:choose>
|
|
37
|
|
38 <xsl:when test="count(node()) != 0">
|
|
39 <xsl:apply-templates/>
|
|
40 </xsl:when>
|
|
41 <xsl:otherwise>
|
|
42 <xsl:value-of select="@id"/>
|
|
43 </xsl:otherwise>
|
|
44 </xsl:choose>
|
|
45
|
|
46 </a>
|
|
47 </xsl:template>
|
|
48
|
|
49 <xsl:template match="link[@doc and not(@id)]">
|
|
50
|
|
51 <a href="{substring-before(@doc, '.xml')}.html">
|
373
|
52 <xsl:choose>
|
|
53
|
|
54 <xsl:when test="count(node()) != 0">
|
|
55
|
|
56 <xsl:apply-templates/>
|
|
57 </xsl:when>
|
|
58
|
|
59 <xsl:otherwise>
|
|
60
|
|
61 <xsl:value-of select=" document(@doc)/article/@name | document(@doc)/module/@name"/>
|
|
62 </xsl:otherwise>
|
|
63 </xsl:choose>
|
|
64
|
170
|
65 </a>
|
|
66 </xsl:template>
|
|
67
|
|
68 <xsl:template match="link[@id and @doc]">
|
|
69
|
|
70 <a href="{substring-before(@doc, '.xml')}.html#{@id}">
|
|
71 <xsl:choose>
|
|
72
|
|
73 <xsl:when test="count(node()) != 0">
|
|
74 <xsl:apply-templates/>
|
|
75 </xsl:when>
|
|
76 <xsl:otherwise>
|
|
77 <xsl:value-of select="@id"/>
|
|
78 </xsl:otherwise>
|
|
79 </xsl:choose>
|
|
80
|
|
81 </a>
|
|
82 </xsl:template>
|
|
83
|
424
|
84 <xsl:template match="links">
|
|
85
|
|
86 <xsl:for-each select="link">
|
|
87 <xsl:sort select="@id"/>
|
|
88
|
|
89 <a href="{substring-before(@doc, '.xml')}.html#{@id}">
|
|
90 <xsl:value-of select="@id"/>
|
|
91 </a>
|
|
92
|
|
93 <br/>
|
|
94 </xsl:for-each>
|
|
95 </xsl:template>
|
|
96
|
170
|
97 </xsl:stylesheet>
|