Schematron Assert rule embedded in RelaxNG produces undeclared namespace prefix error

Here are some options:

  1. Namespace prefixes used in assert tests in Schemetron must be declared using the Schematron ns element. Add the following as the first child within <grammar> in the RelaxNG schema:

    <sch:ns prefix="aid" uri=""/>

  2. Alternatively, you can assert the namespace of the attributes within the assert test by using the xPath namespace-uri() function. Change:



    @*:trows[namespace-uri() = '']

    (and the same for tcols).

  3. Or, if you’re lazy, you can use @*:trows, which will select trows attributes of any namespace.

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top