<!ELEMENT root (tripexpense)>
<!ELEMENT tripexpense (header, description?, customlines?, travellines?, dailycompensationlines?)>
<!ELEMENT customlines (customline+)>
<!ELEMENT customline (updatekey?, employeeidentifier, ratio, amount, customlineunitprice, vatpercentage?, linedescription, begindate?, enddate?, crmprocessidentifier?, customeridentifier?, expenseaccountnumber?, linestatus?, dimension*, tripexpenseattachments?)>
<!ELEMENT travellines (travelline+)>
<!ELEMENT travelline (updatekey?, employeeidentifier, traveltype, passengeramount, kilometeramount, unitprice?, linedescription, traveldate, routedescription, crmprocessidentifier?, customeridentifier?, linestatus?, dimension*, tripexpenseattachments?)>
<!ELEMENT dailycompensationlines (dailycompensationline+)>
<!ELEMENT dailycompensationline (updatekey?, employeeidentifier, compensationtype, amount, unitprice?, linedescription, timeofdeparture, returntime, crmprocessidentifier?, customeridentifier?, linestatus?, dimension*, tripexpenseattachments?)>

	<!ELEMENT dimension (dimensionname, dimensionitem?, dimensionitemcode?, dimensionitemname?)>
	<!ELEMENT tripexpenseattachments (tripexpenseattachment+)>
	<!ELEMENT tripexpenseattachment (mimetype, attachmentdescription, filename, documentdata)>

<!ELEMENT header (#PCDATA)>
<!ELEMENT description (#PCDATA)>
<!ELEMENT updatekey (#PCDATA)>
<!ELEMENT employeeidentifier (#PCDATA)>
	<!ATTLIST employeeidentifier type (number|finnishpersonalidentifier|currentuser|netvisorkey) #IMPLIED>		

<!ELEMENT ratio (#PCDATA)>
	<!ATTLIST ratio type (number|name|netvisorkey) #IMPLIED>		
	
<!ELEMENT amount (#PCDATA)>
<!ELEMENT kilometeramount (#PCDATA)>
<!ELEMENT unitprice (#PCDATA)>
<!ELEMENT vatpercentage (#PCDATA)>
<!ELEMENT linedescription (#PCDATA)>

<!ELEMENT customlineunitprice (#PCDATA)>
  <!ATTLIST customlineunitprice iso4217currencycode CDATA #IMPLIED>
  <!ATTLIST customlineunitprice currencyrate CDATA #IMPLIED>
<!ELEMENT begindate (#PCDATA)>
<!ELEMENT enddate (#PCDATA)>

<!ELEMENT crmprocessidentifier (#PCDATA)>
<!ELEMENT customeridentifier (#PCDATA)>
	<!ATTLIST customeridentifier type (netvisor|customer) #IMPLIED>

<!ELEMENT expenseaccountnumber (#PCDATA)>

<!ELEMENT traveltype (#PCDATA)>
<!ELEMENT traveldate (#PCDATA)>
<!ELEMENT passengeramount (#PCDATA)>
<!ELEMENT routedescription (#PCDATA)>

<!ELEMENT compensationtype (#PCDATA)>
  <!ATTLIST compensationtype id CDATA #IMPLIED>
<!ELEMENT timeofdeparture (#PCDATA)>
<!ELEMENT returntime (#PCDATA)>
<!ELEMENT linestatus (#PCDATA)>

<!ELEMENT dimensionname (#PCDATA)>
<!ELEMENT dimensionitem (#PCDATA)>
  <!ATTLIST dimensionitem fatherid CDATA #IMPLIED>
  <!ATTLIST dimensionitem integrationdimensiondetailguid CDATA #IMPLIED>
<!ELEMENT dimensionitemcode (#PCDATA)>
<!ELEMENT dimensionitemname (#PCDATA)>
<!ELEMENT mimetype (#PCDATA)>
<!ELEMENT attachmentdescription (#PCDATA)>
<!ELEMENT filename (#PCDATA)>
<!ELEMENT documentdata (#PCDATA)>
