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

SubscriptionPolicyType has no fields #123

Open
nrbnlulu opened this issue Mar 18, 2024 · 4 comments
Open

SubscriptionPolicyType has no fields #123

nrbnlulu opened this issue Mar 18, 2024 · 4 comments

Comments

@nrbnlulu
Copy link

nrbnlulu commented Mar 18, 2024

Hi thanks for the lib.
is there a reason this is an empty struct?

pub struct SubscriptionPolicyType {}

Is it because of the ##any here?

<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>

@nrbnlulu
Copy link
Author

Would it be possible to use some dynamic type for any fields by default?

@SamuelYvon
Copy link
Contributor

So you'd be looking for a HashMap type of thing that contains all that data?

@nrbnlulu
Copy link
Author

nrbnlulu commented Mar 19, 2024

Actually I would use something like raw xml elements since we might want to serialze any field(s). With hashmap that would be hard to implement.

@DmitrySamoylov
Copy link
Contributor

Is it because of the ##any here?

As I remember, xs:any is not supported at all in code generator: https://github.com/lumeohq/xsd-parser-rs?tab=readme-ov-file#any-elements-handling

And not very clear, which type would the Rust field be so that yaserde could set it when parsing XML.

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

No branches or pull requests

3 participants