blob: 03519675e13e53e287b70a02cdc35d61ce61a5e0 [file] [log] [blame]
<?xml version="1.0" encoding="US-ASCII"?>
<!--
Copyright (c) 2018, 2020 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0 which is available at
http://www.eclipse.org/legal/epl-2.0,
or the Eclipse Distribution License v. 1.0 which is available at
http://www.eclipse.org/org/documents/edl-v10.php.
SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
-->
<xml-bindings xmlns="http://www.eclipse.org/eclipselink/xsds/persistence/oxm" package-name="org.eclipse.persistence.testing.jaxb.externalizedmetadata.mappings.choice.reference">
<java-types>
<java-type name="Root">
<xml-root-element/>
<java-attributes>
<xml-element java-attribute="clients" xml-path="client" />
<xml-element java-attribute="addresses" xml-path="address" />
<xml-element java-attribute="phoneNumbers" xml-path="phone-number" />
</java-attributes>
</java-type>
<java-type name="Client">
<xml-root-element name="client" />
<java-attributes>
<xml-attribute java-attribute="id" />
<xml-elements java-attribute="preferredContactMethod">
<xml-element java-attribute="mail" type="org.eclipse.persistence.testing.jaxb.externalizedmetadata.mappings.choice.reference.Address" />
<xml-element java-attribute="phone" type="org.eclipse.persistence.testing.jaxb.externalizedmetadata.mappings.choice.reference.PhoneNumber" />
<xml-join-nodes>
<xml-join-node xml-path="mail/@id" referenced-xml-path="@aid" />
<xml-join-node xml-path="mail/type/text()" referenced-xml-path="@type" />
</xml-join-nodes>
</xml-elements>
</java-attributes>
</java-type>
<java-type name="PhoneNumber">
<xml-root-element name="phone-number" />
<java-attributes>
<xml-attribute java-attribute="id" xml-path="@pid" xml-id="true" required="true" />
<xml-attribute java-attribute="type" xml-path="@type" xml-key="true" required="true" />
<xml-element java-attribute="number" xml-path="text()" />
</java-attributes>
</java-type>
<java-type name="Address">
<xml-root-element name="address" />
<java-attributes>
<xml-attribute java-attribute="id" xml-path="@aid" xml-id="true" required="true" />
<xml-attribute java-attribute="type" xml-path="@type" xml-key="true" required="true" />
<xml-element java-attribute="address" xml-path="text()" />
</java-attributes>
</java-type>
</java-types>
</xml-bindings>