<?xml version=“1.0”?> <element xmlns=“relaxng.org/ns/structure/1.0” name=“device”>

<choice>
  <group>
    <attribute name="link">
      <value>ethernet</value>
    </attribute>
    <optional>
      <element name="ethernet-element">
        <text/>
      </element>
    </optional>
  </group>
  <group>
    <attribute name="link">
      <value>serial</value>
    </attribute>
    <optional>
      <element name="serial-element">
        <text/>
      </element>
    </optional>
  </group>
</choice>

</element>