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

XsdAnnotation not filled in for XsdEnumeration ? #34

Closed
vortex314 opened this issue Nov 10, 2021 · 2 comments
Closed

XsdAnnotation not filled in for XsdEnumeration ? #34

vortex314 opened this issue Nov 10, 2021 · 2 comments

Comments

@vortex314
Copy link

<xs:simpleType name="Authorisation1Code">
        <xs:annotation>
            <xs:documentation source="Name" xml:lang="EN">Authorisation1Code</xs:documentation>
            <xs:documentation source="Definition" xml:lang="EN">Specifies the level of approval depending on a number of factors, including payment type, threshold amount or local country or operations practice.</xs:documentation>
        </xs:annotation>
        <xs:restriction base="xs:string">
            <xs:enumeration value="AUTH">
                <xs:annotation>
                    <xs:documentation source="Name" xml:lang="EN">PreAuthorisedFile</xs:documentation>
                    <xs:documentation source="Definition" xml:lang="EN">Indicates a file has been pre authorised or approved within the originating customer environment and no further approval is required.</xs:documentation>
                </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="FDET">
                <xs:annotation>
                    <xs:documentation source="Name" xml:lang="EN">FileLevelAuthorisationDetails</xs:documentation>
                    <xs:documentation source="Definition" xml:lang="EN">Indicates that a file requires additional file level approval, with the ability to view both the payment information block and supporting customer credit transaction detail.</xs:documentation>
                </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="FSUM">
                <xs:annotation>
                    <xs:documentation source="Name" xml:lang="EN">FileLevelAuthorisationSummary</xs:documentation>
                    <xs:documentation source="Definition" xml:lang="EN">Indicates that a file requires additional file level approval, with the ability to view only the payment information block level information.</xs:documentation>
                </xs:annotation>
            </xs:enumeration>
            <xs:enumeration value="ILEV">
                <xs:annotation>
                    <xs:documentation source="Name" xml:lang="EN">InstructionLevelAuthorisation</xs:documentation>
                    <xs:documentation source="Definition" xml:lang="EN">Indicates that a file requires all customer transactions to be authorised or approved.</xs:documentation>
                </xs:annotation>
            </xs:enumeration>
        </xs:restriction>
    </xs:simpleType>

looks like the XsdEnumeration.getAnnotation returns null.
while XsdEnumeration.getValue returns "AUTH".
Rings a bell ? I didn't try yet to isolate this any further.

@lcduarte
Copy link
Member

Hello,

First of all, thanks for using the library!

I've tested with the provided xsd and it was indeed an error, I wasn't parsing the contents of the XsdEnumeration and other XsdRestriction related tags. This was fixed.

Regarding the Issue 35, the XsdRestriction base field wasn't correctly being associated with the respective XsdSimpleType, this was also fixed.

I've deployed a new release with these fixes, 1.1.5, feel free to test it out and point out any other issues that you find.

@vortex314
Copy link
Author

Hi Luis, thanks for reacting swiftly and solving this issue, great that you actively maintain this code !
Our context of your parser is that we use it to analyse complex financial messages used between banks and clearing houses.
Lieven

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