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

Create DDEX parser in Rust #58

Open
5 of 9 tasks
denciu opened this issue Oct 4, 2024 · 0 comments
Open
5 of 9 tasks

Create DDEX parser in Rust #58

denciu opened this issue Oct 4, 2024 · 0 comments
Assignees

Comments

@denciu
Copy link
Collaborator

denciu commented Oct 4, 2024

Links to #57

Rust provides some tools to parse XML but first entire schema needs to be translated to Rust structs. Tools used to achieve this:

  • yaserde - tool used to (de)serialize XML
  • xml-schema - tool used to generate Rust structs out of XSD files that are compatible with yaserde

Structs generated with xml-schema are far from being complete so I need to do some manual work here:

  • remote linked schemas are not included in type generation, xsd files need to be merged and naming collisions need to be resolved
  • xsd needs is way too heavy to work on it, it needs to be slimmed by removing annotations
  • some xs:complexTypes that are extended are generated incorrectly
  • optional sequence is omitted (DisplayCredits)
  • recursive ResourceGroup is not parsed
  • empty implementations for types like Period, PeriodWithStartDate, PeriodWithoutFlags
  • implement xs:pattern - validation with regex
  • implement xs:enumeration - validation with set of items
  • implement xs:choice

Some validations/fields parsing that are irrelevant for our purposes (but essential in proving xml validity) may be skipped for PoC.

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

No branches or pull requests

1 participant