Hi, What I thought was going to be a simple problem turns out to be quite a head scratcher.
I am currently using JAXB 2 to generate code from an XSD on which I have no control. I need to access the constraints from the schemas so I can apply some logic and guard code when setting values in these objects. Validation in bulk simply will not do. In most cases I can simply truncate the string and all will be good. For this I need to get the length that was declared in the XSD in order to apply it in the guard code and keep this layer generic. The alternative is to copy and hard code the lengths but frankly if there was a better way to do this I would really appreciate.
I speak of string length here but this applies to all facets declarable in an XSD.
Suggestions, Code samples and links welcome, basically anything that would help me NOT hard code the data in the classes.
Thanks