﻿<?xml version="1.0"?>
<!DOCTYPE xml [
  <!ELEMENT xml (transactions)>
    <!ATTLIST xml ignored (-1|0) "0">
    <!ELEMENT transactions (transaction)+>
      <!ELEMENT transaction (document|notification|list|serial_number|bom)+>
        <!ATTLIST transaction type (wf_import_document_attributes|import_notifications|import_lists|import_serial_numbers) #REQUIRED>
        <!ATTLIST transaction date CDATA #REQUIRED>       <!-- Seconds since 1 Jan 1970 00:00 -->
        <!ATTLIST transaction ignored (-1|0) "0">
        <!ATTLIST transaction vaultname CDATA #REQUIRED>

      <!ELEMENT document (configuration*)>
        <!ATTLIST document aliasset CDATA "">             <!-- The name of an alias set to use when looking up the name of the children attribute nodes. May be "". No newlines allowed and name is trimmed. -->
        <!ATTLIST document id CDATA #REQUIRED>            <!-- A value (newlines kept, trailin/leading spaces are not trimmed) that we use for finding matching documents. The value is looked up for the (optional) configuration and variable name given in "idattribute" in table VariableValue. -->
        <!ATTLIST document idattribute CDATA #REQUIRED>   <!-- An existing variable name that is used to match the "id" with -->
        <!ATTLIST document idcfgname CDATA "">            <!-- Configuration name we use when looking up documents that match "id". Empty means any configuration -->
        <!ATTLIST document pdmweid CDATA "0">             <!-- The internal DocumentID of PDMWE. Import: If >0 [id],[idattribute],[idcfgname] are ignored. -->
          <!ELEMENT configuration (attribute*, references*, whereused*)>
            <!ATTLIST configuration name CDATA "">        <!-- Name of the configuration. May be empty for files without configurations. For import empty means "all". -->
            <!ATTLIST configuration active (-1|0) "0">    <!-- Is the configuration referring to the active one? -->
            <!ATTLIST configuration quantity CDATA "0" >   <!-- The quantity (double precision) of this document. Ignored during import. Exported if "Show quantity" option is set for the export script. -->
            <!ELEMENT attribute EMPTY>
              <!ATTLIST attribute name CDATA #REQUIRED>
              <!ATTLIST attribute value CDATA #REQUIRED>
            <!ELEMENT references (document)*>
            <!ELEMENT whereused (document)*>
          
      <!ELEMENT bom (bomheader|bomrow+)>        <!-- Only used when exporting table style BOMs -->
        <!ATTLIST bom name CDATA "">
        <!ATTLIST bom id CDATA "">
        <!ATTLIST bom path CDATA "">
        <!ATTLIST bom document_id CDATA #REQUIRED>
        <!ATTLIST bom document_path CDATA #REQUIRED>
        <!ATTLIST bom type CDATA #REQUIRED>
        <!ATTLIST bom config_id CDATA "">
        <!ATTLIST bom config_name CDATA "">    
          <!ELEMENT bomheader (bomcol+)>
            <!ELEMENT bomcol EMPTY>
              <!ATTLIST bomcol col_no CDATA #REQUIRED>
              <!ATTLIST bomcol name CDATA #REQUIRED>
              <!ATTLIST bomcol alignment CDATA "">
          <!ELEMENT bomrow (bomcell+)>
            <!ATTLIST bomrow row_no CDATA "">
            <!ATTLIST bomrow document_id CDATA "">
            <!ATTLIST bomrow path CDATA "">
              <!ELEMENT bomcell EMPTY>
                <!ATTLIST bomcell col_no CDATA #REQUIRED>
                <!ATTLIST bomcell value CDATA #REQUIRED>
  
      <!ELEMENT notification (recipient+)>
        <!ATTLIST notification sender CDATA #REQUIRED>
        <!ATTLIST notification subject CDATA #REQUIRED>
        <!ATTLIST notification message CDATA #REQUIRED>
        <!ELEMENT recipient EMPTY>
          <!ATTLIST recipient user_login CDATA "">
          <!ATTLIST recipient user_name CDATA "">
          <!ATTLIST recipient group_name CDATA "">

      <!ELEMENT list (item+,link*)>
        <!ATTLIST list name CDATA #REQUIRED>
        <!ELEMENT item EMPTY>
          <!ATTLIST item item_name CDATA #REQUIRED>
        <!ELEMENT link EMPTY>
          <!ATTLIST link source_variable CDATA #REQUIRED>
          <!ATTLIST link list_variable CDATA #REQUIRED>
          <!ATTLIST link link_value CDATA #REQUIRED>

      <!ELEMENT serial_number (serno_item+)>
        <!ATTLIST serial_number name CDATA #REQUIRED>
        <!ATTLIST serial_number mode (append|replace) "replace">
        <!ELEMENT serno_item EMPTY>
        <!ATTLIST serno_item item_value CDATA #REQUIRED>
          <!ATTLIST serno_item item_counter CDATA #REQUIRED>
]>
<!--To use the dtd in an external file: <!DOCTYPE xml SYSTEM "filename.dtd">-->



<xml>
  <transactions>

	  <transaction type="import_lists" date ="123459" vaultname ="Type in the name of the vault here">

		  <!-- Just a list without links -->
		  <list name ="Materials" >
			  <item item_name ="Ceramic"/>
			  <item item_name ="Ferrous Metal"/>
			  <item item_name ="Nonferrous Metal"/>
			  <item item_name ="Superalloy"/>
		  </list>

		  <!-- A set of linked lists -->
		  <list name ="Ceramics">
			  <item item_name ="Boride"/>
			  <item item_name ="Carbide"/>
			  <item item_name ="Nitride"/>
			  <link source_variable ="My Material" list_variable ="Material Type" link_value ="Ceramic"/>
		  </list>

		  <list name ="Ferrous Metals">
			  <item item_name ="Stainless Steel"/>
			  <item item_name ="Carbon Steel"/>
			  <item item_name ="Tool Steel"/>
			  <link source_variable ="My Material" list_variable ="Material Type" link_value ="Ferrous Metal"/>
		  </list>

		  <list name ="Nonferrous Metals">
			  <item item_name ="Aluminium Alloy"/>
			  <item item_name ="Copper Alloy"/>
			  <item item_name ="Tin Alloy"/>
			  <link source_variable ="My Material" list_variable ="Material Type" link_value ="Nonferrous Metal"/>
		  </list>

		  <list name ="Superalloys">
			  <item item_name ="Cobalt Base"/>
			  <item item_name ="Iron Base"/>
			  <item item_name ="Nickel base"/>
			  <link source_variable ="My Material" list_variable ="Material Type" link_value ="Superalloy"/>
		  </list>
		  
     </transaction>

  </transactions>
</xml>
