]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
news: Allow empty <section> elements
authorAndrea Bolognani <abologna@redhat.com>
Tue, 28 Mar 2017 15:13:39 +0000 (17:13 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Mon, 3 Apr 2017 08:49:42 +0000 (10:49 +0200)
Creating dummy <change> elements was a workaround for the
HTML DTD not allowing empty <ul> elements, but we can do
better by tweaking the the XSLT stylesheet.

docs/news-html.xsl
docs/news.xml
docs/schemas/news.rng

index dcbab86842611168514bd01c3045ce7c4817fae9..dd323f9b3fd5206f4b05eabbdfc3a841e8e1f282 100644 (file)
       <strong>
         <xsl:value-of select="@title"/>
       </strong>
-      <ul>
-        <xsl:apply-templates select="change"/>
-      </ul>
+      <xsl:if test="*">
+        <ul>
+          <xsl:apply-templates select="change"/>
+        </ul>
+      </xsl:if>
     </li>
   </xsl:template>
 
index 014a439f199f5d871c59258b1db76bdba26308e0..9c0dcfd23d64ab58c69c2fa6bd38e237178f40b9 100644 (file)
 
   <release version="FIXME" date="unreleased">
     <section title="New features">
-      <change>
-        <summary/>
-      </change>
     </section>
     <section title="Improvements">
-      <change>
-        <summary/>
-      </change>
     </section>
     <section title="Bug fixes">
-      <change>
-        <summary/>
-      </change>
     </section>
   </release>
 
 <libvirt>
   <release version="v3.3.0" date="unreleased">
     <section title="New features">
-      <change>
-        <summary/>
-      </change>
     </section>
     <section title="Improvements">
-      <change>
-        <summary/>
-      </change>
     </section>
     <section title="Bug fixes">
-      <change>
-        <summary/>
-      </change>
     </section>
   </release>
   <release version="v3.2.0" date="2017-04-02">
index 94a6870c18ffe8e403766c12ff9f0e3f85a2a7ed..ec4313f621a41bd7706ce3e764831498fccae54e 100644 (file)
       <attribute name="title">
         <data type="string"/>
       </attribute>
-      <oneOrMore>
+      <zeroOrMore>
         <ref name="change"/>
-      </oneOrMore>
+      </zeroOrMore>
     </element>
   </define>
 
   <define name="change">
     <element name="change">
       <element name="summary">
-        <choice>
-          <data type="string">
-            <param name="pattern">\n[^\n]+\n +</param>
-          </data>
-          <empty/>
-        </choice>
+        <data type="string">
+          <param name="pattern">\n[^\n]+\n +</param>
+        </data>
       </element>
       <optional>
         <element name="description">