-
Notifications
You must be signed in to change notification settings - Fork 53
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
Compatibility of inheritance plugin with "-episode" #123
Comments
Can you share your code? We do episodes+inheritance. We place the inheritance rules in a jaxb-bindings file instead of the schema, and we use catalogs for namespace replacement. |
Find attached a showcase.zip that demoes the problem. |
@Vampire thanks for the share.
<xs:simpleType name="foo">
<xs:restriction base="xs:string">
<xs:enumeration value="FOO"/>
<xs:enumeration value="BAR"/>
</xs:restriction>
</xs:simpleType>
<jaxb:bindings
xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:inheritance="http://jaxb2-commons.dev.java.net/basic/inheritance"
jaxb:extensionBindingPrefixes="inheritance"
jaxb:version="2.1">
<jaxb:bindings schemaLocation="foo.xsd" node="/xsd:schema">
<jaxb:bindings node="xsd:simpleType[@name='foo']">
<inheritance:implements>baz.Baz</inheritance:implements>
</jaxb:bindings>
</jaxb:bindings>
</jaxb:bindings>
I got the following generated with in |
Thanks for the work-around. |
@Vampire you're welcome I found that in jaxb-annotate of highsource with same problem : highsource/jaxb2-annotate-plugin#49 Seems like @highsource did know what could be done to solve the problem (but not giving hint on it - and sadly no more there to tell 😔) and also provide the same workaround as I do. I'll have to debug to see if something's jumps out from the code. In the meantime, you still can use the workaround provided |
Hi @Vampire, Just made a PR in jaxb-ri to fix the above common problem with episode / inlined-plugin-customization in xsd. |
Hi @Vampire This is part of the release in 4.0.2 of jaxb-tools Could you give it a try ? We will backport this in v2 too soon |
Fixed by highsource/jaxb-tools#425 |
I tried to do something like shown at https://dzone.com/articles/reusing-generated-jaxb-classes, with the difference, that the imported schema uses
inheritance:implements
tags to define interfaces for some of the classes.But it seems this does not work properly.
The other way around, having
inheritance:implements
in the importing schema works.When translating the imported schema with the
inheritance:implements
tags, the episode file is generated.If I then want to translate the importing schema, giving the episode file as binding, I get complaints like these:
Is this not supported?
Can it be supported?
Can I do something differently to make it work?
The text was updated successfully, but these errors were encountered: