comparison xslt/link.xslt @ 373:e179a6487bbd

Regenerated.
author Ruslan Ermilov <ru@nginx.com>
date Mon, 30 Jan 2012 09:55:08 +0000
parents cd2698ea00ab
children aa00b4d476c8
comparison
equal deleted inserted replaced
372:978b9e3897f7 373:e179a6487bbd
1 <?xml version="1.0" encoding="utf-8"?> 1 <?xml version="1.0" encoding="utf-8"?>
2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> 2 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
3
4 <xsl:template match="a[starts-with(@href, '/') and string() = '' and contains(@href, '.xml')]">
5
6 <a>
7
8 <xsl:attribute name="href">
9 <xsl:choose>
10
11 <xsl:when test="starts-with(@href, $DIRNAME)">
12
13 <xsl:value-of select=" substring-after(document(concat($XML, @href))/article/@link |document(concat($XML, @href))/module/@link, $DIRNAME)"/>
14 </xsl:when>
15
16 <xsl:otherwise>
17
18 <xsl:value-of select=" concat($ROOT, document(concat($XML, @href))/article/@link |document(concat($XML, @href))/module/@link)"/>
19 </xsl:otherwise>
20 </xsl:choose>
21 </xsl:attribute>
22
23 <xsl:value-of select=" document(concat($XML, @href))/article/@name |document(concat($XML, @href))/module/@name"/>
24
25 </a>
26 </xsl:template>
27
28 <xsl:template match="a[starts-with(@href, '/') and string() and contains(@href, '.xml')]">
29
30 <a>
31
32 <xsl:attribute name="href">
33 <xsl:choose>
34
35 <xsl:when test="starts-with(@href, $DIRNAME)">
36
37 <xsl:value-of select=" substring-after(document(concat($XML, @href))/article/@link |document(concat($XML, @href))/module/@link, $DIRNAME)"/>
38 </xsl:when>
39
40 <xsl:otherwise>
41
42 <xsl:value-of select=" concat($ROOT, document(concat($XML, @href))/article/@link |document(concat($XML, @href))/module/@link)"/>
43 </xsl:otherwise>
44 </xsl:choose>
45 </xsl:attribute>
46
47 <xsl:apply-templates/>
48
49 </a>
50 </xsl:template>
51
52 <xsl:template match="a">
53 <a href="{@href}">
54 <xsl:apply-templates/>
55 </a>
56 </xsl:template>
57 3
58 <xsl:template match="img"> 4 <xsl:template match="img">
59 <img src="{@href}"> 5 <img src="{@href}">
60 <xsl:apply-templates/> 6 <xsl:apply-templates/>
61 </img> 7 </img>
84 </xsl:template> 30 </xsl:template>
85 31
86 <xsl:template match="link[@doc and not(@id)]"> 32 <xsl:template match="link[@doc and not(@id)]">
87 33
88 <a href="{substring-before(@doc, '.xml')}.html"> 34 <a href="{substring-before(@doc, '.xml')}.html">
89 <xsl:apply-templates/> 35 <xsl:choose>
36
37 <xsl:when test="count(node()) != 0">
38
39 <xsl:apply-templates/>
40 </xsl:when>
41
42 <xsl:otherwise>
43
44 <xsl:value-of select=" document(@doc)/article/@name | document(@doc)/module/@name"/>
45 </xsl:otherwise>
46 </xsl:choose>
47
90 </a> 48 </a>
91 </xsl:template> 49 </xsl:template>
92 50
93 <xsl:template match="link[@id and @doc]"> 51 <xsl:template match="link[@id and @doc]">
94 52