Docbook 5.1 rng/schmatron validation errors

steve.cuzner
Posts: 64

Docbook 5.1 rng/schmatron validation errors

Tue Oct 06, 2015 6:30 pm

I've dowloaded the DocBook XInclude V5.1-CSPRD02 schemas from Oasis and I'm getting a schematron validation error. If I open docbookxi.rng and use the validation scenario Validate Relax NG Schema with embedded Schematron I get 307 errors related to undeclared namespace errors, for example:

System ID: T:\28\scuzner.Bdoctools.j276201\matlab\doc\tools\schemas\docbook\5.1\docbookxi.rng
Main validation file: T:\28\scuzner.Bdoctools.j276201\matlab\doc\tools\schemas\docbook\5.1\docbookxi.rng
Scenario name: Validate Relax NG schema with embedded Schematron
Document type: Relax NG
Engine name: ISO Schematron
Severity: error
Description: Stylesheet compilation failed: 306 errors reported

System ID: T:\28\scuzner.Bdoctools.j276201\matlab\doc\tools\schemas\docbook\5.1\docbookxi.rng
Main validation file: T:\28\scuzner.Bdoctools.j276201\matlab\doc\tools\schemas\docbook\5.1\docbookxi.rng
Scenario name: Validate Relax NG schema with embedded Schematron
Document type: Relax NG
Engine name: ISO Schematron
Severity: fatal
Description: XPST0081 XSLT Pattern syntax error at char 13 on line 1825 in {/db:procedure}: Undeclared namespace prefix {db}
Start location: 1825:48
URL: http://www.w3.org/TR/xpath20/#ERRXPST0081

System ID: T:\28\scuzner.Bdoctools.j276201\matlab\doc\tools\schemas\docbook\5.1\docbookxi.rng
Main validation file: T:\28\scuzner.Bdoctools.j276201\matlab\doc\tools\schemas\docbook\5.1\docbookxi.rng
Scenario name: Validate Relax NG schema with embedded Schematron
Document type: Relax NG
Engine name: ISO Schematron
Severity: fatal
Description: XPST0081 XSLT Pattern syntax error at char 8 on line 1874 in {/db:step}: Undeclared namespace prefix {db}
Start location: 1874:43
URL: http://www.w3.org/TR/xpath20/#ERRXPST0081

If I add

<s:ns prefix="db" uri="http://docbook.org/ns/docbook"/>
<s:ns prefix="xlink" uri="http://www.w3.org/1999/xlink"/>

to the grammar element of the rng file, it works fine.

Is this another schematron error in the docbook 5.1 schemas or is this a problem with the validation scenario?

Steve
radu_pisoi
Posts: 302
Location: Craiova

Re: Docbook 5.1 rng/schmatron validation errors

Wed Oct 07, 2015 4:08 pm

Hi,

This is a problem in the Docbook 5.1 schemas because the prefixes used in the Schematron expressions should be declared with the ns{http://purl.oclc.org/dsdl/schematron} directive.

Please see the section *5.4.7 ns element* from the ISO Schematron specification:
http://www.schematron.com/iso/P8.html
Radu Pisoi
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

Return to “DocBook”

Who is online

Users browsing this forum: No registered users and 0 guests