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

XS AttributeGroup #114

Open
SchweinchenFuntik opened this issue Nov 28, 2022 · 2 comments
Open

XS AttributeGroup #114

SchweinchenFuntik opened this issue Nov 28, 2022 · 2 comments

Comments

@SchweinchenFuntik
Copy link

SchweinchenFuntik commented Nov 28, 2022

there is a similar thing in the scheme, can I somehow hold it?
Suppose I make a special object where these attributes will be, and I will indicate this object in the necessary elements of the schema. And the library will take it and embed it as internal attributes

<xs:element name="spinner" >
  <xs:complexType>
	  <xs:attribute name="size" use="optional" type="number" />
	  <xs:attribute name="cover" use="optional" type="xs:string" />
	  <xs:attributeGroup ref="s:styleattrs" /> <!-- support-->
  </xs:complexType>
</xs:element>
@pdvrieze
Copy link
Owner

An attribute group is mainly a shortcut for multiple attributes declared on an element. The closest comparable in Kotlin is an interface. The way schemas work is not quite in line with the way that classes work.

If you want the group as actual object you are effectively asking for the inlining of an attribute only class. At present this is not supported, and supporting it is somewhat complex due to ordering and the way the serialization library itself is designed, so not really a priority.

@SchweinchenFuntik
Copy link
Author

ok, i'll try to post my solution here as soon as i'm done

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

No branches or pull requests

2 participants