I have a root Inserts tag, a sequence of Inserts tags, each with a "name" attribute.
I cannot get online validator to find out that there are duplicate "name" values.
We've been struggling for... days. Thanks for finding out.
XSD:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.osames.org/osamesorm"
targetNamespace="http://www.osames.org/osamesorm" elementFormDefault="qualified">
<xs:element name="Inserts">
<xs:complexType>
<xs:sequence>
<xs:element name="Insert" maxOccurs="unbounded">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="xs:string">
<xs:attribute name="name" type="xs:string" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:unique name="unique-isbn">
<xs:selector xpath="Inserts/Insert"/>
<xs:field xpath="@name"/>
</xs:unique>
</xs:element>
</xs:schema>
XML :
<?xml version="1.0" encoding="UTF-8"?>
<Inserts xmlns="http://www.osames.org/osamesorm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.osames.org/osamesorm ./xml_schemas/verysimple.xsd">
<Insert name="BaseInsert">INSERT INTO {0} ({1}) values ({2});</Insert>
<Insert name="BaseInsert">INSERT INTO {0} ({1}) values ({2});</Insert>
</Inserts>