Open Tomas-Kraus opened 16 years ago
@glassfishrobot Commented Reported by rupertlssmith
@glassfishrobot Commented rupertlssmith said: Created an attachment (id=256) The example described in the bug report.
@glassfishrobot Commented @pavelbucek said: not in current scope of work, changing to ENHANCEMENT
@glassfishrobot Commented tdesmedt said: see https://jaxb.dev.java.net/issues/show_bug.cgi?id=683 for a workaround through validation
@glassfishrobot Commented File: xsdrestrictiontest.tar.gz Attached By: rupertlssmith
@glassfishrobot Commented Was assigned to jaxb-issues
@glassfishrobot Commented This issue was imported from java.net JIRA JAXB-515
If restriction is used to derive a new complex type from an existing type, and attributes are restricted by having a default or fixed value specified, where none was previously specified on the base type, then the xjc compiler fails to create the default or fixed value. It does manage to do it for default or fixed values on the base type itself.
I've cut this down to a simple example to illustrate. Here is my schema (test.xsd):
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:test="http://thebadgerset.co.uk/test-0.1" targetNamespace="http://thebadgerset.co.uk/test-0.1" elementFormDefault="qualified">