RELAX NG validation rejects valid document where content depends on attribute value
Using xmllint -relaxng, I get incorrect errors validating the attached spec.xml against spec.rng. Errors start like this:
build/spec.xml:263: element dfn: Relax-NG validity error : Did not expect element dfn there
build/spec.xml:263: element dfn: Relax-NG validity error : Element pre has extra content: dfn
Jing gets this right. I'm guessing that what is causing problems is that the allowed content for the pre element depends on the value of the class attribute.
The spec.rng file was generated from spec.rnc with trang.