Skip to content

cxml looping (includes minimal reproducible case) #9

Description

@svenemtell

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:

<?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 parsing MusicXML 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?)>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions