<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2005 sp1 U (http://www.xmlspy.com) by Goran Lowkrantz (isMobile AB) -->
<xs:schema targetNamespace="http://www.ismobile.com/coordinator/2006/operations/cwi/create_wo/" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:coord="http://www.ismobile.com/coordinator/2006/operations/cwi/create_wo/" xmlns:ty="http://www.ismobile.com/coordinator/2017/types/">
    <!-- Created with com.ismobile.xsdfix:xsdfix:1.1 at 2018-01-19 14:40:41 -->
    <xs:import namespace="http://www.ismobile.com/coordinator/2017/types/" schemaLocation="http://coord.ismobile.com/coordinator/cwi/ws/hard/types.xsd"/>
    <xs:attribute name="target" type="ty:string100"/>
    <xs:attribute name="type" type="ty:string100"/>
    <xs:element name="altitude">
        <xs:annotation>
            <xs:documentation>Altitude in meters</xs:documentation>
        </xs:annotation>
        <xs:complexType> 
            <xs:simpleContent>
                <xs:extension base="ty:baseAltitude">
                    <xs:attribute ref="coord:type" use="required" fixed="real"/>
                </xs:extension>
            </xs:simpleContent>
        </xs:complexType>
    </xs:element>
    <xs:element name="percentcomplete">
        <xs:annotation>
            <xs:documentation>How much of the work is done on the part of the assignment</xs:documentation>
        </xs:annotation>
        <xs:complexType> 
            <xs:simpleContent>
                <xs:extension base="ty:baseInt">
                    <xs:attribute ref="coord:type" use="required" fixed="int"/>
                </xs:extension>
            </xs:simpleContent>
        </xs:complexType>
    </xs:element>
    <xs:element name="effort">
        <xs:annotation>
            <xs:documentation>Effort for this assignment part in minutes</xs:documentation>
        </xs:annotation>
        <xs:complexType> 
            <xs:simpleContent>
                <xs:extension base="ty:baseInt">
                    <xs:attribute ref="coord:type" use="required" fixed="int"/>
                </xs:extension>
            </xs:simpleContent>
        </xs:complexType>
    </xs:element>
    <xs:element name="assignmentworkflow" type="ty:string100" nillable="false">
        <xs:annotation>
            <xs:documentation>Assignment statemap name</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="attachments">
        <xs:annotation>
            <xs:documentation>Attachments to the workorder, in BASE64 encoding</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="coord:encoded" maxOccurs="100"/>
            </xs:sequence>
            <xs:attribute ref="coord:type" use="required" fixed="array"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="block" type="coord:block"> </xs:element>
    <xs:complexType name="block">
        <xs:choice minOccurs="0" maxOccurs="100">
            <xs:element ref="coord:information" minOccurs="0" maxOccurs="100"/>
            <xs:element ref="coord:block" minOccurs="0" maxOccurs="100"/>
        </xs:choice>
        <xs:attribute name="name" type="ty:string100" use="required"/>
        <xs:attribute name="number" type="xs:integer" use="optional"/>
        <xs:attribute name="multiple" type="xs:boolean" use="optional"/>
        <xs:attribute name="id" type="ty:string100" use="optional"/>
    </xs:complexType>
    <xs:element name="city" type="ty:string100">
        <xs:annotation>
            <xs:documentation>City</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="companyid" type="ty:string100" nillable="false">
        <xs:annotation>
            <xs:documentation>Name of the team that will receive the WO</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="country" type="ty:string100">
        <xs:annotation>
            <xs:documentation>Country</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="create">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="coord:woid"/>
                <xs:element ref="coord:companyid"/>
                <xs:element ref="coord:woworkflow"/>
                <xs:element ref="coord:wotype"/>
                <xs:element ref="coord:title"/>
                <xs:element ref="coord:description" minOccurs="0"/>
                <xs:element ref="coord:previous" minOccurs="0"/>
                <xs:element ref="coord:wogroup" minOccurs="0"/>
                <xs:element ref="coord:priority" minOccurs="0"/>
                <xs:element ref="coord:resgroup" minOccurs="0"/>
                <xs:element ref="coord:startafter"/>
                <xs:element ref="coord:endbefore"/>
                <xs:element ref="coord:promstart" minOccurs="0"/>
                <xs:element ref="coord:promend" minOccurs="0"/>
                <xs:element ref="coord:requestid" minOccurs="0"/>
                <xs:element ref="coord:reportdefs" minOccurs="0"/>
                <xs:element ref="coord:woreportdefs" minOccurs="0"/>
                <xs:element ref="coord:location" minOccurs="0"/>
                <xs:element ref="coord:workitem" maxOccurs="100"/>
                <xs:element ref="coord:wioverlap" minOccurs="0" maxOccurs="100"/>
                <xs:element ref="coord:note" minOccurs="0" maxOccurs="100"/>
                <xs:element ref="coord:createassignmentdata" minOccurs="0" maxOccurs="100"/>
                <xs:element ref="coord:mimedataref" minOccurs="0" maxOccurs="100"/>
                <xs:element ref="coord:data" minOccurs="0"/>
                <xs:element ref="coord:attachments" minOccurs="0"/>
            </xs:sequence>
            <xs:attribute ref="coord:target" use="required" fixed="workorder"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="script">
        <xs:annotation>
            <xs:documentation>Can contain scripts to be used in reports etc.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:simpleContent>
                <xs:extension base="ty:string1000000">
                    <xs:attribute name="name" type="ty:NMTOKEN" use="required"/>
                </xs:extension>
            </xs:simpleContent>
        </xs:complexType>
    </xs:element>
    <xs:element name="assignmentpart">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="coord:starttime"/>
                <xs:element ref="coord:stoptime"/>
                <xs:element ref="coord:effort"/>
                <xs:element ref="coord:percentcomplete"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:element name="createassignmentdata">
        <xs:annotation>
            <xs:documentation>Data holder for assignment info, each createassignmentdata will create an assignment in Coordinator</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="coord:useglobalid" minOccurs="0"/>
                <xs:element ref="coord:companyid" minOccurs="0"/>
                <xs:element ref="coord:resid"/>
                <xs:element ref="coord:workitemid"/>
                <xs:element ref="coord:starttime" minOccurs="0"/>
                <xs:element ref="coord:stoptime" minOccurs="0"/>
                <xs:element ref="coord:assignmentpart" minOccurs="0" maxOccurs="100"/>
                <xs:element ref="coord:instruction" minOccurs="0"/>
                <xs:element ref="coord:dispatched" minOccurs="0"/>
            </xs:sequence>
            <xs:attribute ref="coord:type" use="required" fixed="struct"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="createdby" type="ty:string100" nillable="false">
        <xs:annotation>
            <xs:documentation>Name of the user that created the note</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="customXML">
        <xs:annotation>
            <xs:documentation>Custom defined XML data, structured in blocks and information elements</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="coord:informationlist"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:element name="data">
        <xs:annotation>
            <xs:documentation>Data holder for customXML and integrationXML</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="coord:customXML" minOccurs="0"/>
                <xs:element ref="coord:integration" minOccurs="0"/>
                <xs:element ref="coord:overflow" minOccurs="0"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:element name="description" type="ty:string100">
        <xs:annotation>
            <xs:documentation>Descriptive text for the work order</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="duration" nillable="false">
        <xs:annotation>
            <xs:documentation>Estimated duration time for the workitem, in minutes</xs:documentation>
        </xs:annotation>
        <xs:complexType> 
            <xs:simpleContent>
                <xs:extension base="ty:baseInt">
                    <xs:attribute ref="coord:type" use="required" fixed="int"/>
                </xs:extension>
            </xs:simpleContent>
        </xs:complexType>
    </xs:element>
    <xs:element name="endbefore">
        <xs:annotation>
            <xs:documentation>Latest end time for the work order/work item, format is ISO-8601 i.e 2008-04-29T12:12:12</xs:documentation>
        </xs:annotation>
        <xs:complexType> 
            <xs:simpleContent>
                <xs:extension base="ty:baseDatetime">
                    <xs:attribute ref="coord:type" use="required" fixed="datetime"/>
                </xs:extension>
            </xs:simpleContent>
        </xs:complexType>
    </xs:element>
    <xs:element name="flatnr" type="ty:string100">
        <xs:annotation>
            <xs:documentation>Flat number</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="header">
        <xs:annotation>
            <xs:documentation>Contains the message id</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="coord:messageid"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:element name="housenr" type="ty:string100">
        <xs:annotation>
            <xs:documentation>House number</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="information">
        <xs:annotation>
            <xs:documentation>An element containg a name and value attribute, shown as name: value in the GUI:s (customer: Sven Svensson)</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:simpleContent>
                <xs:extension base="ty:base100">
                    <xs:attribute name="name" type="ty:string100" use="required"/>
                    <xs:attribute name="value" type="ty:string100" use="optional"/>
                    <xs:attribute name="std" type="xs:boolean" use="optional"/>
                    <xs:attribute name="id" type="ty:string100" use="optional"/>
                </xs:extension>
            </xs:simpleContent>
        </xs:complexType>
    </xs:element>
    <xs:element name="informationlist">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="coord:information" minOccurs="0" maxOccurs="100"/>
                <xs:element name="blocklist" minOccurs="0">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element ref="coord:block" maxOccurs="100"/>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element name="options" minOccurs="0">
                    <xs:complexType>
                        <xs:sequence>
                            <xs:element name="option" maxOccurs="100">
                                <xs:complexType>
                                    <xs:attribute name="name" type="ty:string100" use="required"/>
                                    <xs:attribute name="options" type="ty:string100" use="required"/>
                                </xs:complexType>
                            </xs:element>
                        </xs:sequence>
                    </xs:complexType>
                </xs:element>
                <xs:element ref="coord:script" minOccurs="0" maxOccurs="100"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:element name="instruction" type="ty:string100">
        <xs:annotation>
            <xs:documentation>Work item instructions</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="integration">
        <xs:annotation>
            <xs:documentation>Data used in integration, will not be visible in Coordinator, just freighted in and out of coordinator on the workorder</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:any minOccurs="0"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:element name="overflow">
        <xs:annotation>
            <xs:documentation>Overflow teams for capacity</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:any minOccurs="0"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:element name="latitude">
        <xs:annotation>
            <xs:documentation>Work order/work item latitude in WGS-84</xs:documentation>
        </xs:annotation>
        <xs:complexType> 
            <xs:simpleContent>
                <xs:extension base="ty:baseGeoCoord">
                    <xs:attribute ref="coord:type" use="required" fixed="real"/>
                </xs:extension>
            </xs:simpleContent>
        </xs:complexType>
    </xs:element>
    <xs:element name="floornr" type="ty:string100">
        <xs:annotation>
            <xs:documentation>Floor number</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="location">
        <xs:annotation>
            <xs:documentation>Location data for the work order/work item</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="coord:locname" minOccurs="0"/>
                <xs:element ref="coord:country" minOccurs="0"/>
                <xs:element ref="coord:straddress" minOccurs="0"/>
                <xs:element ref="coord:city" minOccurs="0"/>
                <xs:element ref="coord:zipcode" minOccurs="0"/>
                <xs:element ref="coord:region" minOccurs="0"/>
                <xs:element ref="coord:latitude"/>
                <xs:element ref="coord:longitude"/>
                <xs:element ref="coord:altitude" minOccurs="0"/>
                <xs:element ref="coord:flatnr" minOccurs="0"/>
                <xs:element ref="coord:floornr" minOccurs="0"/>
                <xs:element ref="coord:housenr" minOccurs="0"/>
            </xs:sequence>
            <xs:attribute ref="coord:type" use="required" fixed="struct"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="locname" type="ty:string100">
        <xs:annotation>
            <xs:documentation>Name of the location</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="longitude">
        <xs:annotation>
            <xs:documentation>Work order/work item longitude in WGS-84</xs:documentation>
        </xs:annotation>
        <xs:complexType> 
            <xs:simpleContent>
                <xs:extension base="ty:baseGeoCoord">
                    <xs:attribute ref="coord:type" use="required" fixed="real"/>
                </xs:extension>
            </xs:simpleContent>
        </xs:complexType>
    </xs:element>
    <xs:element name="messageid" type="ty:string100">
        <xs:annotation>
            <xs:documentation>ID of the message from backend system, if this element is set in the XML, an ack/nack will be sent back</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="mimedataid" type="ty:string100">
        <xs:annotation>
            <xs:documentation>ID of referenced Mimedata object</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="mimedataref">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="coord:mimedataid"/>
                <xs:element ref="coord:mimetype"/>
                <xs:element ref="coord:name"/>
                <xs:element ref="coord:size"/>
            </xs:sequence>
            <xs:attribute ref="coord:type" use="required" fixed="struct"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="mimetype">
        <xs:annotation>
            <xs:documentation>Mimetype of the attachment</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
            <xs:restriction base="ty:base100"/>
        </xs:simpleType>
    </xs:element>
    <xs:element name="multipleassignments">
        <xs:annotation>
            <xs:documentation>True/false flag allowing multiple assignments on the work item</xs:documentation>
        </xs:annotation>
        <xs:complexType> 
            <xs:simpleContent>
                <xs:extension base="ty:baseBool">
                    <xs:attribute ref="coord:type" use="required" fixed="bool"/>
                </xs:extension>
            </xs:simpleContent>
        </xs:complexType>
    </xs:element>
    <xs:element name="dispatched">
        <xs:annotation>
            <xs:documentation>True/false flag saying if the assignment should be dispatched immediately</xs:documentation>
        </xs:annotation>
        <xs:complexType> 
            <xs:simpleContent>
                <xs:extension base="ty:baseBool">
                    <xs:attribute ref="coord:type" use="required" fixed="bool"/>
                </xs:extension>
            </xs:simpleContent>
        </xs:complexType>
    </xs:element>
    <xs:element name="useglobalid">
        <xs:annotation>
            <xs:documentation>True/false, if false -&gt; companyid should be the team name where the resource exists, if false -&gt; companyid should be the teamcluster name in which the resource exists</xs:documentation>
        </xs:annotation>
        <xs:complexType> 
            <xs:simpleContent>
                <xs:extension base="ty:baseBool">
                    <xs:attribute ref="coord:type" use="required" fixed="bool"/>
                </xs:extension>
            </xs:simpleContent>
        </xs:complexType>
    </xs:element>
    <xs:element name="name">
        <xs:annotation>
            <xs:documentation>Name of Mimedata file</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
            <xs:restriction base="ty:base100"/>
        </xs:simpleType>
    </xs:element>
    <xs:element name="note">
        <xs:annotation>
            <xs:documentation>Note object</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="coord:noteid"/>
                <xs:element ref="coord:createdby"/>
                <xs:element ref="coord:type"/>
                <xs:element ref="coord:text"/>
            </xs:sequence>
            <xs:attribute ref="coord:type" use="required" fixed="struct"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="noteid" type="ty:string100" nillable="false">
        <xs:annotation>
            <xs:documentation>Unique ID of note, unique inside the WO</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="encoded">
        <xs:annotation>
            <xs:documentation>The actual attached file as BASE64-encoded text</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:simpleContent>
                <xs:extension base="ty:base1000000000">
                    <xs:attribute ref="coord:type" use="required" fixed="mimedata"/>
                </xs:extension>
            </xs:simpleContent>
        </xs:complexType>
    </xs:element>
    <xs:element name="operation">
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="coord:header" minOccurs="0"/>
                <xs:element ref="coord:create"/>
            </xs:sequence>
        </xs:complexType>
    </xs:element>
    <xs:element name="previous" type="ty:string100">
        <xs:annotation>
            <xs:documentation>Reference to another work item ID within the same work order</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="priority" nillable="false">
        <xs:annotation>
            <xs:documentation>Work order priority</xs:documentation>
        </xs:annotation>
        <xs:complexType> 
            <xs:simpleContent>
                <xs:extension base="ty:baseInt">
                    <xs:attribute ref="coord:type" use="required" fixed="int"/>
                </xs:extension>
            </xs:simpleContent>
        </xs:complexType>
    </xs:element>
    <xs:element name="promend">
        <xs:annotation>
            <xs:documentation>Work order booking promised endbefore time (ISO-8601)</xs:documentation>
        </xs:annotation>
        <xs:complexType> 
            <xs:simpleContent>
                <xs:extension base="ty:baseDatetime">
                    <xs:attribute ref="coord:type" use="required" fixed="datetime"/>
                </xs:extension>
            </xs:simpleContent>
        </xs:complexType>
    </xs:element>
    <xs:element name="promstart">
        <xs:annotation>
            <xs:documentation>Work order booking promised startafter time (ISO-8601)</xs:documentation>
        </xs:annotation>
        <xs:complexType> 
            <xs:simpleContent>
                <xs:extension base="ty:baseDatetime">
                    <xs:attribute ref="coord:type" use="required" fixed="datetime"/>
                </xs:extension>
            </xs:simpleContent>
        </xs:complexType>
    </xs:element>
    <xs:element name="region" type="ty:string100">
        <xs:annotation>
            <xs:documentation>Region</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="reportdefid" type="ty:string100">
        <xs:annotation>
            <xs:documentation>Name of Report definition</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="reportdefs">
        <xs:annotation>
            <xs:documentation>Report definition objects</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="coord:reportdefid" maxOccurs="100"/>
            </xs:sequence>
            <xs:attribute ref="coord:type" use="required" fixed="array"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="woreportdefs">
        <xs:annotation>
            <xs:documentation>Report definition objects</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="coord:reportdefid" maxOccurs="100"/>
            </xs:sequence>
            <xs:attribute ref="coord:type" use="required" fixed="array"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="wireportdefs">
        <xs:annotation>
            <xs:documentation>Report definition objects</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="coord:reportdefid" maxOccurs="100"/>
            </xs:sequence>
            <xs:attribute ref="coord:type" use="required" fixed="array"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="reqskills" type="ty:string100">
        <xs:annotation>
            <xs:documentation>Required skills, a-z, one skill per character</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="requestid" type="ty:string100">
        <xs:annotation>
            <xs:documentation>External request Id (the id of an external request sent out from coordinator)</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="resgroup" type="ty:string100">
        <xs:annotation>
            <xs:documentation>Name of resource group</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="resid" nillable="false">
        <xs:annotation>
            <xs:documentation>External ID of resource for the assignment</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
            <xs:restriction base="ty:base100"/>
        </xs:simpleType>
    </xs:element>
    <xs:element name="servobjid" type="ty:string100">
        <xs:annotation>
            <xs:documentation>External Service object Id for the work item</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="size">
        <xs:annotation>
            <xs:documentation>Size of the Mimedata file</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
            <xs:restriction base="ty:base100"/>
        </xs:simpleType>
    </xs:element>
    <xs:element name="startafter">
        <xs:annotation>
            <xs:documentation>Earliest start time for the work order (ISO-8601)</xs:documentation>
        </xs:annotation>
        <xs:complexType> 
            <xs:simpleContent>
                <xs:extension base="ty:baseDatetime">
                    <xs:attribute ref="coord:type" use="required" fixed="datetime"/>
                </xs:extension>
            </xs:simpleContent>
        </xs:complexType>
    </xs:element>
    <xs:element name="starttime" nillable="false">
        <xs:annotation>
            <xs:documentation>Start time for the assignment (ISO-8601)</xs:documentation>
        </xs:annotation>
        <xs:complexType> 
            <xs:simpleContent>
                <xs:extension base="ty:baseDatetime">
                    <xs:attribute ref="coord:type" use="required" fixed="datetime"/>
                </xs:extension>
            </xs:simpleContent>
        </xs:complexType>
    </xs:element>
    <xs:element name="stoptime" nillable="false">
        <xs:annotation>
            <xs:documentation>Stop time for the assignment (ISO-8601)</xs:documentation>
        </xs:annotation>
        <xs:complexType> 
            <xs:simpleContent>
                <xs:extension base="ty:baseDatetime">
                    <xs:attribute ref="coord:type" use="required" fixed="datetime"/>
                </xs:extension>
            </xs:simpleContent>
        </xs:complexType>
    </xs:element>
    <xs:element name="straddress" type="ty:string100">
        <xs:annotation>
            <xs:documentation>Street address</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="text" type="ty:string100" nillable="false">
        <xs:annotation>
            <xs:documentation>Content of note</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="title" type="ty:string100">
        <xs:annotation>
            <xs:documentation>Work order title</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="type" type="ty:string100" nillable="false">
        <xs:annotation>
            <xs:documentation>?</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="wioverlap">
        <xs:annotation>
            <xs:documentation>Specify that two workitems should overlap in time</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="coord:workitemid1"/>
                <xs:element ref="coord:workitemid2"/>
                <xs:element ref="coord:duration"/>
            </xs:sequence>
            <xs:attribute ref="coord:type" use="required" fixed="struct"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="wogroup" type="ty:string100">
        <xs:annotation>
            <xs:documentation>Name of workorder grouping</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="woid" type="ty:string100" nillable="false">
        <xs:annotation>
            <xs:documentation>External workorder ID</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="productid" type="ty:string100">
        <xs:annotation>
            <xs:documentation>Id of product</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="productname" type="ty:string100">
        <xs:annotation>
            <xs:documentation>Name of product</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="status" type="ty:string100">
        <xs:annotation>
            <xs:documentation>Status for the workitem (external status)</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="wipriority" type="ty:string100">
        <xs:annotation>
            <xs:documentation>Priority of the workitem</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="wigroup" type="ty:string100">
        <xs:annotation>
            <xs:documentation>Name of workitem grouping</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="quantity">
        <xs:annotation>
            <xs:documentation>Quantity of the product</xs:documentation>
        </xs:annotation>
        <xs:complexType> 
            <xs:simpleContent>
                <xs:extension base="ty:baseQuantity">
                    <xs:attribute ref="coord:type" use="required" fixed="real"/>
                </xs:extension>
            </xs:simpleContent>
        </xs:complexType>
    </xs:element>
    <xs:element name="workitem">
        <xs:annotation>
            <xs:documentation>Work item</xs:documentation>
        </xs:annotation>
        <xs:complexType>
            <xs:sequence>
                <xs:element ref="coord:workitemid"/>
                <xs:element ref="coord:servobjid" minOccurs="0"/>
                <xs:element ref="coord:reqskills" minOccurs="0"/>
                <xs:element ref="coord:previous" minOccurs="0"/>
                <xs:element ref="coord:assignmentworkflow"/>
                <xs:element ref="coord:instruction" minOccurs="0"/>
                <xs:element ref="coord:duration"/>
                <xs:element ref="coord:type" minOccurs="0"/>
                <xs:element ref="coord:startafter" minOccurs="0"/>
                <xs:element ref="coord:endbefore" minOccurs="0"/>
                <xs:element ref="coord:promstart" minOccurs="0"/>
                <xs:element ref="coord:promend" minOccurs="0"/>
                <xs:element ref="coord:productid" minOccurs="0"/>
                <xs:element ref="coord:productname" minOccurs="0"/>
                <xs:element ref="coord:quantity" minOccurs="0"/>
                <xs:element ref="coord:wigroup" minOccurs="0"/>
                <xs:element ref="coord:wipriority" minOccurs="0"/>
                <xs:element ref="coord:status" minOccurs="0"/>
                <xs:element ref="coord:multipleassignments" minOccurs="0"/>
                <xs:element ref="coord:reportdefs" minOccurs="0"/>
                <xs:element ref="coord:wireportdefs" minOccurs="0"/>
                <xs:element ref="coord:location" minOccurs="0"/>
                <xs:element ref="coord:data" minOccurs="0"/>
            </xs:sequence>
            <xs:attribute ref="coord:type" use="required" fixed="struct"/>
        </xs:complexType>
    </xs:element>
    <xs:element name="workitemid" type="ty:string100" nillable="false">
        <xs:annotation>
            <xs:documentation>Work item Id, unique inside the WO</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="workitemid1" type="ty:string100" nillable="false">
        <xs:annotation>
            <xs:documentation>Reference to a work item ID within the work order</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="workitemid2" type="ty:string100" nillable="false">
        <xs:annotation>
            <xs:documentation>Reference to a work item ID within the work order</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="wotype" type="ty:string100" nillable="false">
        <xs:annotation>
            <xs:documentation>Type of workorder</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="woworkflow" type="ty:string100" nillable="false">
        <xs:annotation>
            <xs:documentation>Name of work order statemap</xs:documentation>
        </xs:annotation>
    </xs:element>
    <xs:element name="zipcode" type="ty:string100">
        <xs:annotation>
            <xs:documentation>Zip code</xs:documentation>
        </xs:annotation>
    </xs:element>
</xs:schema>
