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

[XSD-to-XML] Support XSD validation for data.xmldatamodule #6938

Closed
1 of 2 tasks
SasinduDilshara opened this issue Aug 28, 2024 · 5 comments · Fixed by ballerina-platform/module-ballerina-data.xmldata#50
Closed
1 of 2 tasks
Assignees
Milestone

Comments

@SasinduDilshara
Copy link
Contributor

SasinduDilshara commented Aug 28, 2024

There are few sub tasks in this task

@SasinduDilshara SasinduDilshara changed the title [XML-to-XSD] Support XSD sequences for data.xmldatamodule [XML-to-XSD] Support XSD validation for data.xmldatamodule Oct 28, 2024
@SasinduDilshara
Copy link
Contributor Author

SasinduDilshara commented Oct 31, 2024

Currently, the Flat sequences and Flat choice elements in the XSD are implemented with the tests according to the https://docs.google.com/document/d/1nz-Osw3kyLpSzkBfZkGIcM0BPzth_ScEVeatAYrXFMw/edit?tab=t.0#heading=h.xzw1i3ooqc6v

Screenshot 2024-10-31 at 13 53 42

Had a offline chat with @MaryamZi and @hasithaa to discuss about the priority subtasks and implementations of nested sequences /choices in this feature and working according to that.
I will update this issue with future implementation details

@SasinduDilshara SasinduDilshara added this to the 2201.11.0 milestone Oct 31, 2024
@SasinduDilshara
Copy link
Contributor Author

SasinduDilshara commented Nov 4, 2024

Created a document with possible XML to record options https://docs.google.com/document/d/1rc6QGqgmrqph5cbd5kWlJEbc4A9zFBIwc-mfnkmTJ_I/edit?usp=sharing
Currently this is under the review

@SasinduDilshara
Copy link
Contributor Author

I was able to implement the XSD choice, choice arrays, XSD sequences and sequences arrays for the XSD along with Element occurences.

Following are some testcases with the implementation

Screenshot 2024-11-11 at 09 54 28 (2)
Screenshot 2024-11-11 at 09 54 31 (2)

@SasinduDilshara SasinduDilshara changed the title [XML-to-XSD] Support XSD validation for data.xmldatamodule [XSD-to-XML] Support XSD validation for data.xmldatamodule Nov 18, 2024
@FiveO
Copy link

FiveO commented Nov 21, 2024

The requested feature #6937 should support using a XSD file to validate a XML. Not that the XSD again has to be converted to recods. Please make sure that on the data.xml module a xsd file can be passed to validate the xml.

@SasinduDilshara
Copy link
Contributor Author

The requested feature #6937 should support using a XSD file to validate a XML. Not that the XSD again has to be converted to recods. Please make sure that on the data.xml module a xsd file can be passed to validate the xml.

This will also be supported from data.xmldata module after fixing this issue..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
2 participants