GNOME Bugzilla – Bug 317821
RelaxNG <include> can't redefine deeply included define
Last modified: 2017-06-12 19:06:44 UTC
Please describe the problem: I want to include XHTML Basic 1.0 RelaxNG schema <http://www.thaiopensource.com/relaxng/xhtml/> and redefine some parts. For example, I want to remove <br>: <?xml version="1.0" encoding="windows-1251"?> <grammar xmlns="http://relaxng.org/ns/structure/1.0" ns="http://www.w3.org/1999/xhtml"> <include href="../xhtml/xhtml-basic.rng"> <define name="br"> <element name="br"> <notAllowed/> </element> </define> </include> </grammar> But I get the following error: .../1.1/text.rng:5: element include: Relax-NG parser error : xmlRelaxNG: include .../xhtml/xhtml-basic.rng has a define br but not the included grammar .../xhtml/modules/text.rng:5: element define: Relax-NG parser error : Some defines for br needs the combine attribute Relax-NG schema .../1.1/text.rng failed to compile xhtml-basic.rng consists only of <include>s of modules, so I suspected that the reason is that the reason is that redefined <define> is in <include> of <include>. I found that this is correct. After directly <include> of XHTML Basic RelaxNG schema modules, there were no errors. So the conclusion is that libxml2 2.6.16 can't redefine definition of <include> in <include>. I've not tested if this is the case with latest libxml2. Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
This bug was reported against a version which is not supported any more. Developers are no longer working on this version so there will not be any bug fixes for it. Can you please check again if the issue you reported here still happens in a recent version of GNOME and update this report by adding a comment and adjusting the 'Version' field? Again thank you for reporting this and sorry that it could not be fixed for the version you originally used here. Without feedback this report will be closed as INCOMPLETE after 6 weeks.