请帮助使用 xslt 将以下 xml 转换为所需的格式
每个元素(如时钟输入、时钟输出、中断开始、中断结束)都需要将 TASDATA 元素作为单独的父元素
实际 XML:
<?xml version="1.0" encoding="UTF-8"?>
<tXML>
<Header>
<Source>TASSRC</Source>
<Action_Type>Create</Action_Type>
<Batch_ID>TASBTID</Batch_ID>
<Reference_ID>TASRFID</Reference_ID>
<User_ID>TASUSR</User_ID>
<Password>TASPWD</Password>
<Message_Type>TAS</Message_Type>
<Company_ID>810</Company_ID>
<Purpose_Code>TAS</Purpose_Code>
<Msg_Locale>en.US</Msg_Locale>
<Version>1.0</Version>
<Sequence_Number>TAS&</Sequence_Number>
</Header>
<Message>
<TimeAndAttendance>
<TASData>
<ClockIn>
<TranNumber>000000001</TranNumber>
<Warehouse>810</Warehouse>
<EmployeeUserId>173633</EmployeeUserId>
<EmpClockIn>2012-08-06T05:04:00</EmpClockIn>
</ClockIn>
<BreakStart>
<TranNumber>000000002</TranNumber>
<Warehouse>810</Warehouse>
<EmployeeUserId>173633</EmployeeUserId>
<BreakStartTime>2012-08-06T11:05:00</BreakStartTime>
<Activity>UNPAIDBRK</Activity>
</BreakStart>
<BreakEnd>
<TranNumber>000000003</TranNumber>
<Warehouse>810</Warehouse>
<EmployeeUserId>173633</EmployeeUserId>
<BreakStartTime>2012-08-06T11:05:00</BreakStartTime>
<BreakEndTime>2012-08-06T11:31:00</BreakEndTime>
<Activity>UNPAIDBRK</Activity>
</BreakEnd>
<ClockOut>
<TranNumber>000000004</TranNumber>
<Warehouse>810</Warehouse>
<EmployeeUserId>173633</EmployeeUserId>
<EmpClockOut>2012-08-06T15:29:00</EmpClockOut>
</ClockOut>
</TASData>
</TimeAndAttendance>
</Message>
</tXML>
所需的 XML:
<?xml version="1.0" encoding="UTF-8"?>
<tXML>
<Header>
<Source>TASSRC</Source>
<Action_Type>Create</Action_Type>
<Batch_ID>TASBTID</Batch_ID>
<Reference_ID>TASRFID</Reference_ID>
<User_ID>TASUSR</User_ID>
<Password>TASPWD</Password>
<Message_Type>TAS</Message_Type>
<Company_ID>810</Company_ID>
<Purpose_Code>TAS</Purpose_Code>
<Msg_Locale>en.US</Msg_Locale>
<Version>1.0</Version>
<Sequence_Number>TAS&</Sequence_Number>
</Header>
<Message>
<TimeAndAttendance>
<TASData>
<ClockIn>
<TranNumber>000000001</TranNumber>
<Warehouse>810</Warehouse>
<EmployeeUserId>173633</EmployeeUserId>
<EmpClockIn>2012-08-06T05:04:00</EmpClockIn>
</ClockIn>
</TASData>
<TASData>
<BreakStart>
<TranNumber>000000002</TranNumber>
<Warehouse>810</Warehouse>
<EmployeeUserId>173633</EmployeeUserId>
<BreakStartTime>2012-08-06T11:05:00</BreakStartTime>
<Activity>UNPAIDBRK</Activity>
</BreakStart>
</TASData>
<TASData>
<BreakEnd>
<TranNumber>000000003</TranNumber>
<Warehouse>810</Warehouse>
<EmployeeUserId>173633</EmployeeUserId>
<BreakStartTime>2012-08-06T11:05:00</BreakStartTime>
<BreakEndTime>2012-08-06T11:31:00</BreakEndTime>
<Activity>UNPAIDBRK</Activity>
</BreakEnd>
</TASData>
<TASData>
<ClockOut>
<TranNumber>000000004</TranNumber>
<Warehouse>810</Warehouse>
<EmployeeUserId>173633</EmployeeUserId>
<EmpClockOut>2012-08-06T15:29:00</EmpClockOut>
</ClockOut>
</TASData>
</TimeAndAttendance>
</Message>
</tXML>