Skip to content

Swate ProtocolGroup Custom Xml

Kevin F edited this page Oct 19, 2022 · 4 revisions

⚠️ This wiki is deprecated, look here for the new wiki: https://nfdi4plants.github.io/Swate-docs/

  1. Xml Example
  2. Xml Schema (XSD)
  3. Version History

Excel saves all custom generated xml inside the <customXml> tag. Swate will save all protocol group information inside of this <customXml> in a <ProtocolGroup> tag.

Each <SwateTable> tag CAN contain the following protocol group xml.

Swate ProtocolGroup Xml Example

<ProtocolGroup SwateVersion="0.4.0" TableName="annotationTable" WorksheetName="Sheet1">
  <Protocol Id="peptide_digestion_2" ProtocolVersion="1.0.0" SwateVersion="0.4.0" TableName="annotationTable" WorksheetName="Sheet1">
    <SpannedBuildingBlock Name="Parameter [Peptidase]" TermAccession="NCIT:C16965"/>
    <SpannedBuildingBlock Name="Parameter [temperature]" TermAccession="NCRO:0000029"/>
    <SpannedBuildingBlock Name="Parameter [time]" TermAccession="EFO:0000721"/>
  </Protocol>
  <Protocol Id="TestTemplate" ProtocolVersion="1.0.0" SwateVersion="0.4.0" TableName="annotationTable" WorksheetName="Sheet1">
    <SpannedBuildingBlock Name="Parameter [instrument model] (#2)" TermAccession="MS:1000031"/>
    <SpannedBuildingBlock Name="Parameter [day light exposure] (#2)" TermAccession="PECO:0007163"/>
    <SpannedBuildingBlock Name="Parameter [temperature unit] (#2)" TermAccession="UO:0000005"/>
  </Protocol>
</ProtocolGroup>

Swate ProtocolGroup Xml Schema (XSD)

This is the xml schema that can be used to validate <ProtocolGroup> xml in the excel customXml.

<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:element name="ProtocolGroup">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Protocol" maxOccurs="unbounded" minOccurs="0">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="SpannedBuildingBlock" maxOccurs="unbounded" minOccurs="0">
                <xs:complexType>
                  <xs:simpleContent>
                    <xs:extension base="xs:string">
                      <xs:attribute type="xs:string" name="Name" use="required"/>
                      <xs:attribute type="xs:string" name="TermAccession" use="required"/>
                    </xs:extension>
                  </xs:simpleContent>
                </xs:complexType>
              </xs:element>
            </xs:sequence>
            <xs:attribute type="xs:string" name="Id" use="required"/>
            <xs:attribute type="xs:string" name="ProtocolVersion" use="required"/>
            <xs:attribute type="xs:string" name="SwateVersion" use="required"/>
            <xs:attribute type="xs:string" name="TableName" use="required"/>
            <xs:attribute type="xs:string" name="WorksheetName" use="required"/>
          </xs:complexType>
        </xs:element>
      </xs:sequence>
      <xs:attribute type="xs:string" name="SwateVersion" use="required"/>
      <xs:attribute type="xs:string" name="TableName" use="required"/>
      <xs:attribute type="xs:string" name="WorksheetName" use="required"/>
    </xs:complexType>
  </xs:element>
</xs:schema>
Version 3.1
<?xml version="1.0"?>
<ProtocolGroup SwateVersion="0.2.1">
<Protocol Id="Example" SwateVersion="0.2.1" ProtocolVersion="" TableName="annotationTable" WorksheetName="Sheet1">
  <SpannedBuildingBlock Name="Source Name" TermAccession=""/>
  <SpannedBuildingBlock Name="Parameter [instrument model]" TermAccession="MS:1000031" />
  <SpannedBuildingBlock Name="Parameter [day light exposure]" TermAccession="PECO:0007163" />
  <SpannedBuildingBlock Name="Sample Name" TermAccession=""/>
</Protocol>
</ProtocolGroup>
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="ProtocolGroup">
  <xs:complexType>
    <xs:sequence>
      <xs:element name="Protocol">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="SpannedBuildingBlock" maxOccurs="unbounded" minOccurs="0">
              <xs:complexType>
                <xs:simpleContent>
                  <xs:extension base="xs:string">
                    <xs:attribute type="xs:string" name="Name" use="required"/>
                    <xs:attribute type="xs:string" name="TermAccession" use="required"/>
                  </xs:extension>
                </xs:simpleContent>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
          <xs:attribute type="xs:string" name="Id"/>
          <xs:attribute type="xs:string" name="SwateVersion"/>
          <xs:attribute type="xs:string" name="ProtocolVersion"/>
          <xs:attribute type="xs:string" name="TableName"/>
          <xs:attribute type="xs:string" name="WorksheetName"/>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
    <xs:attribute type="xs:string" name="SwateVersion"/>
  </xs:complexType>
</xs:element>
</xs:schema>