Re: [xml] libxml2 Relax NG include bug?


Following up again:

I think I tracked down the bug. The relaxng.c checks for the URL on the doc object to determine the base. This URL exists on the original xmlDoc* I pass in, but xmlRelaxNGNewDocParserCtxt makes a *copy* of this document using xmlCopyDoc(). This doesn't copy the URL, so the URL will be NULL.

I don't know whether the bug is in xmlCopyDoc not copying the URL, or whether the Relax NG engine should be doing this itself. If the latter, then you could add this to xmlRelaxNGNewDocParserCtxt:

copy->URL = xmlStrdup(doc->URL);

the Relax NG include behavior will then be as expected.



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