Opened 16 months ago
Last modified 3 months ago
#5532 assigned defect
Improve validation of PostGIS Manual docbook
Reported by: | strk | Owned by: | strk |
---|---|---|---|
Priority: | medium | Milestone: | PostGIS 3.6.0 |
Component: | documentation | Version: | master |
Keywords: | Cc: |
Description (last modified by )
In addition (or instead of) using the DTD, we could use XMLSchema, RelaxNG and maybe Schematron. xmllint supports these switches:
—schema http://docbook.org/xml/5.0/xsd/docbook.xsd —relaxng http://docbook.org/xml/5.0/rng/docbook.rng
In both cases the URIs are looked up in xml catalogs, and we could use the xmlcatalog
tool to verify local versions exist at configure time, this is what I have in my system:
$ xmlcatalog "" 'http://docbook.org/xml/5.0/xsd/docbook.xsd' file:///usr/share/xml/docbook/schema/xsd/5.0/docbook.xsd $ xmlcatalog "" 'http://docbook.org/xml/5.0/rng/docbook.rng' file:///usr/share/xml/docbook/schema/rng/5.0/docbook.rng
I also seem to have a Schematron file, but when I try to use it I get an error:
$ xmllint --noout --nonet --schematron /usr/share/xml/docbook/schema/schematron/5.0/docbook.sch postgis-out.xml /usr/share/xml/docbook/schema/schematron/5.0/docbook.sch:6: element rule: Schemas parser error : Failed to compile context expression db:firstterm[@linkend] /usr/share/xml/docbook/schema/schematron/5.0/docbook.sch:16: element rule: Schemas parser error : Failed to compile context expression db:glossterm[@linkend] /usr/share/xml/docbook/schema/schematron/5.0/docbook.sch:26: element rule: Schemas parser error : Failed to compile context expression db:glosssee[@otherterm] /usr/share/xml/docbook/schema/schematron/5.0/docbook.sch:31: element rule: Schemas parser error : Failed to compile context expression db:glossseealso[@otherterm] Schematron schema /usr/share/xml/docbook/schema/schematron/5.0/docbook.sch failed to compile
Change History (5)
comment:1 by , 16 months ago
Description: | modified (diff) |
---|---|
Summary: | Validate postgis manual using XSD and RELAXNG schemas → Improve validation of PostGIS Manual docbook |
comment:2 by , 16 months ago
comment:4 by , 16 months ago
Now only schematron is missing, but 5.0 (packaged in Ubuntu-22.04) is known to be bogus while 5.1 is reportedly ok. Using 5.1 might require us to include the file in our repo using a custom catalog, not sure it's worth at this time
comment:5 by , 3 months ago
Milestone: | PostGIS 3.5.0 → PostGIS 3.6.0 |
---|
Schematron resolve too, here's the correct URI:
It still fails to compile for me though