Uploaded image for project: 'JaxMe'
  1. JaxMe
  2. JAXME-58

IDREF handling does not follow JAXB spec (5.8.2)/reference implementation

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • current (nightly)
    • 0.6
    • JaxMe Core
    • None

    Description

      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.

      Attachments

        1. idMap.patch
          3 kB
          Fredrik Vraalsen
        2. idMap.patch
          7 kB
        3. idMap3.patch
          17 kB
          Jochen Wiedmann
        4. idMap4.patch
          19 kB
          Fredrik Vraalsen
        5. idMap5.patch
          20 kB
          Fredrik Vraalsen
        6. booklist.xml
          0.4 kB
          Fredrik Vraalsen
        7. booklist.xsd
          0.9 kB
          Fredrik Vraalsen
        8. JAXME-58.patch
          72 kB
          Jochen Wiedmann

        Activity

          People

            jochen@apache.org Jochen Wiedmann
            fredriv Fredrik Vraalsen
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: