<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ Hibernate Validator, declare and validate application constraints
  ~
  ~ License: Apache License, Version 2.0
  ~ See the license.txt file in the root directory or <http://www.apache.org/licenses/LICENSE-2.0>.
  -->
<jxb:bindings version="1.0" xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
              xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc">
    <jxb:bindings schemaLocation="../xsd/validation-mapping-1.1.xsd" node="/xs:schema">
        <!-- let jaxb be whitespace tolerant - http://www.highlevelbits.com/2009/08/jaxb-with-maven_16.html -->
        <jxb:globalBindings>
            <xjc:javaType name="java.lang.String" xmlType="xs:string"
                          adapter="javax.xml.bind.annotation.adapters.CollapsedStringAdapter"/>
        </jxb:globalBindings>

        <!-- Resolve conflict between attribute and sequence both named "class" -->
        <jxb:bindings node="//xs:complexType[@name='beanType']/xs:sequence[1]/xs:element[1]">
            <jxb:property name="classType"/>
        </jxb:bindings>
    </jxb:bindings>

    <jxb:bindings schemaLocation="../xsd/validation-configuration-1.1.xsd" node="/xs:schema">
        <!-- Use existing enum type -->
        <jxb:bindings node="//xs:element[@name='executable-type']">
            <jxb:javaType name="javax.validation.executable.ExecutableType"
                          parseMethod="javax.validation.executable.ExecutableType.valueOf"/>
        </jxb:bindings>
    </jxb:bindings>
</jxb:bindings>
