jaxb
  1. jaxb
  2. JAXB-924

bindingschema_2_0.xsd: globalBindings: extension binding declarations: wrong mulitplicity

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: spec
    • Labels:
      None

      Description

      The following JAXB bindings file creates the Adapter classes as expected, but Eclipse and XMLSpy say it's no valid:

      <?xml version="1.0" encoding="UTF-8"?>
      <jxb:bindings xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jxb="http://java.sun.com/xml/ns/jaxb" xsi:schemaLocation="http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd" version="2.1">
      <jxb:globalBindings>
      <jxb:javaType name="java.util.Calendar" xmlType="xs:date" parseMethod="javax.xml.bind.DatatypeConverter.parseDate" printMethod="javax.xml.bind.DatatypeConverter.printDate" />
      <jxb:javaType name="java.util.Calendar" xmlType="xs:dateTime" parseMethod="javax.xml.bind.DatatypeConverter.parseDateTime" printMethod="javax.xml.bind.DatatypeConverter.printDateTime" />
      <jxb:javaType name="java.util.Calendar" xmlType="xs:time" parseMethod="javax.xml.bind.DatatypeConverter.parseTime" printMethod="javax.xml.bind.DatatypeConverter.printTime" />
      </jxb:globalBindings>
      </jxb:bindings>

      The error is something like:

      cvc-complex-type.2.4.b: The content of element 'jxb:globalBindings' is not complete. One of '

      {"http://java.sun.com/xml/ns/jaxb":javaType, "http://java.sun.com/xml/ns/jaxb":serializable, WC[##other:"http://java.sun.com/xml/ns/jaxb"]}

      ' is expected.

      I was pointed out that the multiplicity should be as follows:

      <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded">
      <xs:annotation>
      <xs:documentation>allows extension binding declarations to be specified.</xs:documentation>
      </xs:annotation>
      </xs:any>

        Activity

        Hide
        gzress added a comment -

        Wouldn't it be a little faster to correct the XSD than to change this issue priority?

        regards
        Grzegorz Grzybek

        Show
        gzress added a comment - Wouldn't it be a little faster to correct the XSD than to change this issue priority? regards Grzegorz Grzybek
        Hide
        Martin Grebac added a comment -

        Well, not - the schema is defined in the JSR 222 spec, so this can only be addressed within MR.

        Show
        Martin Grebac added a comment - Well, not - the schema is defined in the JSR 222 spec, so this can only be addressed within MR.
        Hide
        gzress added a comment -

        Well, right... And how to get the MR to be released?

        Show
        gzress added a comment - Well, right... And how to get the MR to be released?
        Hide
        puce added a comment -

        Any news on this?

        Show
        puce added a comment - Any news on this?
        Hide
        puce added a comment -

        Will this be fixed in Java 8?

        Show
        puce added a comment - Will this be fixed in Java 8?
        Hide
        Iaroslav Savytskyi added a comment -

        I'm not aware about the coming MR. So, unfortunately, no news and I don't think this would be fixed in JDK8.

        Show
        Iaroslav Savytskyi added a comment - I'm not aware about the coming MR. So, unfortunately, no news and I don't think this would be fixed in JDK8.

          People

          • Assignee:
            Iaroslav Savytskyi
            Reporter:
            puce
          • Votes:
            12 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

            • Created:
              Updated: