[postgis-tickets] [PostGIS] #5532: Improve validation of PostGIS Manual docbook (was: Validate postgis manual using XSD and RELAXNG schemas)
PostGIS
trac at osgeo.org
Tue Sep 12 15:47:27 PDT 2023
#5532: Improve validation of PostGIS Manual docbook
----------------------------+---------------------------
Reporter: strk | Owner: strk
Type: defect | Status: assigned
Priority: medium | Milestone: PostGIS 3.5.0
Component: documentation | Version: master
Resolution: | Keywords:
----------------------------+---------------------------
Changes (by strk):
* summary: Validate postgis manual using XSD and RELAXNG schemas =>
Improve validation of PostGIS Manual docbook
Old description:
> In addition (or instead of) using the DTD,
> 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
> }}}
New description:
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
}}}
--
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5532#comment:1>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list