This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I'm building a XML Schema to be used with JAXB and are faced with a problem with the schema.
Take the myElementType for example. It has two attributes that are requeired, but not both of them. Either of them is required if the other is omitted.
In order for JAXB to validate this properly how can I arrange the XML Schema for this element for these 2 attributes?
I guess one of the two must have precedence over the other. If class is defined, the presence of url is invalid or vice versa.
If neither is defined it must validate that it must have either class or url.