public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo commit in xml/htdocs/xsl: guidexml2wiki.xsl
@ 2013-06-13 16:30 Sven Vermeulen (swift)
  0 siblings, 0 replies; 11+ messages in thread
From: Sven Vermeulen (swift) @ 2013-06-13 16:30 UTC (permalink / raw
  To: gentoo-commits

swift       13/06/13 16:30:44

  Added:                guidexml2wiki.xsl
  Log:
  Adding draft GuideXML-to-wiki stylesheet

Revision  Changes    Path
1.1                  xml/htdocs/xsl/guidexml2wiki.xsl

file : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl?rev=1.1&content-type=text/plain

Index: guidexml2wiki.xsl
===================================================================
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
                xmlns:exslt="http://exslt.org/common"
                xmlns:func="http://exslt.org/functions"
                xmlns:dyn="http://exslt.org/dynamic"
                xmlns:str="http://exslt.org/strings"

                xmlns:feed="http://www.w3.org/2005/Atom"

                xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/"
                exclude-result-prefixes="opensearch feed"

                extension-element-prefixes="exslt func dyn str" >

<xsl:output encoding="UTF-8" method="text" indent="no" />
<xsl:preserve-space elements="li p pre" />

<xsl:template match="guide"><xsl:apply-templates />
== Acknowledgements ==

We would like to thank the following authors and editors for their contributions to this guide:
<xsl:for-each select="//guide/author">
* <xsl:value-of select="mail" />
</xsl:for-each>

[[Category:Server and Security]]
</xsl:template>

<xsl:template match="author" />

<xsl:template match="abstract" />

<xsl:template match="chapter">

== <xsl:value-of select="title" /> ==
<xsl:apply-templates />
</xsl:template>

<xsl:template match="section">
<xsl:if test="preceding-sibling::section"><xsl:text>
</xsl:text>
</xsl:if>
=== <xsl:value-of select="title" /> ===

<xsl:apply-templates />
</xsl:template>

<xsl:template match="p">
<xsl:apply-templates /><xsl:text>

</xsl:text>
</xsl:template>

<xsl:template match="uri"><xsl:choose><xsl:when test="starts-with(@link, 'http')">[<xsl:value-of select="@link" /><xsl:text> </xsl:text><xsl:value-of select="text()" />]</xsl:when><xsl:otherwise> [[INTERNAL <xsl:value-of select="@link" />]] </xsl:otherwise></xsl:choose></xsl:template>

<xsl:template match="e"> ''<xsl:apply-templates />'' </xsl:template>

<xsl:template match="ul">
<xsl:apply-templates /><xsl:text>
</xsl:text>
</xsl:template>

<xsl:template match="ol">
<xsl:apply-templates /></xsl:template>

<xsl:template match="li">
<xsl:choose><xsl:when test="name(..)='ul'">* <xsl:apply-templates /></xsl:when><xsl:when test="name(..)='ol'"># <xsl:apply-templates /></xsl:when><xsl:otherwise>OH NOES HERE IT GOES!</xsl:otherwise></xsl:choose><xsl:text>
</xsl:text>
</xsl:template>

<xsl:template match="sup">&lt;sup&gt;<xsl:apply-templates />&lt;/sup&gt;</xsl:template>

<xsl:template match="sub">&lt;sub&gt;<xsl:apply-templates />&lt;/sub&gt;</xsl:template>

<xsl:template match="title" />

<xsl:template match="date" />

<xsl:template match="version" />

<xsl:template match="c"> '''<xsl:apply-templates />''' </xsl:template>

<xsl:template match="pre"><xsl:text>
</xsl:text>
<xsl:choose>
<xsl:when test="starts-with(normalize-space(), '~$') or starts-with(normalize-space(), '$')">
{{Cmd|INTERNAL commandhere|output=&lt;pre&gt;
<xsl:apply-templates />&lt;/pre&gt;
}}
</xsl:when>
<xsl:when test="starts-with(normalize-space(), '~#') or starts-with(normalize-space(), '#')">
{{RootCmd|INTERNAL commandhere|output=&lt;pre&gt;
<xsl:apply-templates />&lt;/pre&gt;
}}
</xsl:when>
<xsl:otherwise>
{{GenericCmd|&lt;pre&gt;
<xsl:apply-templates />&lt;/pre&gt;
}}
</xsl:otherwise>
</xsl:choose><xsl:text>
</xsl:text>
</xsl:template>

<xsl:template match="comment">## <xsl:apply-templates /></xsl:template>

<xsl:template match="path"> {{Path|<xsl:apply-templates />}} </xsl:template>

<xsl:template match="b">'''<xsl:apply-templates />'''</xsl:template>

<xsl:template match="warn">
{{Warning|<xsl:apply-templates />}}
</xsl:template>

<xsl:template match="impo">
{{Important|<xsl:apply-templates />}}
</xsl:template>

<xsl:template match="brite">'''<xsl:apply-templates />'''</xsl:template>

<xsl:template match="note">
{{Note|<xsl:apply-templates />}}
</xsl:template>

<xsl:template match="table">

{| class="wikitable" style="text-align: left;" <xsl:apply-templates />
|-
|}

</xsl:template>

<xsl:template match="tr">
|- <xsl:apply-templates />
</xsl:template>

<xsl:template match="th">
! <xsl:apply-templates />
</xsl:template>
<xsl:template match="ti">
| <xsl:apply-templates />
</xsl:template>

<xsl:template match="dl">
{| class="wikitable" style="text-align: left;"
<xsl:apply-templates />
|-
|}
</xsl:template>

<xsl:template match="dt">
! <xsl:apply-templates />
</xsl:template>

<xsl:template match="dd">
| <xsl:apply-templates />
</xsl:template>

<xsl:template match="text()">
<xsl:choose>
<xsl:when test="ancestor::pre"><xsl:value-of select="." /></xsl:when>
<xsl:otherwise>
<xsl:value-of select="normalize-space()" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>

</xsl:stylesheet>





^ permalink raw reply	[flat|nested] 11+ messages in thread

* [gentoo-commits] gentoo commit in xml/htdocs/xsl: guidexml2wiki.xsl
@ 2013-07-08 19:54 Sven Vermeulen (swift)
  0 siblings, 0 replies; 11+ messages in thread
From: Sven Vermeulen (swift) @ 2013-07-08 19:54 UTC (permalink / raw
  To: gentoo-commits

swift       13/07/08 19:54:35

  Modified:             guidexml2wiki.xsl
  Log:
  Updates on wikification of GuideXML, better newline handling

Revision  Changes    Path
1.2                  xml/htdocs/xsl/guidexml2wiki.xsl

file : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl?r1=1.1&r2=1.2

Index: guidexml2wiki.xsl
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- guidexml2wiki.xsl	13 Jun 2013 16:30:44 -0000	1.1
+++ guidexml2wiki.xsl	8 Jul 2013 19:54:35 -0000	1.2
@@ -13,15 +13,18 @@
                 extension-element-prefixes="exslt func dyn str" >
 
 <xsl:output encoding="UTF-8" method="text" indent="no" />
-<xsl:preserve-space elements="li p pre" />
+<xsl:preserve-space elements="pre" />
+<!-- <xsl:preserve-space elements="li p pre" /> -->
 
 <xsl:template match="guide"><xsl:apply-templates />
+<xsl:if test="//guide/author[not(@title='script generated')]">
 == Acknowledgements ==
 
 We would like to thank the following authors and editors for their contributions to this guide:
 <xsl:for-each select="//guide/author">
 * <xsl:value-of select="mail" />
 </xsl:for-each>
+</xsl:if>
 
 [[Category:Server and Security]]
 </xsl:template>
@@ -32,7 +35,9 @@
 
 <xsl:template match="chapter">
 
-== <xsl:value-of select="title" /> ==
+== <xsl:value-of select="title" /> ==<xsl:text>
+
+</xsl:text>
 <xsl:apply-templates />
 </xsl:template>
 
@@ -40,18 +45,47 @@
 <xsl:if test="preceding-sibling::section"><xsl:text>
 </xsl:text>
 </xsl:if>
+<xsl:if test="title">
 === <xsl:value-of select="title" /> ===
+</xsl:if>
 
 <xsl:apply-templates />
 </xsl:template>
 
-<xsl:template match="p">
-<xsl:apply-templates /><xsl:text>
+<xsl:template match="body"><xsl:apply-templates /></xsl:template>
+
+<!-- 
+  i is for in-pre commands, we cannot support that easily as we have no
+  knowledge of what needs to be RootCmd, UserCmd, what is output, etc.
+-->
+<xsl:template match="i"><xsl:apply-templates /></xsl:template>
+
+<xsl:template match="mail"><xsl:choose><xsl:when test="link">{{Mail|<xsl:value-of select="@link" />|<xsl:value-of select="text()" />}}</xsl:when><xsl:otherwise>{{Mail|<xsl:value-of select="text()" />}}</xsl:otherwise></xsl:choose></xsl:template>
+
+<xsl:template match="p"><xsl:apply-templates /><xsl:text> 
 
 </xsl:text>
 </xsl:template>
 
-<xsl:template match="uri"><xsl:choose><xsl:when test="starts-with(@link, 'http')">[<xsl:value-of select="@link" /><xsl:text> </xsl:text><xsl:value-of select="text()" />]</xsl:when><xsl:otherwise> [[INTERNAL <xsl:value-of select="@link" />]] </xsl:otherwise></xsl:choose></xsl:template>
+<xsl:template match="br" />
+<xsl:template match="license" />
+
+<!-- 
+     var is formatting in pre, difficult to handle this
+-->
+<xsl:template match="var"><xsl:apply-templates /></xsl:template>
+
+<!--
+     stmt is formatting in pre, difficult to handle this
+-->
+<xsl:template match="stmt"><xsl:apply-templates /></xsl:template>
+
+<!--
+     const is formatting in pre, difficult to handle this
+-->
+<xsl:template match="const"><xsl:apply-templates /></xsl:template>
+
+<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:choose><xsl:text> </xsl:text></xsl:template>
 
 <xsl:template match="e"> ''<xsl:apply-templates />'' </xsl:template>
 
@@ -159,9 +193,7 @@
 <xsl:template match="text()">
 <xsl:choose>
 <xsl:when test="ancestor::pre"><xsl:value-of select="." /></xsl:when>
-<xsl:otherwise>
-<xsl:value-of select="normalize-space()" />
-</xsl:otherwise>
+<xsl:otherwise><xsl:value-of select="normalize-space()" /></xsl:otherwise>
 </xsl:choose>
 </xsl:template>
 





^ permalink raw reply	[flat|nested] 11+ messages in thread

* [gentoo-commits] gentoo commit in xml/htdocs/xsl: guidexml2wiki.xsl
@ 2013-07-20 18:12 Sven Vermeulen (swift)
  0 siblings, 0 replies; 11+ messages in thread
From: Sven Vermeulen (swift) @ 2013-07-20 18:12 UTC (permalink / raw
  To: gentoo-commits

swift       13/07/20 18:12:53

  Modified:             guidexml2wiki.xsl
  Log:
  Fix command listing, use of c, author acknowledgements, multi-level indents (not fully, but much better)

Revision  Changes    Path
1.3                  xml/htdocs/xsl/guidexml2wiki.xsl

file : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl?rev=1.3&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl?rev=1.3&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl?r1=1.2&r2=1.3

Index: guidexml2wiki.xsl
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- guidexml2wiki.xsl	8 Jul 2013 19:54:35 -0000	1.2
+++ guidexml2wiki.xsl	20 Jul 2013 18:12:53 -0000	1.3
@@ -22,7 +22,7 @@
 
 We would like to thank the following authors and editors for their contributions to this guide:
 <xsl:for-each select="//guide/author">
-* <xsl:value-of select="mail" />
+* <xsl:choose><xsl:when test="mail/text()"><xsl:value-of select="mail" /></xsl:when><xsl:otherwise><xsl:value-of select="mail/@link" /></xsl:otherwise></xsl:choose>
 </xsl:for-each>
 </xsl:if>
 
@@ -34,11 +34,12 @@
 <xsl:template match="abstract" />
 
 <xsl:template match="chapter">
-
+<!-- Ignore developers and subprojects as these will be provided by the wiki itself. -->
+<xsl:if test="not(title='Developers') and not(title='Subprojects')">
 == <xsl:value-of select="title" /> ==<xsl:text>
-
 </xsl:text>
 <xsl:apply-templates />
+</xsl:if>
 </xsl:template>
 
 <xsl:template match="section">
@@ -60,7 +61,7 @@
 -->
 <xsl:template match="i"><xsl:apply-templates /></xsl:template>
 
-<xsl:template match="mail"><xsl:choose><xsl:when test="link">{{Mail|<xsl:value-of select="@link" />|<xsl:value-of select="text()" />}}</xsl:when><xsl:otherwise>{{Mail|<xsl:value-of select="text()" />}}</xsl:otherwise></xsl:choose></xsl:template>
+<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>
 
 <xsl:template match="p"><xsl:apply-templates /><xsl:text> 
 
@@ -89,8 +90,8 @@
 
 <xsl:template match="e"> ''<xsl:apply-templates />'' </xsl:template>
 
-<xsl:template match="ul">
-<xsl:apply-templates /><xsl:text>
+<xsl:template match="ul"><xsl:text>
+</xsl:text><xsl:apply-templates /><xsl:text>
 </xsl:text>
 </xsl:template>
 
@@ -98,7 +99,7 @@
 <xsl:apply-templates /></xsl:template>
 
 <xsl:template match="li">
-<xsl:choose><xsl:when test="name(..)='ul'">* <xsl:apply-templates /></xsl:when><xsl:when test="name(..)='ol'"># <xsl:apply-templates /></xsl:when><xsl:otherwise>OH NOES HERE IT GOES!</xsl:otherwise></xsl:choose><xsl:text>
+<xsl:choose><xsl:when test="name(..)='ul'"><xsl:for-each select="ancestor::ul|ancestor::ol">*</xsl:for-each><xsl:text> </xsl:text><xsl:apply-templates /></xsl:when><xsl:when test="name(..)='ol'"><xsl:for-each select="ancestor::ol|ancestor::ul">#</xsl:for-each><xsl:text> </xsl:text><xsl:apply-templates /></xsl:when><xsl:otherwise>OH NOES HERE IT GOES!</xsl:otherwise></xsl:choose><xsl:text>
 </xsl:text>
 </xsl:template>
 
@@ -112,27 +113,13 @@
 
 <xsl:template match="version" />
 
-<xsl:template match="c"> '''<xsl:apply-templates />''' </xsl:template>
+<xsl:template match="c"> &lt;code&gt;<xsl:apply-templates />&lt;/code&gt; </xsl:template>
 
 <xsl:template match="pre"><xsl:text>
 </xsl:text>
-<xsl:choose>
-<xsl:when test="starts-with(normalize-space(), '~$') or starts-with(normalize-space(), '$')">
-{{Cmd|INTERNAL commandhere|output=&lt;pre&gt;
-<xsl:apply-templates />&lt;/pre&gt;
-}}
-</xsl:when>
-<xsl:when test="starts-with(normalize-space(), '~#') or starts-with(normalize-space(), '#')">
-{{RootCmd|INTERNAL commandhere|output=&lt;pre&gt;
-<xsl:apply-templates />&lt;/pre&gt;
-}}
-</xsl:when>
-<xsl:otherwise>
-{{GenericCmd|&lt;pre&gt;
-<xsl:apply-templates />&lt;/pre&gt;
+{{GenericCmd|&lt;pre&gt;<xsl:apply-templates />&lt;/pre&gt;
 }}
-</xsl:otherwise>
-</xsl:choose><xsl:text>
+<xsl:text>
 </xsl:text>
 </xsl:template>
 
@@ -140,7 +127,7 @@
 
 <xsl:template match="path"> {{Path|<xsl:apply-templates />}} </xsl:template>
 
-<xsl:template match="b">'''<xsl:apply-templates />'''</xsl:template>
+<xsl:template match="b"><xsl:text> </xsl:text>'''<xsl:apply-templates />'''<xsl:text> </xsl:text></xsl:template>
 
 <xsl:template match="warn">
 {{Warning|<xsl:apply-templates />}}





^ permalink raw reply	[flat|nested] 11+ messages in thread

* [gentoo-commits] gentoo commit in xml/htdocs/xsl: guidexml2wiki.xsl
@ 2013-07-22 11:57 Sven Vermeulen (swift)
  0 siblings, 0 replies; 11+ messages in thread
From: Sven Vermeulen (swift) @ 2013-07-22 11:57 UTC (permalink / raw
  To: gentoo-commits

swift       13/07/22 11:57:32

  Modified:             guidexml2wiki.xsl
  Log:
  XML pre is best handled by the {{Code}} template as we can then use the @caption information

Revision  Changes    Path
1.4                  xml/htdocs/xsl/guidexml2wiki.xsl

file : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl?rev=1.4&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl?rev=1.4&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl?r1=1.3&r2=1.4

Index: guidexml2wiki.xsl
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- guidexml2wiki.xsl	20 Jul 2013 18:12:53 -0000	1.3
+++ guidexml2wiki.xsl	22 Jul 2013 11:57:32 -0000	1.4
@@ -117,7 +117,7 @@
 
 <xsl:template match="pre"><xsl:text>
 </xsl:text>
-{{GenericCmd|&lt;pre&gt;<xsl:apply-templates />&lt;/pre&gt;
+{{Code|<xsl:value-of select="@caption" />|&lt;pre&gt;<xsl:apply-templates />&lt;/pre&gt;
 }}
 <xsl:text>
 </xsl:text>





^ permalink raw reply	[flat|nested] 11+ messages in thread

* [gentoo-commits] gentoo commit in xml/htdocs/xsl: guidexml2wiki.xsl
@ 2013-07-22 13:48 Sven Vermeulen (swift)
  0 siblings, 0 replies; 11+ messages in thread
From: Sven Vermeulen (swift) @ 2013-07-22 13:48 UTC (permalink / raw
  To: gentoo-commits

swift       13/07/22 13:48:21

  Modified:             guidexml2wiki.xsl
  Log:
  Make sure main author, if no e-mail is specified, is still listed

Revision  Changes    Path
1.5                  xml/htdocs/xsl/guidexml2wiki.xsl

file : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl?rev=1.5&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl?rev=1.5&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl?r1=1.4&r2=1.5

Index: guidexml2wiki.xsl
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- guidexml2wiki.xsl	22 Jul 2013 11:57:32 -0000	1.4
+++ guidexml2wiki.xsl	22 Jul 2013 13:48:20 -0000	1.5
@@ -22,7 +22,7 @@
 
 We would like to thank the following authors and editors for their contributions to this guide:
 <xsl:for-each select="//guide/author">
-* <xsl:choose><xsl:when test="mail/text()"><xsl:value-of select="mail" /></xsl:when><xsl:otherwise><xsl:value-of select="mail/@link" /></xsl:otherwise></xsl:choose>
+* <xsl:choose><xsl:when test="mail/text()"><xsl:value-of select="mail" /></xsl:when><xsl:when test="mail"><xsl:value-of select="mail/@link" /></xsl:when><xsl:otherwise><xsl:value-of select="normalize-space()" /></xsl:otherwise></xsl:choose>
 </xsl:for-each>
 </xsl:if>
 





^ permalink raw reply	[flat|nested] 11+ messages in thread

* [gentoo-commits] gentoo commit in xml/htdocs/xsl: guidexml2wiki.xsl
@ 2013-07-24 20:51 Sven Vermeulen (swift)
  0 siblings, 0 replies; 11+ messages in thread
From: Sven Vermeulen (swift) @ 2013-07-24 20:51 UTC (permalink / raw
  To: gentoo-commits

swift       13/07/24 20:51:35

  Modified:             guidexml2wiki.xsl
  Log:
  Use abstract at beginning of wiki article, and create internal link when needed

Revision  Changes    Path
1.6                  xml/htdocs/xsl/guidexml2wiki.xsl

file : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl?rev=1.6&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl?rev=1.6&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl?r1=1.5&r2=1.6

Index: guidexml2wiki.xsl
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- guidexml2wiki.xsl	22 Jul 2013 13:48:20 -0000	1.5
+++ guidexml2wiki.xsl	24 Jul 2013 20:51:35 -0000	1.6
@@ -16,7 +16,8 @@
 <xsl:preserve-space elements="pre" />
 <!-- <xsl:preserve-space elements="li p pre" /> -->
 
-<xsl:template match="guide"><xsl:apply-templates />
+<xsl:template match="guide"><xsl:value-of select="normalize-space(abstract)" />
+<xsl:apply-templates />
 <xsl:if test="//guide/author[not(@title='script generated')]">
 == Acknowledgements ==
 
@@ -86,7 +87,7 @@
 -->
 <xsl:template match="const"><xsl:apply-templates /></xsl:template>
 
-<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:choose><xsl:text> </xsl:text></xsl:template>
+<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>
 
 <xsl:template match="e"> ''<xsl:apply-templates />'' </xsl:template>
 





^ permalink raw reply	[flat|nested] 11+ messages in thread

* [gentoo-commits] gentoo commit in xml/htdocs/xsl: guidexml2wiki.xsl
@ 2013-07-27 20:07 Sven Vermeulen (swift)
  0 siblings, 0 replies; 11+ messages in thread
From: Sven Vermeulen (swift) @ 2013-07-27 20:07 UTC (permalink / raw
  To: gentoo-commits

swift       13/07/27 20:07:36

  Modified:             guidexml2wiki.xsl
  Log:
  No indentation when sentence starts with a tag

Revision  Changes    Path
1.7                  xml/htdocs/xsl/guidexml2wiki.xsl

file : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl?rev=1.7&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl?rev=1.7&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl?r1=1.6&r2=1.7

Index: guidexml2wiki.xsl
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- guidexml2wiki.xsl	24 Jul 2013 20:51:35 -0000	1.6
+++ guidexml2wiki.xsl	27 Jul 2013 20:07:36 -0000	1.7
@@ -38,6 +38,7 @@
 <!-- Ignore developers and subprojects as these will be provided by the wiki itself. -->
 <xsl:if test="not(title='Developers') and not(title='Subprojects')">
 == <xsl:value-of select="title" /> ==<xsl:text>
+
 </xsl:text>
 <xsl:apply-templates />
 </xsl:if>
@@ -48,7 +49,9 @@
 </xsl:text>
 </xsl:if>
 <xsl:if test="title">
-=== <xsl:value-of select="title" /> ===
+=== <xsl:value-of select="title" /> ===<xsl:text>
+
+</xsl:text>
 </xsl:if>
 
 <xsl:apply-templates />
@@ -62,7 +65,7 @@
 -->
 <xsl:template match="i"><xsl:apply-templates /></xsl:template>
 
-<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>
+<xsl:template match="mail"><xsl:if test="string-length(preceding-sibling::text()) &gt; 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>
 
 <xsl:template match="p"><xsl:apply-templates /><xsl:text> 
 
@@ -87,7 +90,7 @@
 -->
 <xsl:template match="const"><xsl:apply-templates /></xsl:template>
 
-<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>
+<xsl:template match="uri"><xsl:if test="string-length(preceding-sibling::text()) &gt; 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()) &gt; 1"><xsl:text> </xsl:text></xsl:if></xsl:template>
 
 <xsl:template match="e"> ''<xsl:apply-templates />'' </xsl:template>
 
@@ -114,7 +117,7 @@
 
 <xsl:template match="version" />
 
-<xsl:template match="c"> &lt;code&gt;<xsl:apply-templates />&lt;/code&gt; </xsl:template>
+<xsl:template match="c"><xsl:if test="string-length(preceding-sibling::text()) &gt; 1"><xsl:text> </xsl:text></xsl:if>&lt;code&gt;<xsl:apply-templates />&lt;/code&gt;<xsl:if test="string-length(following-sibling::text()) &gt; 1"><xsl:text> </xsl:text></xsl:if></xsl:template>
 
 <xsl:template match="pre"><xsl:text>
 </xsl:text>
@@ -128,7 +131,7 @@
 
 <xsl:template match="path"> {{Path|<xsl:apply-templates />}} </xsl:template>
 
-<xsl:template match="b"><xsl:text> </xsl:text>'''<xsl:apply-templates />'''<xsl:text> </xsl:text></xsl:template>
+<xsl:template match="b"><xsl:if test="string-length(preceding-sibling::text()) &gt; 1"><xsl:text> </xsl:text></xsl:if>'''<xsl:apply-templates />'''<xsl:if test="string-length(following-sibling::text()) &gt; 1"><xsl:text> </xsl:text></xsl:if></xsl:template>
 
 <xsl:template match="warn">
 {{Warning|<xsl:apply-templates />}}





^ permalink raw reply	[flat|nested] 11+ messages in thread

* [gentoo-commits] gentoo commit in xml/htdocs/xsl: guidexml2wiki.xsl
@ 2013-08-03 16:35 Sven Vermeulen (swift)
  0 siblings, 0 replies; 11+ messages in thread
From: Sven Vermeulen (swift) @ 2013-08-03 16:35 UTC (permalink / raw
  To: gentoo-commits

swift       13/08/03 16:35:01

  Modified:             guidexml2wiki.xsl
  Log:
  Support include directive as used by gentoo-x86-quickinstall.xml

Revision  Changes    Path
1.8                  xml/htdocs/xsl/guidexml2wiki.xsl

file : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl?rev=1.8&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl?rev=1.8&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl?r1=1.7&r2=1.8

Index: guidexml2wiki.xsl
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- guidexml2wiki.xsl	27 Jul 2013 20:07:36 -0000	1.7
+++ guidexml2wiki.xsl	3 Aug 2013 16:35:01 -0000	1.8
@@ -53,8 +53,22 @@
 
 </xsl:text>
 </xsl:if>
+<xsl:choose>
+<xsl:when test="include">
+<xsl:variable name="doc" select="include/@href" />
+<xsl:for-each select="document($doc)/included/section">
+<xsl:if test="title">
+=== <xsl:value-of select="title" /> ===<xsl:text>
 
+</xsl:text>
+</xsl:if>
 <xsl:apply-templates />
+</xsl:for-each>
+</xsl:when>
+<xsl:otherwise>
+<xsl:apply-templates />
+</xsl:otherwise>
+</xsl:choose>
 </xsl:template>
 
 <xsl:template match="body"><xsl:apply-templates /></xsl:template>





^ permalink raw reply	[flat|nested] 11+ messages in thread

* [gentoo-commits] gentoo commit in xml/htdocs/xsl: guidexml2wiki.xsl
@ 2013-08-29 18:56 Sven Vermeulen (swift)
  0 siblings, 0 replies; 11+ messages in thread
From: Sven Vermeulen (swift) @ 2013-08-29 18:56 UTC (permalink / raw
  To: gentoo-commits

swift       13/08/29 18:56:10

  Modified:             guidexml2wiki.xsl
  Log:
  Do not put in additional # for comments

Revision  Changes    Path
1.9                  xml/htdocs/xsl/guidexml2wiki.xsl

file : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl?rev=1.9&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl?rev=1.9&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl?r1=1.8&r2=1.9

Index: guidexml2wiki.xsl
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- guidexml2wiki.xsl	3 Aug 2013 16:35:01 -0000	1.8
+++ guidexml2wiki.xsl	29 Aug 2013 18:56:10 -0000	1.9
@@ -141,7 +141,7 @@
 </xsl:text>
 </xsl:template>
 
-<xsl:template match="comment">## <xsl:apply-templates /></xsl:template>
+<xsl:template match="comment"><xsl:apply-templates /></xsl:template>
 
 <xsl:template match="path"> {{Path|<xsl:apply-templates />}} </xsl:template>
 





^ permalink raw reply	[flat|nested] 11+ messages in thread

* [gentoo-commits] gentoo commit in xml/htdocs/xsl: guidexml2wiki.xsl
@ 2013-12-09  8:47 Sven Vermeulen (swift)
  0 siblings, 0 replies; 11+ messages in thread
From: Sven Vermeulen (swift) @ 2013-12-09  8:47 UTC (permalink / raw
  To: gentoo-commits

swift       13/12/09 08:47:06

  Modified:             guidexml2wiki.xsl
  Log:
  Fix namelinks uri usage

Revision  Changes    Path
1.10                 xml/htdocs/xsl/guidexml2wiki.xsl

file : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl?rev=1.10&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl?rev=1.10&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl?r1=1.9&r2=1.10

Index: guidexml2wiki.xsl
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- guidexml2wiki.xsl	29 Aug 2013 18:56:10 -0000	1.9
+++ guidexml2wiki.xsl	9 Dec 2013 08:47:06 -0000	1.10
@@ -104,7 +104,7 @@
 -->
 <xsl:template match="const"><xsl:apply-templates /></xsl:template>
 
-<xsl:template match="uri"><xsl:if test="string-length(preceding-sibling::text()) &gt; 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()) &gt; 1"><xsl:text> </xsl:text></xsl:if></xsl:template>
+<xsl:template match="uri"><xsl:if test="string-length(preceding-sibling::text()) &gt; 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(@link)">[<xsl:value-of select="normalize-space(text())" /><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()) &gt; 1"><xsl:text> </xsl:text></xsl:if></xsl:template>
 
 <xsl:template match="e"> ''<xsl:apply-templates />'' </xsl:template>
 





^ permalink raw reply	[flat|nested] 11+ messages in thread

* [gentoo-commits] gentoo commit in xml/htdocs/xsl: guidexml2wiki.xsl
@ 2015-01-03 17:49 Sven Vermeulen (swift)
  0 siblings, 0 replies; 11+ messages in thread
From: Sven Vermeulen (swift) @ 2015-01-03 17:49 UTC (permalink / raw
  To: gentoo-commits

swift       15/01/03 17:49:07

  Modified:             guidexml2wiki.xsl
  Log:
  Use CodeBox in XSL

Revision  Changes    Path
1.11                 xml/htdocs/xsl/guidexml2wiki.xsl

file : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl?rev=1.11&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl?rev=1.11&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl?r1=1.10&r2=1.11

Index: guidexml2wiki.xsl
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/xsl/guidexml2wiki.xsl,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- guidexml2wiki.xsl	9 Dec 2013 08:47:06 -0000	1.10
+++ guidexml2wiki.xsl	3 Jan 2015 17:49:07 -0000	1.11
@@ -135,7 +135,7 @@
 
 <xsl:template match="pre"><xsl:text>
 </xsl:text>
-{{Code|<xsl:value-of select="@caption" />|&lt;pre&gt;<xsl:apply-templates />&lt;/pre&gt;
+{{CodeBox|title=<xsl:value-of select="@caption" />|&lt;pre&gt;<xsl:apply-templates />&lt;/pre&gt;
 }}
 <xsl:text>
 </xsl:text>





^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2015-01-03 17:49 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-29 18:56 [gentoo-commits] gentoo commit in xml/htdocs/xsl: guidexml2wiki.xsl Sven Vermeulen (swift)
  -- strict thread matches above, loose matches on Subject: below --
2015-01-03 17:49 Sven Vermeulen (swift)
2013-12-09  8:47 Sven Vermeulen (swift)
2013-08-03 16:35 Sven Vermeulen (swift)
2013-07-27 20:07 Sven Vermeulen (swift)
2013-07-24 20:51 Sven Vermeulen (swift)
2013-07-22 13:48 Sven Vermeulen (swift)
2013-07-22 11:57 Sven Vermeulen (swift)
2013-07-20 18:12 Sven Vermeulen (swift)
2013-07-08 19:54 Sven Vermeulen (swift)
2013-06-13 16:30 Sven Vermeulen (swift)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox