All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabio M. Di Nitto <fdinitto@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH] config/tools/xml: validate resulting cluster.rng with relaxng.rng
Date: Thu, 07 Feb 2013 09:24:37 +0100	[thread overview]
Message-ID: <511364C5.9010607@redhat.com> (raw)
In-Reply-To: <1360183631-22334-1-git-send-email-jpokorny@redhat.com>

Hi Jan,

On 2/6/2013 9:47 PM, Jan Pokorn? wrote:
> Doing so will guarantee the file is valid RELAX NG schema, not just
> a valid XML.
> 
> Validating schema, relaxng.rng, was obtained directly from [1] and
> matches directly to a version bundled with xmlcopyeditor in Fedora 17.
> The same (modulo VCS headers, comments and spacing details) can be
> obtained by combining schema as in the specification [2] and its
> errata [3].
> 
> [1] http://relaxng.org/relaxng.rng
> [2] http://relaxng.org/spec-20011203.html
> [3] http://relaxng.org/spec-20011203-errata.html

this looks like a good idea, but i have one question.

Is there a specific reason why we need to ship/embed the file with our
tarball? How bad is it to require the one installed on a system?

I can see it?s rather stable and hardly updated, but i prefer to avoid
duplication if we can.

Fabio

> 
> Signed-off-by: Jan Pokorn? <jpokorny@redhat.com>
> ---
>  config/tools/xml/Makefile             |   2 +-
>  config/tools/xml/ccs_update_schema.in |   3 +-
>  config/tools/xml/relaxng.rng          | 335 ++++++++++++++++++++++++++++++++++
>  3 files changed, 338 insertions(+), 2 deletions(-)
>  create mode 100644 config/tools/xml/relaxng.rng
> 
> diff --git a/config/tools/xml/Makefile b/config/tools/xml/Makefile
> index 3c9e97c..a86eb01 100644
> --- a/config/tools/xml/Makefile
> +++ b/config/tools/xml/Makefile
> @@ -7,7 +7,7 @@ TARGET4 = cluster.rng
>  
>  SBINDIRT = $(TARGET1) $(TARGET2) $(TARGET3)
>  SHAREDIRSYMT = $(TARGET4)
> -RELAXNGDIRT = cluster.rng.in.head cluster.rng.in.tail
> +RELAXNGDIRT = cluster.rng.in.head cluster.rng.in.tail relaxng.rng
>  
>  all: $(TARGET1) $(TARGET2) $(TARGET3) $(TARGET4)
>  
> diff --git a/config/tools/xml/ccs_update_schema.in b/config/tools/xml/ccs_update_schema.in
> index a5aa351..16ce9f7 100644
> --- a/config/tools/xml/ccs_update_schema.in
> +++ b/config/tools/xml/ccs_update_schema.in
> @@ -316,7 +316,8 @@ build_schema() {
>  		return 1
>  	}
>  
> -	xmllint --noout $outputdir/cluster.rng || {
> +	xmllint --noout --relaxng $rngdir/relaxng.rng $outputdir/cluster.rng \
> +	  || {
>  		echo "generated schema does not pass xmllint validation" >&2
>  		return 1
>  	}



  reply	other threads:[~2013-02-07  8:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-06 20:47 [Cluster-devel] [PATCH] config/tools/xml: validate resulting cluster.rng with relaxng.rng Jan Pokorný
2013-02-07  8:24 ` Fabio M. Di Nitto [this message]
2013-02-07 10:49   ` Jan Pokorný

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=511364C5.9010607@redhat.com \
    --to=fdinitto@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.