Loop while parsing
Sven Emtell
sven.emtell at doremir.com
Fri Nov 9 17:08:25 UTC 2018
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 cannot fix it myself but I am hoping that somebody else can find a solution using my minimal reproducible case, which can be found at https://doremir.com/files/cxml/xml-test.zip <https://doremir.com/files/cxml/xml-test.zip>.
The xml file from the case looks like this:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE a PUBLIC "" "">
<a>
<c/>
</a>
And the dtd file looks like this:
<!ELEMENT b EMPTY>
<!ELEMENT c EMPTY>
<!ELEMENT a ((b?)*, c?)>
The real world case is from MusicXML parsing and the problematic xml excerpt looks like this:
<sound tempo="90">
<offset sound="yes">8</offset>
</sound>
And the corresponding dtd excerpt looks like this:
<!ELEMENT sound ((midi-device?, midi-instrument?, play?)*, offset?)>
I have verified this using version "cxml-2008-11-30" from the Closure XML Parser home page at https://common-lisp.net/project/cxml/index.html and also with the latest version from Quicklisp "cxml-20181018".
By the way, why isn't the latest version downloadable from the Closure XML Parser home page?
Thanks!
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cxml-devel/attachments/20181109/063fdd67/attachment.html>
More information about the cxml-devel
mailing list