Re: [PATCH 2/2] news: Allow empty <section> elements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 30, 2017 at 03:45:27PM +0200, Andrea Bolognani wrote:
> 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    |  8 +++++---
>  docs/news.xml         |  9 ---------
>  docs/schemas/news.rng | 17 ++++++++---------
>  3 files changed, 13 insertions(+), 21 deletions(-)
> 
> diff --git a/docs/news-html.xsl b/docs/news-html.xsl
> index dcbab86..dd323f9 100644
> --- a/docs/news-html.xsl
> +++ b/docs/news-html.xsl
> @@ -57,9 +57,11 @@
>        <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>
>  
> diff --git a/docs/news.xml b/docs/news.xml
> index 9eb4d21..732d359 100644
> --- a/docs/news.xml
> +++ b/docs/news.xml
> @@ -23,19 +23,10 @@
>  
>    <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>
>  
> diff --git a/docs/schemas/news.rng b/docs/schemas/news.rng
> index 94a6870..9212c3c 100644
> --- a/docs/schemas/news.rng
> +++ b/docs/schemas/news.rng
> @@ -35,21 +35,20 @@
>        <attribute name="title">
>          <data type="string"/>
>        </attribute>
> -      <oneOrMore>
> -        <ref name="change"/>
> -      </oneOrMore>
> +      <optional>
> +        <oneOrMore>
> +          <ref name="change"/>
> +        </oneOrMore>
> +      </optional>
>      </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">

FYI, it looks like something in this change has broken schema validation
on RHEL-6 vintage libxml

https://ci.centos.org/view/libvirt/job/libvirt-master-check/systems=libvirt-centos-6/298/console

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux