Load Schema

Example Doodlebase load schemas are shown below. Each file sent to a Doodlebase Network is validated against this schema.

Simple Example

Here data is collected in 3 realms, described by Elements "Session", Device, and Variable. The Session element declares the date stamp and machine name, the Device element collects non-numeric name/value pairs and the variable section collects numeric name/value pairs along with the units of the variable.

<?xml version="1.0" encoding="utf-8"?>
<xs:schema 
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  elementFormDefault="qualified" 
  attributeFormDefault="unqualified">
  <xs:element name="DbLoad">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Session" minOccurs="0" maxOccurs="1">
          <xs:complexType>
            <xs:all>
              <xs:element name="dateTimeUtc" type="xs:string" minOccurs="0"/>
              <xs:element name="machineName" type="xs:string" minOccurs="0"/>
            </xs:all>
          </xs:complexType>
        </xs:element>
        <xs:element name="Device" minOccurs="0" maxOccurs="unbounded">
          <xs:complexType>
            <xs:all>
              <xs:element name="name" type="xs:string"/>
              <xs:element name="value" type="xs:string"/>
            </xs:all>
          </xs:complexType>
        </xs:element>
        <xs:element name="Variable" minOccurs="0" maxOccurs="unbounded">
          <xs:complexType>
            <xs:all>
              <xs:element name="name" type="xs:string"/>
              <xs:element name="unit" type="xs:string" minOccurs="0"/>
              <xs:element name="value" type="xs:string"/>
            </xs:all>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>

An example file that conforms to this schema is shown below.

<DbLoad>
  <Session>
    <dateTimeUtc>2024-01-12T09:04:00.0000000Z</dateTimeUtc>
    <machineName>ESS SN 13</machineName>
  </Session>
  <Device>
    <name>serialnumber</name>
    <value>C226-97456</value>
  </Device>
  <Device>
    <name>software_rev</name>
    <value>12.0014</value>
  </Device>
  <Variable>
    <name>temperature</name>
    <value>200</value>
    <unit>C</unit>
  </Variable>
  <Variable>
    <name>duration</name>
    <value>400</value>
    <unit>milliseconds</unit>
  </Variable>
</DbLoad>

Factory Data Example

The schema below is more complex, and is a good starting point for most manufacturing companies. This schema represents a manufacturing test event. The event can by product-based (with serial number and time) or process-based (time only). In either case the dimensions of Attributes (non-numeric), Variables (numeric), Symptoms, Causes and Components (supporting geneology) are represented.

DbLoad Schema

