Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inf. lookup with unqualified union memberTypes and circular includes #70

Closed
jonherrmann opened this issue Jun 13, 2024 · 1 comment
Closed

Comments

@jonherrmann
Copy link
Contributor

jonherrmann commented Jun 13, 2024

Describe the bug
Union memberType names that are not fully qualified lead to an infinite type lookup if the schema file contains a circular include.

Expected behavior
Parser should handle circular includes.

Library Version
1.2.14

Additional context

<!-- a.xsd -->
<schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
        xmlns:test="..." 
        targetNamespace="..."
>
    <include schemaLocation="b.xsd"/>

    <simpleType name="TestUnionA1">
        <union memberTypes="time"/>
    </simpleType>

</schema>

<!-- b.xsd -->
<schema>
    <include schemaLocation="a.xsd"/>
</schema>
jonherrmann added a commit to jonherrmann/XsdParser that referenced this issue Jun 13, 2024
@jonherrmann jonherrmann changed the title Union memberTypes Inf. lookup with unqualified union memberTypes and circular includes Jun 13, 2024
@lcduarte
Copy link
Member

Hello,

Thanks for using the library and for the issue/fix! I've just made an adjustment to the first if because as it was it never entered in the if even when it should. I've added some extra code to the test you've provided to validate a situation where the if code runs.

I've released a new version 1.2.15 with the changes, if you have any issues let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants