jaxb-ri
jaxb-ri copied to clipboard
xjc is far too restrictive for xml in external binding files
The way xjc uses external binding files is far stricter than the way it handles the same declarations in inline schema. This is unfortunate because many of us are working with schema that cannot be annotated with jaxb information.
Many jaxb2 plugins rely on using a "sub-part" of their namespace. For instance, the widely used annox plugin uses the following format:
<jaxb:bindings ... xmlns:annox="http://annox.dev.java.net" xmlns:jlang="http://annox.dev.java.net/java.lang">
Then, something like <jlang:Deprecated /> is a valid annotation that can be tied to a class or method. This works fine when these are placed inline in schemas. However, in external binding files, an error is produced:
[ERROR] Unsupported binding namespace "http://annox.dev.java.net/java.lang". Perhaps you meant "http://annox.dev.java.net"?
Environment
Operating System: All Platform: All
Affected Versions
[2.1.12]
- Issue Imported From: https://github.com/javaee/jaxb-v2/issues/668
- Original Issue Raised By:@glassfishrobot
- Original Issue Assigned To: @glassfishrobot
@glassfishrobot Commented Reported by lucasmo
@glassfishrobot Commented Was assigned to snajper
@glassfishrobot Commented This issue was imported from java.net JIRA JAXB-668