erasmus-without-paper / ewp-specs-api-iias

Specifications of EWP's Interinstitutional Agreements API.
MIT License
4 stars 13 forks source link

Get-response xml Validation fails when "not-yet-defined" attribute is present in xml #151

Closed anantqs closed 10 months ago

anantqs commented 10 months ago

If 'not-yet-defined' attribute is present in xml

 <receiving-hei-id>hibo.no</receiving-hei-id>
  <receiving-first-academic-year-id>2014/2015</receiving-first-academic-year-id>
  <receiving-last-academic-year-id>2020/2021</receiving-last-academic-year-id>
  <mobilities-per-year not-yet-defined="true">2</mobilities-per-year>
  <recommended-language-skill not-yet-defined="true">
      <language>en</language>
      <cefr-level>B1</cefr-level>
  </recommended-language-skill>

and validated against the get-response.xsd(v7) schema. Getting below error '{https://github.com/erasmus-without-paper/ewp-specs-api-iias/blob/stable-v7/endpoints/get-response.xsd}mobilities-per-year', attribute 'not-yet-defined': The attribute 'not-yet-defined' is not allowed. '{https://github.com/erasmus-without-paper/ewp-specs-api-iias/blob/stable-v7/endpoints/get-response.xsd}recommended-language-skill', attribute 'not-yet-defined': The attribute 'not-yet-defined' is not allowed.

janinamincer-daszkiewicz commented 10 months ago

Thank you for this bug report. We are looking into it.

mkurzydlowski commented 10 months ago

You are right! There is an unobvious difference between using a reference to a global element and using a reference to a global attribute. This is nicely explained here:

https://stackoverflow.com/questions/8903768/unqualified-xsd-global-attribute-references

I have created a patch to the XSD to make this reference work. Please review.

anantqs commented 10 months ago

Looks good. Validation is working fine after your changes. Thanks