public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo commit in xml/htdocs/xsl: glsa.xsl
@ 2007-10-19 15:25 Xavier Neys (neysx)
  0 siblings, 0 replies; 3+ messages in thread
From: Xavier Neys (neysx) @ 2007-10-19 15:25 UTC (permalink / raw
  To: gentoo-commits

neysx       07/10/19 15:25:20

  Modified:             glsa.xsl
  Log:
  Make GLSAs generate valid GuideXML

Revision  Changes    Path
1.16                 xml/htdocs/xsl/glsa.xsl

file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/xsl/glsa.xsl?rev=1.16&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/xsl/glsa.xsl?rev=1.16&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/xsl/glsa.xsl?r1=1.15&r2=1.16

Index: glsa.xsl
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/xsl/glsa.xsl,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- glsa.xsl	9 Apr 2004 17:38:28 -0000	1.15
+++ glsa.xsl	19 Oct 2007 15:25:19 -0000	1.16
@@ -1,12 +1,20 @@
 <?xml version="1.0" encoding="iso-8859-1"?>
-<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-<xsl:output encoding="UTF-8" method="xml" indent="yes"/>
+<xsl:stylesheet version="1.0"
+                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:exslt="http://exslt.org/common"
+                xmlns:str="http://exslt.org/strings"
+                exclude-result-prefixes="exslt str">
+
+<xsl:output encoding="UTF-8"
+            method="xml"
+            indent="yes"
+            doctype-system="/dtd/guide.dtd"/>
 
 <xsl:template match="glsa">
 <guide>
 <title><xsl:value-of select="title"/></title>
 <author title="Contact Address">
-  <mail link="security@gentoo.org">security@gentoo.org</mail>
+  <mail link="security@gentoo.org">Security Team</mail>
 </author>
 <abstract>
 This is a Gentoo Linux Security Advisory
@@ -75,13 +83,14 @@
 <title>Synopsis</title>
 <body>
 
-<xsl:apply-templates select="synopsis"/>
+<p><xsl:apply-templates select="synopsis"/></p>
 
 </body>
 </section>
 </chapter>
 <chapter>
 <title>Impact Information</title>
+<xsl:if test="background">
 <section>
 <title>Background</title>
 <body>
@@ -90,6 +99,7 @@
 
 </body>
 </section>
+</xsl:if>
 <section>
 <title>Description</title>
 <body>
@@ -134,14 +144,7 @@
 
 <ul>
 <xsl:for-each select="references/uri">
-  <xsl:choose>
-    <xsl:when test="@link">
-      <li><uri link="{@link}"><xsl:value-of select="text()"/></uri></li>
-    </xsl:when>
-    <xsl:otherwise>
-      <li><uri link="{text()}"><xsl:value-of select="text()"/></uri></li>
-    </xsl:otherwise>
-  </xsl:choose>
+ <li><xsl:apply-templates select="."/></li>
 </xsl:for-each>
 </ul>
 
@@ -303,8 +306,10 @@
 </xsl:template>
 
 <xsl:template match="code">
-<pre>
-<xsl:apply-templates select="text()"/>
+<pre caption="{concat(translate(substring(name(..),1,1),'wrd','WRD'),substring(name(..),2))}">
+<xsl:for-each select="str:tokenize(text(),'&#xA;')">
+ <xsl:value-of select="concat(substring-after(.,'    '), '&#xA;')"/>
+</xsl:for-each>
 </pre>
 </xsl:template>
 
@@ -344,18 +349,33 @@
 <b><xsl:apply-templates/></b>
 </xsl:template>
 
-<xsl:template match="u">
-<u><xsl:apply-templates/></u>
-</xsl:template>
-
 <xsl:template match="i">
-<span class="input"><xsl:apply-templates/></span>
+<c><xsl:apply-templates/></c>
 </xsl:template>
 
 <xsl:template match="br">
 <br/>
 </xsl:template>
 
+<xsl:template match="mail|uri">
+ <xsl:element name="{name(.)}">
+  <xsl:choose>
+   <xsl:when test="translate(normalize-space(text()),' ','') = @link">
+    <xsl:value-of select="@link"/>
+   </xsl:when>
+   <xsl:when test="@link">
+    <xsl:attribute name="link">
+     <xsl:value-of select="@link"/>
+    </xsl:attribute>
+    <xsl:value-of select="normalize-space(.)"/>
+   </xsl:when>
+   <xsl:otherwise>
+    <xsl:value-of select="normalize-space(.)"/>
+   </xsl:otherwise>
+  </xsl:choose>
+ </xsl:element>
+</xsl:template>
+
 <xsl:template match="metadata">
 </xsl:template>
 



-- 
gentoo-commits@gentoo.org mailing list



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

* [gentoo-commits] gentoo commit in xml/htdocs/xsl: glsa.xsl
@ 2007-11-03 22:11 Xavier Neys (neysx)
  0 siblings, 0 replies; 3+ messages in thread
From: Xavier Neys (neysx) @ 2007-11-03 22:11 UTC (permalink / raw
  To: gentoo-commits

neysx       07/11/03 22:11:11

  Modified:             glsa.xsl
  Log:
  #198000 rlt,rle,rgt,rge have been half-implemented since 2004!

Revision  Changes    Path
1.17                 xml/htdocs/xsl/glsa.xsl

file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/xsl/glsa.xsl?rev=1.17&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/xsl/glsa.xsl?rev=1.17&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/xsl/glsa.xsl?r1=1.16&r2=1.17

Index: glsa.xsl
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/xsl/glsa.xsl,v
retrieving revision 1.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- glsa.xsl	19 Oct 2007 15:25:19 -0000	1.16
+++ glsa.xsl	3 Nov 2007 22:11:10 -0000	1.17
@@ -222,6 +222,18 @@
             <xsl:when test="@range = 'ge'">
               &gt;=
             </xsl:when>
+            <xsl:when test="@range = 'rlt'">
+              revision &lt;
+            </xsl:when>
+            <xsl:when test="@range = 'rle'">
+              revision &lt;=
+            </xsl:when>
+            <xsl:when test="@range = 'rgt'">
+              revision &gt;
+            </xsl:when>
+            <xsl:when test="@range = 'rge'">
+              revision &gt;=
+            </xsl:when>
           </xsl:choose>
         <xsl:if test="@name">
           <xsl:value-of select="@name"/>-



-- 
gentoo-commits@gentoo.org mailing list



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

* [gentoo-commits] gentoo commit in xml/htdocs/xsl: glsa.xsl
@ 2008-04-19 21:14 Xavier Neys (neysx)
  0 siblings, 0 replies; 3+ messages in thread
From: Xavier Neys (neysx) @ 2008-04-19 21:14 UTC (permalink / raw
  To: gentoo-commits

neysx       08/04/19 21:14:28

  Modified:             glsa.xsl
  Log:
  Be ready for revised/@count and yyyy-mm-dd dates

Revision  Changes    Path
1.19                 xml/htdocs/xsl/glsa.xsl

file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/xsl/glsa.xsl?rev=1.19&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/xsl/glsa.xsl?rev=1.19&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/xsl/glsa.xsl?r1=1.18&r2=1.19

Index: glsa.xsl
===================================================================
RCS file: /var/cvsroot/gentoo/xml/htdocs/xsl/glsa.xsl,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- glsa.xsl	13 Nov 2007 13:21:59 -0000	1.18
+++ glsa.xsl	19 Apr 2008 21:14:27 -0000	1.19
@@ -49,8 +49,14 @@
   <th>Latest Revision</th>
   <ti>
    <xsl:choose>
-    <xsl:when test="func:is-date(substring(revised,1,10))">
-     <xsl:value-of select="concat(func:format-date(substring(revised,1,10)),substring(revised,11))"/>
+    <xsl:when test="revised/@count and func:is-date(revised)='YES'">
+     <xsl:value-of select="concat(func:format-date(revised,'en'),'; ',revised/@count)"/>
+    </xsl:when>
+    <xsl:when test="func:is-date(revised)='YES'">
+     <xsl:value-of select="func:format-date(revised,'en')"/>
+    </xsl:when>
+    <xsl:when test="func:is-date(substring(revised,1,10))='YES'">
+     <xsl:value-of select="concat(func:format-date(substring(revised,1,10),'en'),substring(revised,11))"/>
     </xsl:when>
     <xsl:otherwise>
       <xsl:value-of select="revised"/>



-- 
gentoo-commits@lists.gentoo.org mailing list



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

end of thread, other threads:[~2008-04-19 21:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-03 22:11 [gentoo-commits] gentoo commit in xml/htdocs/xsl: glsa.xsl Xavier Neys (neysx)
  -- strict thread matches above, loose matches on Subject: below --
2008-04-19 21:14 Xavier Neys (neysx)
2007-10-19 15:25 Xavier Neys (neysx)

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