The editors

I tested each editor using the schema below, reading in the example XML document and trying to change it in invalid ways. I restricted myself to editors that are free for non-commercial use, which work under Linux and MacOS X and which don't require the installation of a log of new libraries.

XAmple

Rinzo

XMLmind XML Editor Personal Edition

The example XML document and schema

The schema file eeprom.xsd:

<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="cmb1">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="boardSubtype"/>
        <xs:element ref="configSchema"/>
        <xs:element ref="fulcrumPort"/>
        <xs:element ref="mac"/>
        <xs:element ref="gatewayIp"/>
        <xs:element ref="netMask"/>
        <xs:element ref="endpoints"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="endpoints">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="internal" minOccurs="0" maxOccurs="12"/>
        <xs:element ref="external" minOccurs="0" maxOccurs="26"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <xs:element name="boardSubtype" type="xs:unsignedShort" />

  <xs:element name="configSchema">
    <xs:simpleType>
      <xs:restriction base="xs:unsignedInt">
        <!-- 14-bit unsigned int -->
        <xs:maxExclusive value="16384"/>
      </xs:restriction>
    </xs:simpleType>
  </xs:element>

  <xs:element name="fulcrumPort"  type="xs:unsignedLong" />
  <xs:element name="mac"          type="macAddress" />
  <xs:element name="gatewayIp"    type="dottedIp" />
  <xs:element name="netMask"      type="dottedIp" />
  <xs:element name="type"         type="xs:unsignedByte" />
  <xs:element name="attr"         type="xs:unsignedByte" />

  <xs:element name="internal"     type="endpoint"/>
  <xs:element name="external"     type="endpoint"/>

  <xs:complexType name="endpoint">
    <xs:sequence>
      <xs:element ref="type"/>
      <xs:element ref="attr"/>
    </xs:sequence>
  </xs:complexType>

  <xs:simpleType name="macAddress">
    <!-- MAC addresses are to be only and exactly 6 bytes long. -->
    <xs:restriction base="xs:hexBinary">
      <xs:length value="6" />
    </xs:restriction>
  </xs:simpleType>

  <xs:simpleType name="dottedIp">
    <xs:restriction base="xs:string">
      <xs:pattern value="((1?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])\.){3}(1?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])"/>
    </xs:restriction>
  </xs:simpleType>

</xs:schema>

The document eeprom_example.xml:

<?xml version="1.0" encoding="UTF-8"?>
<!-- The root element is one of cmb1, cmb2, ftm or rtm. -->
<cmb1
  xsi:noNamespaceSchemaLocation="eeprom.xsd"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
  <!-- Version info -->
  <boardSubtype>1</boardSubtype>
  <configSchema>1</configSchema>

  <!-- Routing and crossbar -->
  <fulcrumPort>0</fulcrumPort>
  <mac>ee0000aaaa00</mac>
  <gatewayIp>192.168.1.200</gatewayIp>
  <netMask>255.255.255.0</netMask>

  <endpoints>
    <!-- Internal endpoints first, then external. Slots are
         are assigned in the appropriate LUT in order of appearance.
    -->
    <internal>
      <type>1</type>
      <attr>15</attr>
    </internal>

    <internal>
      <type>3</type>
      <attr>42</attr>
    </internal>

    <internal>
      <type>0</type>
      <attr>7</attr>
    </internal>

    <external>
      <type>5</type>
      <attr>17</attr>
    </external>

    <external>
      <type>3</type>
      <attr>6</attr>
    </external>

  </endpoints>

</cmb1>