[ http://issues.apache.org/jira/browse/JAXME-58?page=all ]
Jochen Wiedmann updated JAXME-58:
---------------------------------
Attachment: JAXME-58.patch
The attached patch could be considered the final implementation. I've changed
the following things:
- The ID interface is no longer used. Use of an interface would definitely be
the technically superior solution. However, it would prevent using POJO's
in the future.
- Duplicate ID's and invalid IDREF's are causing proper validation events.
- The files booklist.xsd and booklist.xml have been converted into a unit test.
I do not yet apply this patch: It is a larger patch and I want to merge the
JAXME-28,
branch into the trunk before, because I would have a lot of duplicate work
otherwise.
Hope to merge JAXME-28 within the next one or two weeks, at which point I'd
apply
this patch.
Creating this patch has been an excellent team effort for me. I am open for a
new bug
report concerning xjc:dom now, if you are ready to continue. :-)
> IDREF handling does not follow JAXB spec (5.8.2)/reference implementation
> -------------------------------------------------------------------------
>
> Key: JAXME-58
> URL: http://issues.apache.org/jira/browse/JAXME-58
> Project: JaxMe
> Type: Bug
> Components: JaxMe Core
> Versions: current (nightly)
> Reporter: Fredrik Vraalsen
> Attachments: JAXME-58.patch, booklist.xml, booklist.xsd, idMap.patch,
> idMap.patch, idMap3.patch, idMap4.patch, idMap5.patch
>
> JaxMe's implementation of IDREF differs from the JAXB specification and the
> RI, as JaxMe seems to only set/get the IDREF String itself, as opposed to the
> RI which sets/gets the actual object being referenced. From the JAXB spec
> (section 5.8.2):
> "An element or attribute with a type of xs:IDREF refers to the element in the
> instance document that has an attribute with a type of xs:ID or derived from
> type xs:ID with the same value as the xs:IDREF value. Rather than expose the
> Java programmer to this XML Schema concept, the default binding of an
> xs:IDREF component maps it to a Java property with a base type of
> java.lang.Object. The caller of the property setter method must be sure that
> its
> parameter is identifiable. An object is considered identifiable if one of its
> properties is derived from an attribute that is or derives from type xs:ID.
> There is an expectation that all instances provided as values for properties?
> representing an xs:IDREF should have the Java property representing the xs:ID
> of the instances set before the content tree containing both the xs:ID and
> xs:IDREF is (1) globally validated or (2) marshalled. If a property
> representing an xs:IDREF is set with an object that does not have its xs:ID
> set, the NotIdentifiableEvent is reported by (1) validation or (2)
> marshalling."
> See the spec for an example.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]