<?xml version="1.0" encoding="utf-8"?>
<xs:schema 
  xmlns:xs="http://www.w3.org/2001/XMLSchema"
  elementFormDefault="qualified" 
  attributeFormDefault="unqualified">
  <xs:element name="DbLoad">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Session" minOccurs="0" maxOccurs="1">
          <xs:complexType>
            <xs:all>
              <xs:element name="dateTimeUtc" type="xs:string" minOccurs="0"/>
              <xs:element name="machineName" type="xs:string" minOccurs="0"/>
            </xs:all>
          </xs:complexType>
        </xs:element>
        <xs:element name="Product" minOccurs="0" maxOccurs="1">
          <xs:complexType>
            <xs:all>
              <xs:element name="serial_number" type="xs:string"/>
              <xs:element name="work_order" type="xs:string" minOccurs="0"/>
              <xs:element name="part_number" type="xs:string" minOccurs="0"/>
              <xs:element name="sales_order" type="xs:string" minOccurs="0"/>
              <xs:element name="parent_serial_number" type="xs:string" minOccurs="0"/>
              <xs:element name="status">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value = "FAIL"/>
                    <xs:enumeration value = "PASS"/>
                    <xs:enumeration value = "ERROR"/>
                    <xs:enumeration value = "LOG"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:all>
          </xs:complexType>
        </xs:element>
        <xs:element name="Process" minOccurs="0" maxOccurs="1" >
          <xs:complexType>
            <xs:all>
              <xs:element name="status">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value = "FAIL"/>
                    <xs:enumeration value = "PASS"/>
                    <xs:enumeration value = "ERROR"/>
                    <xs:enumeration value = "LOG"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
            </xs:all>
          </xs:complexType>
        </xs:element>
        <xs:element name="Attribute" minOccurs="0" maxOccurs="unbounded">
          <xs:complexType>
            <xs:all>
              <xs:element name="name" type="xs:string"/>
              <xs:element name="category" type="xs:string" minOccurs="0"/>
              <xs:element name="run" type="xs:string" minOccurs="0"/>
              <xs:element name="type" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100"/>
                    <xs:enumeration value = "Report"/>
                    <xs:enumeration value = "Information"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="value" type="xs:string"/>
              <xs:element name="status">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value = "FAIL"/>
                    <xs:enumeration value = "PASS"/>
                    <xs:enumeration value = "ERROR"/>
                    <xs:enumeration value = "LOG"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="symptom_link" type="xs:string" minOccurs="0"/>
            </xs:all>
          </xs:complexType>
        </xs:element>
        <xs:element name="Component" minOccurs="0" maxOccurs="unbounded">
          <xs:complexType>
            <xs:all>
              <xs:element name="manufacturer_pn" type="xs:string"/>
              <xs:element name="manufacturer" type="xs:string" minOccurs="0"/>
              <xs:element name="internal_pn" type="xs:string" minOccurs="0"/>
              <xs:element name="refdes" type="xs:string" minOccurs="0"/>
              <xs:element name="lot_code" type="xs:string" minOccurs="0"/>
              <xs:element name="date_code" type="xs:string" minOccurs="0"/>
              <xs:element name="reel" type="xs:string" minOccurs="0"/>
              <xs:element name="package" type="xs:string" minOccurs="0"/>
              <xs:element name="batch" type="xs:string" minOccurs="0"/>
              <xs:element name="serial_number" type="xs:string" minOccurs="0"/>
              <xs:element name="parent_serial_number" type="xs:string" minOccurs="0"/>
            </xs:all>
          </xs:complexType>
        </xs:element>
        <xs:element name="Symptom" minOccurs="0" maxOccurs="unbounded">
          <xs:complexType>
            <xs:all>
              <xs:element name="name" type="xs:string"/>
              <xs:element name="category" type="xs:string" minOccurs="0"/>
              <xs:element name="confidence" type="xs:string" minOccurs="0"/>
              <xs:element name="value" type="xs:string"/>
              <xs:element name="symptom_link" type="xs:string" minOccurs="0"/>
            </xs:all>
          </xs:complexType>
        </xs:element>
        <xs:element name="Variable" minOccurs="0" maxOccurs="unbounded">
          <xs:complexType>
            <xs:all>
              <xs:element name="name" type="xs:string"/>
              <xs:element name="category" type="xs:string" minOccurs="0"/>
              <xs:element name="run" type="xs:string" minOccurs="0"/>
              <xs:element name="type" minOccurs="0">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:maxLength value="100"/>
                    <xs:enumeration value = "Report"/>
                    <xs:enumeration value = "Information"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="unit" type="xs:string" minOccurs="0"/>
              <xs:element name="lsl" type="xs:string" minOccurs="0"/>
              <xs:element name="usl" type="xs:string" minOccurs="0"/>
              <xs:element name="value" type="xs:string"/>
              <xs:element name="status">
                <xs:simpleType>
                  <xs:restriction base="xs:string">
                    <xs:enumeration value = "FAIL"/>
                    <xs:enumeration value = "PASS"/>
                    <xs:enumeration value = "ERROR"/>
                    <xs:enumeration value = "LOG"/>
                  </xs:restriction>
                </xs:simpleType>
              </xs:element>
              <xs:element name="symptom_link" type="xs:string" minOccurs="0"/>
            </xs:all>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
</xs:schema>

Next Steps

Explore how to use Doodlebase Events on the Event Reference page.


© - Schemaport LLC. Doodlebase is a registered trademark of Schemaport LLC | Technology Patent Pending