You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jaxme-dev@ws.apache.org by "Fredrik Vraalsen (JIRA)" <ja...@ws.apache.org> on 2005/08/05 13:09:37 UTC

[jira] Commented: (JAXME-58) IDREF handling does not follow JAXB spec (5.8.2)/reference implementation

    [ http://issues.apache.org/jira/browse/JAXME-58?page=comments#action_12317769 ] 

Fredrik Vraalsen commented on JAXME-58:
---------------------------------------

Updated idMap patch with support for IDREFs.

The setter and getter methods of IDREF attributes need to be updated to accept/return Objects - or possibly some other interface which provides access to the ID of the object being referenced (needed e.g. when serializing to XML)?  Check JAXB spec.  This requires changes to IDREFSG at least, but I'm not familiar enough with the JaxMe code to make this work.


> 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: idMap.patch, idMap.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: jaxme-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: jaxme-dev-help@ws.apache.org