1 |
neysx 07/11/06 00:09:04 |
2 |
|
3 |
Modified: guide.xsl |
4 |
Log: |
5 |
Test for removed chapters |
6 |
|
7 |
Revision Changes Path |
8 |
1.222 xml/htdocs/xsl/guide.xsl |
9 |
|
10 |
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/xsl/guide.xsl?rev=1.222&view=markup |
11 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/xsl/guide.xsl?rev=1.222&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/xsl/guide.xsl?r1=1.221&r2=1.222 |
13 |
|
14 |
Index: guide.xsl |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo/xml/htdocs/xsl/guide.xsl,v |
17 |
retrieving revision 1.221 |
18 |
retrieving revision 1.222 |
19 |
diff -u -r1.221 -r1.222 |
20 |
--- guide.xsl 10 Oct 2007 10:04:27 -0000 1.221 |
21 |
+++ guide.xsl 6 Nov 2007 00:09:04 -0000 1.222 |
22 |
@@ -1438,13 +1438,13 @@ |
23 |
<!-- Compare versions in master files --> |
24 |
<xsl:if test="$original/book/version != $translation/book/version">X</xsl:if> |
25 |
<!-- Compare versions in original chapters vs. translated chapters that have the same position --> |
26 |
- <xsl:for-each select="$original/book/part"> |
27 |
+ <xsl:for-each select="$translation/book/part"> |
28 |
<xsl:variable name="part" select="position()"/> |
29 |
<xsl:for-each select="chapter"> |
30 |
<xsl:variable name="chap" select="position()"/> |
31 |
<xsl:variable name="ov" select="document($original/book/part[$part]/chapter[$chap]/include/@href)/sections/version"/> |
32 |
<xsl:variable name="tv" select="document($translation/book/part[$part]/chapter[$chap]/include/@href)/sections/version"/> |
33 |
- <xsl:if test="$ov != $tv or not($tv)">X</xsl:if> |
34 |
+ <xsl:if test="$ov != $tv or not($tv) or not($ov)">X</xsl:if> |
35 |
</xsl:for-each> |
36 |
</xsl:for-each> |
37 |
</xsl:when> |
38 |
@@ -1456,6 +1456,7 @@ |
39 |
<!-- Compare chapters at same position (/$part/$chap/) in English handbook and in translated one --> |
40 |
<xsl:variable name="ov" select="document($original/book/part[position()=$part]/chapter[position()=$chap]/include/@href)/sections/version"/> |
41 |
<xsl:variable name="tv" select="document($translation/book/part[position()=$part]/chapter[position()=$chap]/include/@href)/sections/version"/> |
42 |
+ <xsl:if test="not ($ov)">NoOriginal</xsl:if> |
43 |
<xsl:if test="$ov != $tv or not($tv)">X</xsl:if> |
44 |
</xsl:otherwise> |
45 |
</xsl:choose> |
46 |
@@ -1559,20 +1560,25 @@ |
47 |
<xsl:with-param name="translation" select ="/"/> |
48 |
</xsl:call-template> |
49 |
</xsl:variable> |
50 |
- <xsl:if test="string-length($versions) > 0"> |
51 |
- <xsl:variable name="pdocdate"> |
52 |
- <xsl:call-template name="maxdate"> |
53 |
- <xsl:with-param name="thedoc" select="document($pfile)"/> |
54 |
- </xsl:call-template> |
55 |
- </xsl:variable> |
56 |
- <xsl:variable name="res"> |
57 |
- <xsl:apply-templates select="func:gettext('Outdated')"> |
58 |
- <xsl:with-param name="docdate" select="$pdocdate"/> |
59 |
- <xsl:with-param name="paramlink" select="$pfile"/> |
60 |
- </xsl:apply-templates> |
61 |
- </xsl:variable> |
62 |
- <xsl:copy-of select="$res"/> |
63 |
- </xsl:if> |
64 |
+ <xsl:choose> |
65 |
+ <xsl:when test="contains($versions,'NoOriginal')"> |
66 |
+ <xsl:value-of select="func:gettext('NoOriginal')"/> |
67 |
+ </xsl:when> |
68 |
+ <xsl:when test="string-length($versions) > 0"> |
69 |
+ <xsl:variable name="pdocdate"> |
70 |
+ <xsl:call-template name="maxdate"> |
71 |
+ <xsl:with-param name="thedoc" select="document($pfile)"/> |
72 |
+ </xsl:call-template> |
73 |
+ </xsl:variable> |
74 |
+ <xsl:variable name="res"> |
75 |
+ <xsl:apply-templates select="func:gettext('Outdated')"> |
76 |
+ <xsl:with-param name="docdate" select="$pdocdate"/> |
77 |
+ <xsl:with-param name="paramlink" select="$pfile"/> |
78 |
+ </xsl:apply-templates> |
79 |
+ </xsl:variable> |
80 |
+ <xsl:copy-of select="$res"/> |
81 |
+ </xsl:when> |
82 |
+ </xsl:choose> |
83 |
</xsl:otherwise> |
84 |
</xsl:choose> |
85 |
</xsl:otherwise> |
86 |
|
87 |
|
88 |
|
89 |
-- |
90 |
gentoo-commits@g.o mailing list |