ballerina-platform / ballerina-library

The Ballerina Library
https://ballerina.io/learn/api-docs/ballerina/
Apache License 2.0
136 stars 64 forks source link

[XML-to-XSD] Support XSD validation for `data.xmldata`module #6938

Open SasinduDilshara opened 2 months ago

SasinduDilshara commented 2 months ago

There are few sub tasks in this task

SasinduDilshara commented 2 weeks ago

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 commented 1 week ago

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 commented 5 days ago

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)