highsource / highsource/jaxb2-basics
JAXB2 Simplify plugin for DTD files
- Dominant language
- Java
- Stars
- 119
- Forks
- 49
- PR merge metrics
- No merged PRs in 30d
Description
Hello,
I have been using this plugin for generating Java classes from DTD's and its is very helpful in terms of configuration and generation.
I am generating the Java classes for cXML standard. I have the schema, binding file and the generated Java class for your reference. I am using the 'JAXB2 Simplify Plugin'.
I have configured the execution in pom.xml as given below.
```
generate-cXML
generate
true
src/main/dtd/cxml/
DTD
*.dtd
*.xs
src/main/generated-cxml
org.cxml
src/main/bindings/cxml
*.xjb
true
-Xsimplify
org.jvnet.jaxb2_commons
jaxb2-basics
0.9.4
```
In the generated CXML.java file, instead of generating separate attributes, a single collection attribute has been generated.
```
@XmlElements({
@XmlElement(name = "Header", required = true, type = Header.class),
@XmlElement(name = "Message", required = true, type = Message.class),
@XmlElement(name = "Request", required = true, type = Request.class),
@XmlElement(name = "Response", required = true, type = Response.class)
})
protected List headerOrMessageOrRequestOrResponse;
```
I was not able to find the correct way to configure the binding for DTD files for using the 'JAXB2 Simplify Plugin'.
I am trying to understand if I have configured the plugin in a wrong way or if support is not yet available for the same.
Thank you,
Sachin
[cXML.zip](https://github.com/highsource/jaxb2-basics/files/1426915/cXML.zip)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.