<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
           targetNamespace="http://example.com/navisworks/delmia/pathplanning"           xmlns:pp="http://example.com/navisworks/delmia/pathplanning" elementFormDefault="qualified">

    <xs:element name="PathPlanningData">
        <xs:complexType>
            <xs:sequence> <xs:element name="ProjectInfo" type="pp:ProjectInfoType"/>                <xs:element name="StaticElements" type="pp:StaticElementsType" minOccurs="0"/>
                <xs:element name="MovingObjects" type="pp:MovingObjectsType"/>
            </xs:sequence> <xs:attribute name="exportTimestamp" type="xs:dateTime" use="required"/>            <xs:attribute name="sourceApplication" type="xs:string" use="required"/>            <xs:attribute name="version" type="xs:string" use="required"/>        </xs:complexType>
    </xs:element>

    <xs:complexType name="ProjectInfoType"> <xs:sequence> <xs:element name="ProjectId" type="xs:string"/>            <xs:element name="ProjectName" type="xs:string"/> <xs:element name="Description" type="xs:string" minOccurs="0"/>
        </xs:sequence> </xs:complexType>

    <xs:complexType name="StaticElementsType">
        <xs:sequence> <xs:element name="Obstacle" type="pp:ObstacleType" maxOccurs="unbounded"/>
        </xs:sequence> </xs:complexType> <xs:complexType name="ObstacleType"> <xs:sequence> <xs:element name="BoundingBox" type="pp:BoundingBoxType"/>
        </xs:sequence> <xs:attribute name="id" type="xs:ID" use="required"/>
        <xs:attribute name="name" type="xs:string" use="required"/>    </xs:complexType>

    <xs:complexType name="MovingObjectsType">        <xs:sequence> <xs:element name="Object" type="pp:ObjectType" maxOccurs="unbounded"/>        </xs:sequence> </xs:complexType>

    <xs:complexType name="ObjectType">        <xs:sequence>
            <xs:element name="Geometry" type="pp:GeometryType"/>            <xs:element name="Trajectory" type="pp:TrajectoryType" maxOccurs="unbounded"/>
        </xs:sequence> <xs:attribute name="id" type="xs:ID" use="required"/> <xs:attribute name="name" type="xs:string" use="required"/>        <xs:attribute name="type" type="xs:string" use="required"/> <!-- e.g., Object, Crane, Robot -->
    </xs:complexType> <xs:complexType name="GeometryType">
        <xs:sequence>            <xs:element name="BoundingBox" type="pp:BoundingBoxType"/>            <!-- 可以扩展以包含更复杂的几何引用或数据 -->
        </xs:sequence>
    </xs:complexType> <xs:complexType name="BoundingBoxType">        <xs:sequence>            <xs:element name="Min">
                <xs:complexType>
                    <xs:attribute name="x" type="xs:double" use="required"/> <xs:attribute name="y" type="xs:double" use="required"/> <xs:attribute name="z" type="xs:double" use="required"/> </xs:complexType>
            </xs:element>
            <xs:element name="Max">
                <xs:complexType> <xs:attribute name="x" type="xs:double" use="required"/>
                    <xs:attribute name="y" type="xs:double" use="required"/> <xs:attribute name="z" type="xs:double" use="required"/>
                </xs:complexType>            </xs:element>
        </xs:sequence>    </xs:complexType>

    <xs:complexType name="TrajectoryType"> <xs:sequence> <xs:element name="Waypoints" type="pp:WaypointsType"/> <xs:element name="Metadata" type="pp:MetadataType" minOccurs="0"/>
        </xs:sequence> <xs:attribute name="id" type="xs:ID" use="required"/>
        <xs:attribute name="name" type="xs:string" use="required"/>    </xs:complexType>

    <xs:complexType name="WaypointsType">
        <xs:sequence> <xs:element name="Waypoint" type="pp:WaypointType" maxOccurs="unbounded"/>        </xs:sequence>
    </xs:complexType>    <xs:complexType name="WaypointType"> <xs:sequence>
            <xs:element name="Position">
                <xs:complexType> <xs:attribute name="x" type="xs:double" use="required"/> <xs:attribute name="y" type="xs:double" use="required"/> <xs:attribute name="z" type="xs:double" use="required"/> </xs:complexType>
            </xs:element> <xs:element name="Orientation">
                <xs:complexType> <xs:attribute name="qw" type="xs:double" use="required"/> <xs:attribute name="qx" type="xs:double" use="required"/> <xs:attribute name="qy" type="xs:double" use="required"/> <xs:attribute name="qz" type="xs:double" use="required"/> </xs:complexType>
            </xs:element> <xs:element name="Speed">
                <xs:complexType>
                    <xs:simpleContent> <xs:extension base="xs:double">
                            <xs:attribute name="unit" type="xs:string" use="required" fixed="m/s"/>
                        </xs:extension> </xs:simpleContent> </xs:complexType>
            </xs:element>            <xs:element name="Time">                <xs:complexType> <xs:simpleContent> <xs:extension base="xs:double">
                            <xs:attribute name="unit" type="xs:string" use="required" fixed="s"/> </xs:extension> </xs:simpleContent> </xs:complexType>
            </xs:element> </xs:sequence> <xs:attribute name="id" type="xs:ID" use="required"/>
        <xs:attribute name="type" type="pp:WaypointTypeEnum" use="required"/>    </xs:complexType>

    <xs:simpleType name="WaypointTypeEnum"> <xs:restriction base="xs:string">
            <xs:enumeration value="Start"/> <xs:enumeration value="Via"/>
            <xs:enumeration value="Goal"/> </xs:restriction> </xs:simpleType>    <xs:complexType name="MetadataType">
        <xs:sequence>            <xs:element name="PlannedBy" type="xs:string" minOccurs="0"/> <xs:element name="PlannedDate" type="xs:date" minOccurs="0"/>
            <xs:element name="TotalLength">
                <xs:complexType>
                    <xs:simpleContent> <xs:extension base="xs:double">
                            <xs:attribute name="unit" type="xs:string" use="required" fixed="m"/> </xs:extension>
                    </xs:simpleContent> </xs:complexType>
            </xs:element> <xs:element name="EstimatedDuration">                <xs:complexType>
                    <xs:simpleContent> <xs:extension base="xs:double"> <xs:attribute name="unit" type="xs:string" use="required" fixed="s"/>                        </xs:extension> </xs:simpleContent> </xs:complexType>
            </xs:element>            <!-- 可以根据需要添加更多元数据 -->
        </xs:sequence>    </xs:complexType>

</xs:schema>