Attribute jaxb:extensionBindingPrefixes is not allowed here

326 views Asked by At

I've checked out one project and trying solving some problems in IntelliJ IDEA 2023.2.1. In one of the maven project I've got following xjb file:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<jaxb:bindings version="3.0" xmlns:jaxb="https://jakarta.ee/xml/ns/jaxb"
    xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
               xmlns:xs="http://www.w3.org/2001/XMLSchema"
               jaxb:extensionBindingPrefixes="xjc">

    <jaxb:globalBindings>
        <xjc:simple />
        <xjc:serializable uid="-1" />
        <jaxb:javaType name="java.util.Calendar" xmlType="xs:dateTime"
            parseMethod="jakarta.xml.bind.DatatypeConverter.parseDateTime"
            printMethod="jakarta.xml.bind.DatatypeConverter.printDateTime" />
    </jaxb:globalBindings>
</jaxb:bindings>

But I've got an error here: Attribute jaxb:extensionBindingPrefixes is not allowed here

Does anybody knows how to solve it? Thanks very much.

1

There are 1 answers

1
Laurent Schoelens On

The binding file is valid if accepted by XJC.

The point here is that IntelliJ doesn't seem to have a complete XSD for the bindingschema reference : bindingschema_3_0.xsd

You can check here for the latest documentation regarding XJC Customizations within XSD, but same applies to binding files : jaxb-ri extensions xjc customizations