Thanks for the file.
However the camel spring xsd file is auto generated based on JAXB annotations on the camel type models.
Since its auto generated we cant maintain it manually. I guess that are are always pluses/minuses using such an approach.
Thanks - I was looking at the Camel source after I posted my XSD file, and I wondered if it was being auto-generated after I saw the annotations in the model (So far all my work has been auto-generating Java code from XSDs, so I haven't have experience with doing things from the other direction).
On a related topic, is there a way to add annotations to the Java code that end up propagating to elements in the XSD? It seems like that would be a useful feature since then that information would be accessible in schema aware editors (like Oxygen). I do find that handy in the case of the spring-beans-2.5.xsd schema.
Do you care to elaborate a bit on this?
In the spring-beans-2.5.xsd schema, there are XML annotations on elements, and the annotations are visible in Xml Editors. Just an extra bit of documentation that can come in handy. Here's one of the fragments from spring-beans-2.5.xsd.
<xsd:attribute name="default-autowire-candidates" type="xsd:string">
A default bean name pattern for identifying autowire candidates:
e.g. "Service", "data", "Service", "data*Service".
Also accepts a comma-separated list of patterns: e.g. "Service,Dao".
See the documentation for the 'autowire-candidate' attribute of the
'<bean/>' element for the semantic details of autowire candidate beans.
I'm not that familiar with Java Annotations and JAXB, so I was just wondering if there was a mechanism to transpose in-line documentation in the Java classes to the generated XML classes. Not a big deal...just curious if it was possible.
Cool the xsd:documentation is something that would be great to get into the XSD.
I think we have a ticket about this in the Apache JIRA.
However the maven tool that does the code -> xsd generator is done some years ago and it had to do a few hacks because of the JAXB implementation in Java had some flaws at the time.
So the tool is not something we have updated for some time. Would be cool if the tool could grab the class javadoc and use it for the xsd documentation.
With javadoc you get the benefit of the same documentation for both the Java and XML DSL at once.