<?xml version="1.0" encoding="UTF-8"?>
<!-- Vestoris feed format "benchmark" version 1.1. Generated from the data set definition; see https://vestoris.com/help/feeds/benchmark -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="urn:vestoris:feed:benchmark:1.1" targetNamespace="urn:vestoris:feed:benchmark:1.1" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.1">
  <xs:annotation><xs:documentation>Benchmarks. Benchmark constituents and their weights. A new benchmark code creates the benchmark; a full file replaces the constituents of the benchmarks it names. Key: benchmark + symbol.</xs:documentation></xs:annotation>
  <xs:element name="feed">
    <xs:annotation><xs:documentation>One file: the header attributes, then the records.</xs:documentation></xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element name="record" type="Record" minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
      <xs:attribute name="businessDate" type="xs:date" use="required"><xs:annotation><xs:documentation>The business date the data is for (YYYY-MM-DD).</xs:documentation></xs:annotation></xs:attribute>
      <xs:attribute name="firm" use="required"><xs:annotation><xs:documentation>Your firm code, shown on Data › Feeds (e.g. F00012).</xs:documentation></xs:annotation><xs:simpleType><xs:restriction base="xs:string"><xs:pattern value="[A-Z][0-9]{5}"/></xs:restriction></xs:simpleType></xs:attribute>
      <xs:attribute name="source" use="optional"><xs:annotation><xs:documentation>Who produced the file (vendor or system name).</xs:documentation></xs:annotation><xs:simpleType><xs:restriction base="xs:string"><xs:maxLength value="80"/></xs:restriction></xs:simpleType></xs:attribute>
      <xs:attribute name="generated" type="xs:dateTime" use="required"><xs:annotation><xs:documentation>When the file was produced (UTC).</xs:documentation></xs:annotation></xs:attribute>
      <xs:attribute name="recordCount" type="xs:nonNegativeInteger" use="required"><xs:annotation><xs:documentation>The number of record elements. A file whose count does not match is refused (F004): it was probably cut short.</xs:documentation></xs:annotation></xs:attribute>
      <xs:attribute name="mode" use="optional" default="delta"><xs:annotation><xs:documentation>delta: only the records in the file change, and action=&quot;delete&quot; removes one. full: the file is complete; records it does not list are inactivated, up to the feed's safety threshold.</xs:documentation></xs:annotation><xs:simpleType><xs:restriction base="xs:string"><xs:enumeration value="delta"/><xs:enumeration value="full"/></xs:restriction></xs:simpleType></xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:complexType name="Record">
    <xs:annotation><xs:documentation>One benchmarks record. Elements may appear in any order.</xs:documentation></xs:annotation>
    <xs:all>
      <xs:element name="benchmark" minOccurs="1">
        <xs:annotation><xs:documentation>The benchmark code. Part of the key. A code: letters, digits, &quot;_&quot;, &quot;.&quot; or &quot;-&quot;, up to 20. Part of the key.</xs:documentation></xs:annotation>
        <xs:simpleType><xs:restriction base="xs:string"><xs:pattern value="[A-Z0-9][A-Z0-9_.\-]{0,19}"/></xs:restriction></xs:simpleType>
      </xs:element>
      <xs:element name="symbol" minOccurs="1">
        <xs:annotation><xs:documentation>The constituent. Part of the key. A ticker symbol: letters, digits, &quot;.&quot; or &quot;-&quot;, up to 12. Part of the key.</xs:documentation></xs:annotation>
        <xs:simpleType><xs:restriction base="xs:string"><xs:pattern value="[A-Z][A-Z0-9.\-]{0,11}"/></xs:restriction></xs:simpleType>
      </xs:element>
      <xs:element name="weightPct" minOccurs="1">
        <xs:annotation><xs:documentation>Weight in percent. A decimal number written as text, e.g. 1234.5 (min 0 max 100).</xs:documentation></xs:annotation>
        <xs:simpleType><xs:restriction base="xs:decimal"><xs:minInclusive value="0"/><xs:maxInclusive value="100"/><xs:totalDigits value="25"/><xs:fractionDigits value="10"/></xs:restriction></xs:simpleType>
      </xs:element>
      <xs:element name="benchmarkName" minOccurs="0">
        <xs:annotation><xs:documentation>The benchmark&apos;s name (used when it is created). Text, up to 120 characters.</xs:documentation></xs:annotation>
        <xs:simpleType><xs:restriction base="xs:string"><xs:maxLength value="120"/></xs:restriction></xs:simpleType>
      </xs:element>
      <xs:element name="udfs" type="Udfs" minOccurs="0">
        <xs:annotation><xs:documentation>User-defined fields (format 1.1). Each &lt;udf&gt; names its slot (1 to 10) and optionally the field&apos;s name; the value is checked against the type your Admin gave the field. A slot that is not active for your firm is refused (U101), a value of the wrong type too (U102), and a name that differs from the slot&apos;s name (U103).</xs:documentation></xs:annotation>
      </xs:element>
    </xs:all>
    <xs:attribute name="action" use="optional" default="upsert"><xs:annotation><xs:documentation>upsert (insert or update by key) or delete (removes the record; a security or account is inactivated, never deleted).</xs:documentation></xs:annotation><xs:simpleType><xs:restriction base="xs:string"><xs:enumeration value="upsert"/><xs:enumeration value="delete"/></xs:restriction></xs:simpleType></xs:attribute>
  </xs:complexType>
  <xs:complexType name="Udfs">
    <xs:sequence>
      <xs:element name="udf" minOccurs="0" maxOccurs="10">
        <xs:annotation><xs:documentation>One user-defined field value (at most 255 characters).</xs:documentation></xs:annotation>
        <xs:complexType><xs:simpleContent><xs:extension base="UdfValue">
          <xs:attribute name="slot" use="required"><xs:annotation><xs:documentation>The slot, 1 to 10 (the column udf_1 .. udf_10).</xs:documentation></xs:annotation><xs:simpleType><xs:restriction base="xs:integer"><xs:minInclusive value="1"/><xs:maxInclusive value="10"/></xs:restriction></xs:simpleType></xs:attribute>
          <xs:attribute name="name" use="optional"><xs:annotation><xs:documentation>The field's name as set up by your Admin (checked when given).</xs:documentation></xs:annotation><xs:simpleType><xs:restriction base="xs:string"><xs:maxLength value="60"/></xs:restriction></xs:simpleType></xs:attribute>
        </xs:extension></xs:simpleContent></xs:complexType>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:simpleType name="UdfValue"><xs:restriction base="xs:string"><xs:maxLength value="255"/></xs:restriction></xs:simpleType>
</xs:schema>
