Comments (3)
from jaxb2ruby.
[ERROR] Complex type and its child element share the same name "ScenarioType". Use a class customization to resolve this conflict. line 2265 of file:/C:/jaxb/BuildingSync.xsd
This is coming from JAXB (xjc
). Two ways to resolve this:
1. Specify a mapping via an JAXB config file
Currently jaxb2ruby
does not provide a "friendly" way to do this, nor does it allow one to specify a JAXB config file as it may conflict with the one it uses. So I guess at this time this is just a theoretical option that would make a nice feature π. The latter may be trivial (pull requests welcome!), but testing would be needed to ensure the internal config had priority.
You can see how to do this under the Fix Collides Example section in the JAXB docs.
2. Modify the schema
Change the ScenarioType
complex type to something like ScenarioDataType
. This will not affect XML to object mapping; it will just result in a class named ScenarioDataType
being created instead of one named ScenarioType
.
Really you'll probably want to use the -n
option to rid yourself of the ugly Ruby namespaces that will be created. You can use a file of mappings too. See how the DDEX library does it.
I see that I can use the βc option to specify a YAML file, but Iβm not really sure what to put in the YAML file
This command line option (or file) is for mapping XSD data types to Ruby classes. E.g., xsd:boolen
to TrueClass
.
from jaxb2ruby.
Closing.
If you have any suggestions on how to improve the docs for this let me know or open a pull request.
Thanks
from jaxb2ruby.
Related Issues (6)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jaxb2ruby.