config/tools/xml: validate resulting cluster.rng with relaxng.rng
PATCH 1/1 config/tools/xml: validate resulting cluster.rng with relaxng.rng
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
--- 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
config/tools/xml/Makefile +1 -1
@@ -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)
config/tools/xml/ccs_update_schema.in +2 -1
@@ -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 }
config/tools/xml/relaxng.rng new file +335 -0
335 lines not on this page · raw message
Signature · 1 line
1.7.11.7
PATCH 1/1 config/tools/xml: validate resulting cluster.rng with relaxng.rng
Hi Jan,
Quoted 9 lines · Jan Pokorn?
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].
Quoted 3 lines
[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
Quoted 36 lines
Signed-off-by Jan Pokorn? <[email protected]>--- 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.rngconfig/tools/xml/Makefile +1
-1@@ -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)config/tools/xml/ccs_update_schema.in +2
-1@@ -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 }
PATCH 1/1 config/tools/xml: validate resulting cluster.rng with relaxng.rng
Hello ,
Quoted 12 lines · Fabio M. Di Nitto
Hi Jan,
Quoted 9 lines · Jan Pokorn?
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].
Quoted 8 lines
Quoted 3 lines
[1] http://relaxng.org/relaxng.rng
[2] http://relaxng.org/spec-20011203.html
[3] http://relaxng.org/spec-20011203-errata.htmlthis 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?
It is not bad at all, but you can hardly find it system-wide. AFAIK there is no standard in packaging such standalone single files anywhere yet (see also, e.g., JavaScript libraries, everything is usually bundled). Once there is a wide-spread standard (if ever) where such files are located within the distributions, relaxng.rng can be dropped and dependency can be added.
Quoted 2 lines
I can see it?s rather stable and hardly updated, but i prefer to avoid duplication if we can.
I share the same intention, however current situation does not seem to be offering any other choice.
Signature · 1 line
Jan