You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have noticed that cxml is looping for a certain combination of xml/dtd. It loops in the recurse function inside compile-content-model in xml-parse.lisp. I have put a lot of time on trying to understand how the code is supposed to work but without success.
It would be great if someone knowing the code could have a look at this!
Unfortunately I had to rewrite compile-content-model in order to understand it, so the patch can't be applied directly, but the loop is due to left recursion. The fix is just a special variable to detect left recursion and break the loop.
Thanks @ruricolist!
Good to hear that I'm not the only to find compile-content-model hard to understand :-).
I made a pull request #10 which seems to fix the problem.
I have noticed that cxml is looping for a certain combination of xml/dtd. It
loops in the recurse function inside compile-content-model in xml-parse.lisp
. I have put a lot of time on trying to understand how the code is supposed to work but without success.It would be great if someone knowing the code could have a look at this!
A minimal reproducible case is available here https://doremir.com/files/cxml/xml-test.zip.
The xml file from the case looks like this:
And the dtd file looks like this:
The real world case is from parsing MusicXML and the problematic xml excerpt looks like this:
And the corresponding dtd excerpt looks like this:
<!ELEMENT sound ((midi-device?, midi-instrument?, play?)*, offset?)>
The text was updated successfully, but these errors were encountered: