[xml] problem with relaxng validation


I tried to validate some OpenOffice.org documents with xmllint with our relaxng schema (http://www.oasis-open.org/committees/download.php/6033/office-schema-1.0-cd-1.rng)

xmllint reports the following error when parsing the schema:
element ref: Relax-NG parser error : Found forbidden pattern list//ref

Although it is true, that the relaxng spec constraints refs in lists, constraints are only to be applied after simplification has occured. The simplification however would resolve the ref.

I suspect, that xmllint might try to check the constraints before the grammer is simplified (or the simplification of refs doesn't work as described in the specification)

Test case:
The following grammer should be a valid relaxng grammer but is rejected by the parser with the message: test.rng:17: element ref: Relax-NG parser error : Found forbidden pattern list//ref
Relax-NG schema test.rng failed to compile

<?xml version="1.0" encoding="UTF-8"?>

<define name="pattern1">
    <data type="string">
        <param name="pattern1">-?([0-9]+(\.[0-9]*)?|\.[0-9]+)</param>

<define name="list1">
        <attribute name="attr1" a:defaultValue="1.0">
                <ref name="pattern1"/>

    <element name="elem1">
        <ref name="list1"/>

Lars Oppermann <lars oppermann sun com>               Sun Microsystems
Software Engineer - StarOffice                           Sachsenfeld 4
Phone: +49 40 23646 959                                D-20097 Hamburg
Fax:   +49 40 23646 550                  http://www.sun.com/staroffice

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]