comparison xsls/dirmap.xsls @ 1200:333eccb8a7f6

Moved dir.map postprocessing into template.
author Maxim Dounin <mdounin@mdounin.ru>
date Wed, 21 May 2014 21:37:27 +0400
parents 166fd33afad1
children
comparison
equal deleted inserted replaced
1199:5ee8a00f2bc5 1200:333eccb8a7f6
3 --> 3 -->
4 4
5 X:stylesheet { 5 X:stylesheet {
6 6
7 X:output method="text"; 7 X:output method="text";
8
9 X:strip-space elements="*";
8 10
9 X:template = "link" { 11 X:template = "link" {
10 !{@id} 12 !{@id}
11 X:text{ } 13 X:text{ }
12 !{substring-before(@doc, '.xml')} 14 !{substring-before(@doc, '.xml')}
13 X:text{.html#} 15 X:text{.html#}
14 !{@id} 16 !{@id}
15 X:text{;&#10;} 17 X:text{;&#10;}
16 } 18 }
17 19
20 X:template = "link[@id = 'include']" {
21 X:text{\\}
22 !{@id}
23 X:text{ }
24 !{substring-before(@doc, '.xml')}
25 X:text{.html#}
26 !{@id}
27 X:text{;&#10;}
18 } 28 }
29
30 X:template = "link[starts-with(@id, 'var_')]" {
31 X:text{$}
32 !{substring-after(@id, 'var_')}
33 X:text{ }
34 !{substring-before(@doc, '.xml')}
35 X:text{.html#}
36 !{@id}
37 X:text{;&#10;}
38 }
39
40 X:template = "links | varlinks" {
41 X:for-each "link", X:sort "@id" {
42 X:if "count(preceding-sibling::link[@id = current()/@id]) = 0" {
43 !! ".";
44 }
45 }
46 }
47
48 }