1 |
swift 13/07/27 20:07:36 |
2 |
|
3 |
Modified: guidexml2wiki.xsl |
4 |
Log: |
5 |
No indentation when sentence starts with a tag |
6 |
|
7 |
Revision Changes Path |
8 |
1.7 xml/htdocs/xsl/guidexml2wiki.xsl |
9 |
|
10 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl?rev=1.7&view=markup |
11 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl?rev=1.7&content-type=text/plain |
12 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl?r1=1.6&r2=1.7 |
13 |
|
14 |
Index: guidexml2wiki.xsl |
15 |
=================================================================== |
16 |
RCS file: /var/cvsroot/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl,v |
17 |
retrieving revision 1.6 |
18 |
retrieving revision 1.7 |
19 |
diff -u -r1.6 -r1.7 |
20 |
--- guidexml2wiki.xsl 24 Jul 2013 20:51:35 -0000 1.6 |
21 |
+++ guidexml2wiki.xsl 27 Jul 2013 20:07:36 -0000 1.7 |
22 |
@@ -38,6 +38,7 @@ |
23 |
<!-- Ignore developers and subprojects as these will be provided by the wiki itself. --> |
24 |
<xsl:if test="not(title='Developers') and not(title='Subprojects')"> |
25 |
== <xsl:value-of select="title" /> ==<xsl:text> |
26 |
+ |
27 |
</xsl:text> |
28 |
<xsl:apply-templates /> |
29 |
</xsl:if> |
30 |
@@ -48,7 +49,9 @@ |
31 |
</xsl:text> |
32 |
</xsl:if> |
33 |
<xsl:if test="title"> |
34 |
-=== <xsl:value-of select="title" /> === |
35 |
+=== <xsl:value-of select="title" /> ===<xsl:text> |
36 |
+ |
37 |
+</xsl:text> |
38 |
</xsl:if> |
39 |
|
40 |
<xsl:apply-templates /> |
41 |
@@ -62,7 +65,7 @@ |
42 |
--> |
43 |
<xsl:template match="i"><xsl:apply-templates /></xsl:template> |
44 |
|
45 |
-<xsl:template match="mail"><xsl:text> </xsl:text><xsl:choose><xsl:when test="link">{{Mail|<xsl:value-of select="@link" />|<xsl:value-of select="normalize-space()" />}}</xsl:when><xsl:otherwise>{{Mail|<xsl:value-of select="normalize-space()" />}}</xsl:otherwise></xsl:choose></xsl:template> |
46 |
+<xsl:template match="mail"><xsl:if test="string-length(preceding-sibling::text()) > 1"><xsl:text> </xsl:text></xsl:if><xsl:choose><xsl:when test="link">{{Mail|<xsl:value-of select="@link" />|<xsl:value-of select="normalize-space()" />}}</xsl:when><xsl:otherwise>{{Mail|<xsl:value-of select="normalize-space()" />}}</xsl:otherwise></xsl:choose></xsl:template> |
47 |
|
48 |
<xsl:template match="p"><xsl:apply-templates /><xsl:text> |
49 |
|
50 |
@@ -87,7 +90,7 @@ |
51 |
--> |
52 |
<xsl:template match="const"><xsl:apply-templates /></xsl:template> |
53 |
|
54 |
-<xsl:template match="uri"><xsl:text> </xsl:text><xsl:choose><xsl:when test="starts-with(@link, 'http')">[<xsl:value-of select="@link" /><xsl:text> </xsl:text><xsl:value-of select="normalize-space(text())" />]</xsl:when><xsl:when test="not(starts-with(@link, '#'))">[http://www.gentoo.org/<xsl:value-of select="@link"/><xsl:text> </xsl:text><xsl:value-of select="normalize-space(text())" />]</xsl:when><xsl:when test="starts-with(@link, '#')">[[<xsl:value-of select="@link" />]]</xsl:when></xsl:choose><xsl:text> </xsl:text></xsl:template> |
55 |
+<xsl:template match="uri"><xsl:if test="string-length(preceding-sibling::text()) > 1"><xsl:text> </xsl:text></xsl:if><xsl:choose><xsl:when test="starts-with(@link, 'http')">[<xsl:value-of select="@link" /><xsl:text> </xsl:text><xsl:value-of select="normalize-space(text())" />]</xsl:when><xsl:when test="not(starts-with(@link, '#'))">[http://www.gentoo.org/<xsl:value-of select="@link"/><xsl:text> </xsl:text><xsl:value-of select="normalize-space(text())" />]</xsl:when><xsl:when test="starts-with(@link, '#')">[[<xsl:value-of select="@link" />]]</xsl:when></xsl:choose><xsl:if test="string-length(following-sibling::text()) > 1"><xsl:text> </xsl:text></xsl:if></xsl:template> |
56 |
|
57 |
<xsl:template match="e"> ''<xsl:apply-templates />'' </xsl:template> |
58 |
|
59 |
@@ -114,7 +117,7 @@ |
60 |
|
61 |
<xsl:template match="version" /> |
62 |
|
63 |
-<xsl:template match="c"> <code><xsl:apply-templates /></code> </xsl:template> |
64 |
+<xsl:template match="c"><xsl:if test="string-length(preceding-sibling::text()) > 1"><xsl:text> </xsl:text></xsl:if><code><xsl:apply-templates /></code><xsl:if test="string-length(following-sibling::text()) > 1"><xsl:text> </xsl:text></xsl:if></xsl:template> |
65 |
|
66 |
<xsl:template match="pre"><xsl:text> |
67 |
</xsl:text> |
68 |
@@ -128,7 +131,7 @@ |
69 |
|
70 |
<xsl:template match="path"> {{Path|<xsl:apply-templates />}} </xsl:template> |
71 |
|
72 |
-<xsl:template match="b"><xsl:text> </xsl:text>'''<xsl:apply-templates />'''<xsl:text> </xsl:text></xsl:template> |
73 |
+<xsl:template match="b"><xsl:if test="string-length(preceding-sibling::text()) > 1"><xsl:text> </xsl:text></xsl:if>'''<xsl:apply-templates />'''<xsl:if test="string-length(following-sibling::text()) > 1"><xsl:text> </xsl:text></xsl:if></xsl:template> |
74 |
|
75 |
<xsl:template match="warn"> |
76 |
{{Warning|<xsl:apply-templates />}} |