3

次の XML データがあります。

<Timesheet>
<WeekEnding>Oct 7, 2012</WeekEnding>
<JobNumber>Doe - 508</JobNumber>
<WGNumber>WG No.</WGNumber>
<Customer>Dummy Company</Customer>
<City>Raleigh</City>
<State>North Carolina</State>
<TeamMember>
    <EmployeeNumber>101010</EmployeeNumber>
    <EmployeeName>Doe, Joseph</EmployeeName>
    <EmployeeClass>UCL</EmployeeClass>
    <Monday>
        <TimeDetail>
            <StartTime>Start</StartTime>
            <StopTime>Stop</StopTime>
            <WorkOrderNumber>safety meeting</WorkOrderNumber>
            <RegularHours>.5</RegularHours>
            <OverTimeHours>Over Time</OverTimeHours>
            <OtherHours>Other</OtherHours>
            <PerDiem>NO</PerDiem>
            <Notes>Safety meeting</Notes>
        </TimeDetail>
        <TimeDetail>
            <StartTime>Start</StartTime>
            <StopTime>Stop</StopTime>
            <WorkOrderNumber>rain time</WorkOrderNumber>
            <RegularHours>2</RegularHours>
            <OverTimeHours>Over Time</OverTimeHours>
            <OtherHours>Other</OtherHours>
            <PerDiem>NO</PerDiem>
            <Notes>Rain time</Notes>
        </TimeDetail>
        <TimeDetail>
            <StartTime>Start</StartTime>
            <StopTime>Stop</StopTime>
            <WorkOrderNumber>777091</WorkOrderNumber>
            <RegularHours>7.5</RegularHours>
            <OverTimeHours>Over Time</OverTimeHours>
            <OtherHours>Other</OtherHours>
            <PerDiem>NO</PerDiem>
            <Notes>Capital blvd st lights</Notes>
        </TimeDetail>
    </Monday>
    <Tuesday>
        <TimeDetail>
            <StartTime>Start</StartTime>
            <StopTime>Stop</StopTime>
            <WorkOrderNumber>safety meeting</WorkOrderNumber>
            <RegularHours>.5</RegularHours>
            <OverTimeHours>Over Time</OverTimeHours>
            <OtherHours>Other</OtherHours>
            <PerDiem>NO</PerDiem>
            <Notes>Safety meeting</Notes>
        </TimeDetail>
        <TimeDetail>
            <StartTime>Start</StartTime>
            <StopTime>Stop</StopTime>
            <WorkOrderNumber>777091</WorkOrderNumber>
            <RegularHours>9.5</RegularHours>
            <OverTimeHours>Over Time</OverTimeHours>
            <OtherHours>Other</OtherHours>
            <PerDiem>NO</PerDiem>
            <Notes>Capital blvd st lights</Notes>
        </TimeDetail>
    </Tuesday>
    <Wednesday>
        <TimeDetail>
            <StartTime>Start</StartTime>
            <StopTime>Stop</StopTime>
            <WorkOrderNumber>5555591</WorkOrderNumber>
            <RegularHours>10</RegularHours>
            <OverTimeHours>Over Time</OverTimeHours>
            <OtherHours>Other</OtherHours>
            <PerDiem>NO</PerDiem>
            <Notes>Capital blvd st lights</Notes>
        </TimeDetail>
    </Wednesday>
    <Thursday>
        <TimeDetail>
            <StartTime>Start</StartTime>
            <StopTime>Stop</StopTime>
            <WorkOrderNumber>111122</WorkOrderNumber>
            <RegularHours>10</RegularHours>
            <OverTimeHours>Over Time</OverTimeHours>
            <OtherHours>Other</OtherHours>
            <PerDiem>NO</PerDiem>
            <Notes>120 sigma dr</Notes>
        </TimeDetail>
    </Thursday>
    <Friday>
        <TimeDetail>
            <StartTime>Start</StartTime>
            <StopTime>Stop</StopTime>
            <WorkOrderNumber>999935</WorkOrderNumber>
            <RegularHours>Regular</RegularHours>
            <OverTimeHours>8</OverTimeHours>
            <OtherHours>Other</OtherHours>
            <PerDiem>NO</PerDiem>
            <Notes>St light job Progress to pay half time</Notes>
        </TimeDetail>
    </Friday>
    <Saturday></Saturday>
    <Sunday></Sunday>
</TeamMember>
<TeamMember>
    <EmployeeNumber>606060</EmployeeNumber>
    <EmployeeName>Does, Stephen</EmployeeName>
    <EmployeeClass>EO</EmployeeClass>
    <Monday>
        <TimeDetail>
            <StartTime>Start</StartTime>
            <StopTime>Stop</StopTime>
            <WorkOrderNumber>safety meeting</WorkOrderNumber>
            <RegularHours>.5</RegularHours>
            <OverTimeHours>Over Time</OverTimeHours>
            <OtherHours>Other</OtherHours>
            <PerDiem>NO</PerDiem>
            <Notes>Safety meeting</Notes>
        </TimeDetail>
        <TimeDetail>
            <StartTime>Start</StartTime>
            <StopTime>Stop</StopTime>
            <WorkOrderNumber>rain time</WorkOrderNumber>
            <RegularHours>2</RegularHours>
            <OverTimeHours>Over Time</OverTimeHours>
            <OtherHours>Other</OtherHours>
            <PerDiem>NO</PerDiem>
            <Notes>Rain time</Notes>
        </TimeDetail>
        <TimeDetail>
            <StartTime>Start</StartTime>
            <StopTime>Stop</StopTime>
            <WorkOrderNumber>777091</WorkOrderNumber>
            <RegularHours>7.5</RegularHours>
            <OverTimeHours>Over Time</OverTimeHours>
            <OtherHours>Other</OtherHours>
            <PerDiem>NO</PerDiem>
            <Notes>Capital blvd st lights</Notes>
        </TimeDetail>
    </Monday>
    <Tuesday>
        <TimeDetail>
            <StartTime>Start</StartTime>
            <StopTime>Stop</StopTime>
            <WorkOrderNumber>safety meeting</WorkOrderNumber>
            <RegularHours>.5</RegularHours>
            <OverTimeHours>Over Time</OverTimeHours>
            <OtherHours>Other</OtherHours>
            <PerDiem>NO</PerDiem>
            <Notes>Safety meeting</Notes>
        </TimeDetail>
        <TimeDetail>
            <StartTime>Start</StartTime>
            <StopTime>Stop</StopTime>
            <WorkOrderNumber>777091</WorkOrderNumber>
            <RegularHours>9.5</RegularHours>
            <OverTimeHours>Over Time</OverTimeHours>
            <OtherHours>Other</OtherHours>
            <PerDiem>NO</PerDiem>
            <Notes>Capital blvd st lights</Notes>
        </TimeDetail>
    </Tuesday>
    <Wednesday>
        <TimeDetail>
            <StartTime>Start</StartTime>
            <StopTime>Stop</StopTime>
            <WorkOrderNumber>5555591</WorkOrderNumber>
            <RegularHours>10</RegularHours>
            <OverTimeHours>Over Time</OverTimeHours>
            <OtherHours>Other</OtherHours>
            <PerDiem>NO</PerDiem>
            <Notes>Capital blvd st lights</Notes>
        </TimeDetail>
    </Wednesday>
    <Thursday></Thursday>
    <Friday></Friday>
    <Saturday></Saturday>
    <Sunday></Sunday>
</TeamMember>
<TeamMember>
    <EmployeeNumber>707070</EmployeeNumber>
    <EmployeeName>Hancock, Samuel</EmployeeName>
    <EmployeeClass>EO</EmployeeClass>
    <Monday></Monday>
    <Tuesday></Tuesday>
    <Wednesday>
        <TimeDetail>
            <StartTime>Start</StartTime>
            <StopTime>Stop</StopTime>
            <WorkOrderNumber>5555591</WorkOrderNumber>
            <RegularHours>10</RegularHours>
            <OverTimeHours>Over Time</OverTimeHours>
            <OtherHours>Other</OtherHours>
            <PerDiem>NO</PerDiem>
            <Notes>Capital blvd st lights</Notes>
        </TimeDetail>
    </Wednesday>
    <Thursday></Thursday>
    <Friday></Friday>
    <Saturday></Saturday>
    <Sunday></Sunday>
</TeamMember>
<TeamMember>
    <EmployeeNumber>808080</EmployeeNumber>
    <EmployeeName>Franklin, Ben</EmployeeName>
    <EmployeeClass>EO</EmployeeClass>
    <Monday></Monday>
    <Tuesday></Tuesday>
    <Wednesday></Wednesday>
    <Thursday>
        <TimeDetail>
            <StartTime>Start</StartTime>
            <StopTime>Stop</StopTime>
            <WorkOrderNumber>111122</WorkOrderNumber>
            <RegularHours>10</RegularHours>
            <OverTimeHours>Over Time</OverTimeHours>
            <OtherHours>Other</OtherHours>
            <PerDiem>NO</PerDiem>
            <Notes>120 sigma dr</Notes>
        </TimeDetail>
    </Thursday>
    <Friday></Friday>
    <Saturday></Saturday>
    <Sunday></Sunday>
</TeamMember>
<TeamMember>
    <EmployeeNumber>909090</EmployeeNumber>
    <EmployeeName>Doess, Smith</EmployeeName>
    <EmployeeClass>UCL</EmployeeClass>
    <Monday></Monday>
    <Tuesday></Tuesday>
    <Wednesday></Wednesday>
    <Thursday></Thursday>
    <Friday>
        <TimeDetail>
            <StartTime>Start</StartTime>
            <StopTime>Stop</StopTime>
            <WorkOrderNumber>999935</WorkOrderNumber>
            <RegularHours>4</RegularHours>
            <OverTimeHours>4</OverTimeHours>
            <OtherHours>Other</OtherHours>
            <PerDiem>NO</PerDiem>
            <Notes>St light job Progress to pay half time</Notes>
        </TimeDetail>
    </Friday>
    <Saturday></Saturday>
    <Sunday></Sunday>
</TeamMember>

従業員をループして、次のループを使用してデータを表示しています。

<xsl:for-each select="Timesheet/TeamMember[EmployeeNumber!='Employee No.']"></xsl:for-each>

そのループでは、従業員ループの現在の位置に対する従業員の個別の作業指示を表示する別のループを実行する必要があります。以下は、私が取り組んできたコードです。問題は、現在の従業員ではなく、XML ファイル全体の個別の作業指示書をすべて返すことです。何時間にもわたって何度も書き直しましたが、XML ファイルですべての作業指示書を取得するか、0 にするかのどちらかです。ありがとう。

このキーを XSLT の先頭で宣言しています

<xsl:key name="distinctWorkOrder" match="//WorkOrderNumber" use="."></xsl:key>

これは、従業員の作業指示を取得しようとしているループです

<xsl:for-each select="..//WorkOrderNumber[generate-id() = generate-id(key('distinctWorkOrder', .)[1])][//EmployeeNumber=$empId])">

更新: 出力は HTML です。従業員情報を表示するには、次のようにしました。

<tr style="height:20px;">
                        <td class="normalBorders" style="text-align:left;">Name</td>
                        <td class="borderT" style="text-align:center;">
                            <div style="border-bottom:1px solid black;height:12px;width:200px;">
                                <xsl:value-of select="EmployeeName"></xsl:value-of>
                            </div>
                        </td>
                        <td colspan="2" class="borderT" style="text-align:right;">Emp. ID#</td>
                        <td colspan="2" class="borderT" style="text-align:center">
                            <div style="border-bottom:1px solid black;height:15px; width:100%;display:inline-block;">
                                <xsl:value-of select="EmployeeNumber"/>
                            </div>
                        </td>
                        <td colspan="2" class="borderT">&#160;</td>
                        <td rowspan="2" colspan="4" class="borderT borderR">
                            <div style="width:100%;height:27px;border-bottom:1px solid black;">
                                <img src="{../Signatures/Path}" style="width:100%;height:34px;"/>
                            </div>
                        </td>
                    </tr>
                    <tr style="height:20px;">
                        <td class="borderL" style="text-align:left;">Sign/Date</td>
                        <td style="text-align:center;">
                            <div style="border-bottom:1px solid black;height:12px;width:200px;">
                                <xsl:value-of select="EmployeeName"></xsl:value-of>
                            </div>
                        </td>
                        <td colspan="5">&#160;</td>
                        <td style="text-align:right;">Approved</td>
                    </tr>

ここで、これに似た作業指示データをループして出力する必要があります

<xsl:for-each select="..//WorkOrderNumber[generate-id() = generate-id(key('distinctWorkOrder', .)[1])][//EmployeeNumber=$empId])">
<tr>
                 <td class="normalBorders"><xsl:value-of select="//WorkOrderNumber"/></td>
               <td>Other data</td>
    </tr>

4

1 に答える 1

1

これを行う方法は次のとおりです (HTML の書式設定は、読者の課題として残しておきます)。

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:output omit-xml-declaration="yes" indent="yes"/>
 <xsl:strip-space elements="*"/>

 <xsl:key name="kEmpOrder"
  match="TeamMember[not(EmployeeNumber='Employee No.')]/*/*/WorkOrderNumber"
  use="concat(../../../EmployeeNumber, '+', .)"/>

 <xsl:template match="TeamMember">
  <Employee>
     <xsl:copy-of select="*[starts-with(name(), 'Employee')]"/>
     <WorkOrders>
      <xsl:copy-of select=
      "*/*/WorkOrderNumber
           [generate-id()
           =
            generate-id(key('kEmpOrder',
                             concat(../../../EmployeeNumber, '+', .)
                             )[1]
                      )
         ]
      "/>
     </WorkOrders>
    </Employee>
 </xsl:template>
 <xsl:template match="text()"/>
</xsl:stylesheet>

この変換が提供された XML ドキュメントに適用されると、次のようになります。

<Timesheet>
    <WeekEnding>Oct 7, 2012</WeekEnding>
    <JobNumber>Doe - 508</JobNumber>
    <WGNumber>WG No.</WGNumber>
    <Customer>Dummy Company</Customer>
    <City>Raleigh</City>
    <State>North Carolina</State>
    <TeamMember>
        <EmployeeNumber>101010</EmployeeNumber>
        <EmployeeName>Doe, Joseph</EmployeeName>
        <EmployeeClass>UCL</EmployeeClass>
        <Monday>
            <TimeDetail>
                <StartTime>Start</StartTime>
                <StopTime>Stop</StopTime>
                <WorkOrderNumber>safety meeting</WorkOrderNumber>
                <RegularHours>.5</RegularHours>
                <OverTimeHours>Over Time</OverTimeHours>
                <OtherHours>Other</OtherHours>
                <PerDiem>NO</PerDiem>
                <Notes>Safety meeting</Notes>
            </TimeDetail>
            <TimeDetail>
                <StartTime>Start</StartTime>
                <StopTime>Stop</StopTime>
                <WorkOrderNumber>rain time</WorkOrderNumber>
                <RegularHours>2</RegularHours>
                <OverTimeHours>Over Time</OverTimeHours>
                <OtherHours>Other</OtherHours>
                <PerDiem>NO</PerDiem>
                <Notes>Rain time</Notes>
            </TimeDetail>
            <TimeDetail>
                <StartTime>Start</StartTime>
                <StopTime>Stop</StopTime>
                <WorkOrderNumber>777091</WorkOrderNumber>
                <RegularHours>7.5</RegularHours>
                <OverTimeHours>Over Time</OverTimeHours>
                <OtherHours>Other</OtherHours>
                <PerDiem>NO</PerDiem>
                <Notes>Capital blvd st lights</Notes>
            </TimeDetail>
        </Monday>
        <Tuesday>
            <TimeDetail>
                <StartTime>Start</StartTime>
                <StopTime>Stop</StopTime>
                <WorkOrderNumber>safety meeting</WorkOrderNumber>
                <RegularHours>.5</RegularHours>
                <OverTimeHours>Over Time</OverTimeHours>
                <OtherHours>Other</OtherHours>
                <PerDiem>NO</PerDiem>
                <Notes>Safety meeting</Notes>
            </TimeDetail>
            <TimeDetail>
                <StartTime>Start</StartTime>
                <StopTime>Stop</StopTime>
                <WorkOrderNumber>777091</WorkOrderNumber>
                <RegularHours>9.5</RegularHours>
                <OverTimeHours>Over Time</OverTimeHours>
                <OtherHours>Other</OtherHours>
                <PerDiem>NO</PerDiem>
                <Notes>Capital blvd st lights</Notes>
            </TimeDetail>
        </Tuesday>
        <Wednesday>
            <TimeDetail>
                <StartTime>Start</StartTime>
                <StopTime>Stop</StopTime>
                <WorkOrderNumber>5555591</WorkOrderNumber>
                <RegularHours>10</RegularHours>
                <OverTimeHours>Over Time</OverTimeHours>
                <OtherHours>Other</OtherHours>
                <PerDiem>NO</PerDiem>
                <Notes>Capital blvd st lights</Notes>
            </TimeDetail>
        </Wednesday>
        <Thursday>
            <TimeDetail>
                <StartTime>Start</StartTime>
                <StopTime>Stop</StopTime>
                <WorkOrderNumber>111122</WorkOrderNumber>
                <RegularHours>10</RegularHours>
                <OverTimeHours>Over Time</OverTimeHours>
                <OtherHours>Other</OtherHours>
                <PerDiem>NO</PerDiem>
                <Notes>120 sigma dr</Notes>
            </TimeDetail>
        </Thursday>
        <Friday>
            <TimeDetail>
                <StartTime>Start</StartTime>
                <StopTime>Stop</StopTime>
                <WorkOrderNumber>999935</WorkOrderNumber>
                <RegularHours>Regular</RegularHours>
                <OverTimeHours>8</OverTimeHours>
                <OtherHours>Other</OtherHours>
                <PerDiem>NO</PerDiem>
                <Notes>St light job Progress to pay half time</Notes>
            </TimeDetail>
        </Friday>
        <Saturday></Saturday>
        <Sunday></Sunday>
    </TeamMember>
    <TeamMember>
        <EmployeeNumber>606060</EmployeeNumber>
        <EmployeeName>Does, Stephen</EmployeeName>
        <EmployeeClass>EO</EmployeeClass>
        <Monday>
            <TimeDetail>
                <StartTime>Start</StartTime>
                <StopTime>Stop</StopTime>
                <WorkOrderNumber>safety meeting</WorkOrderNumber>
                <RegularHours>.5</RegularHours>
                <OverTimeHours>Over Time</OverTimeHours>
                <OtherHours>Other</OtherHours>
                <PerDiem>NO</PerDiem>
                <Notes>Safety meeting</Notes>
            </TimeDetail>
            <TimeDetail>
                <StartTime>Start</StartTime>
                <StopTime>Stop</StopTime>
                <WorkOrderNumber>rain time</WorkOrderNumber>
                <RegularHours>2</RegularHours>
                <OverTimeHours>Over Time</OverTimeHours>
                <OtherHours>Other</OtherHours>
                <PerDiem>NO</PerDiem>
                <Notes>Rain time</Notes>
            </TimeDetail>
            <TimeDetail>
                <StartTime>Start</StartTime>
                <StopTime>Stop</StopTime>
                <WorkOrderNumber>777091</WorkOrderNumber>
                <RegularHours>7.5</RegularHours>
                <OverTimeHours>Over Time</OverTimeHours>
                <OtherHours>Other</OtherHours>
                <PerDiem>NO</PerDiem>
                <Notes>Capital blvd st lights</Notes>
            </TimeDetail>
        </Monday>
        <Tuesday>
            <TimeDetail>
                <StartTime>Start</StartTime>
                <StopTime>Stop</StopTime>
                <WorkOrderNumber>safety meeting</WorkOrderNumber>
                <RegularHours>.5</RegularHours>
                <OverTimeHours>Over Time</OverTimeHours>
                <OtherHours>Other</OtherHours>
                <PerDiem>NO</PerDiem>
                <Notes>Safety meeting</Notes>
            </TimeDetail>
            <TimeDetail>
                <StartTime>Start</StartTime>
                <StopTime>Stop</StopTime>
                <WorkOrderNumber>777091</WorkOrderNumber>
                <RegularHours>9.5</RegularHours>
                <OverTimeHours>Over Time</OverTimeHours>
                <OtherHours>Other</OtherHours>
                <PerDiem>NO</PerDiem>
                <Notes>Capital blvd st lights</Notes>
            </TimeDetail>
        </Tuesday>
        <Wednesday>
            <TimeDetail>
                <StartTime>Start</StartTime>
                <StopTime>Stop</StopTime>
                <WorkOrderNumber>5555591</WorkOrderNumber>
                <RegularHours>10</RegularHours>
                <OverTimeHours>Over Time</OverTimeHours>
                <OtherHours>Other</OtherHours>
                <PerDiem>NO</PerDiem>
                <Notes>Capital blvd st lights</Notes>
            </TimeDetail>
        </Wednesday>
        <Thursday></Thursday>
        <Friday></Friday>
        <Saturday></Saturday>
        <Sunday></Sunday>
    </TeamMember>
    <TeamMember>
        <EmployeeNumber>707070</EmployeeNumber>
        <EmployeeName>Hancock, Samuel</EmployeeName>
        <EmployeeClass>EO</EmployeeClass>
        <Monday></Monday>
        <Tuesday></Tuesday>
        <Wednesday>
            <TimeDetail>
                <StartTime>Start</StartTime>
                <StopTime>Stop</StopTime>
                <WorkOrderNumber>5555591</WorkOrderNumber>
                <RegularHours>10</RegularHours>
                <OverTimeHours>Over Time</OverTimeHours>
                <OtherHours>Other</OtherHours>
                <PerDiem>NO</PerDiem>
                <Notes>Capital blvd st lights</Notes>
            </TimeDetail>
        </Wednesday>
        <Thursday></Thursday>
        <Friday></Friday>
        <Saturday></Saturday>
        <Sunday></Sunday>
    </TeamMember>
    <TeamMember>
        <EmployeeNumber>808080</EmployeeNumber>
        <EmployeeName>Franklin, Ben</EmployeeName>
        <EmployeeClass>EO</EmployeeClass>
        <Monday></Monday>
        <Tuesday></Tuesday>
        <Wednesday></Wednesday>
        <Thursday>
            <TimeDetail>
                <StartTime>Start</StartTime>
                <StopTime>Stop</StopTime>
                <WorkOrderNumber>111122</WorkOrderNumber>
                <RegularHours>10</RegularHours>
                <OverTimeHours>Over Time</OverTimeHours>
                <OtherHours>Other</OtherHours>
                <PerDiem>NO</PerDiem>
                <Notes>120 sigma dr</Notes>
            </TimeDetail>
        </Thursday>
        <Friday></Friday>
        <Saturday></Saturday>
        <Sunday></Sunday>
    </TeamMember>
    <TeamMember>
        <EmployeeNumber>909090</EmployeeNumber>
        <EmployeeName>Doess, Smith</EmployeeName>
        <EmployeeClass>UCL</EmployeeClass>
        <Monday></Monday>
        <Tuesday></Tuesday>
        <Wednesday></Wednesday>
        <Thursday></Thursday>
        <Friday>
            <TimeDetail>
                <StartTime>Start</StartTime>
                <StopTime>Stop</StopTime>
                <WorkOrderNumber>999935</WorkOrderNumber>
                <RegularHours>4</RegularHours>
                <OverTimeHours>4</OverTimeHours>
                <OtherHours>Other</OtherHours>
                <PerDiem>NO</PerDiem>
                <Notes>St light job Progress to pay half time</Notes>
            </TimeDetail>
        </Friday>
        <Saturday></Saturday>
        <Sunday></Sunday>
    </TeamMember>
</Timesheet>

必要な、正しくグループ化された結果が生成されます。

<Employee>
   <EmployeeNumber>101010</EmployeeNumber>
   <EmployeeName>Doe, Joseph</EmployeeName>
   <EmployeeClass>UCL</EmployeeClass>
   <WorkOrders>
      <WorkOrderNumber>safety meeting</WorkOrderNumber>
      <WorkOrderNumber>rain time</WorkOrderNumber>
      <WorkOrderNumber>777091</WorkOrderNumber>
      <WorkOrderNumber>5555591</WorkOrderNumber>
      <WorkOrderNumber>111122</WorkOrderNumber>
      <WorkOrderNumber>999935</WorkOrderNumber>
   </WorkOrders>
</Employee>
<Employee>
   <EmployeeNumber>606060</EmployeeNumber>
   <EmployeeName>Does, Stephen</EmployeeName>
   <EmployeeClass>EO</EmployeeClass>
   <WorkOrders>
      <WorkOrderNumber>safety meeting</WorkOrderNumber>
      <WorkOrderNumber>rain time</WorkOrderNumber>
      <WorkOrderNumber>777091</WorkOrderNumber>
      <WorkOrderNumber>5555591</WorkOrderNumber>
   </WorkOrders>
</Employee>
<Employee>
   <EmployeeNumber>707070</EmployeeNumber>
   <EmployeeName>Hancock, Samuel</EmployeeName>
   <EmployeeClass>EO</EmployeeClass>
   <WorkOrders>
      <WorkOrderNumber>5555591</WorkOrderNumber>
   </WorkOrders>
</Employee>
<Employee>
   <EmployeeNumber>808080</EmployeeNumber>
   <EmployeeName>Franklin, Ben</EmployeeName>
   <EmployeeClass>EO</EmployeeClass>
   <WorkOrders>
      <WorkOrderNumber>111122</WorkOrderNumber>
   </WorkOrders>
</Employee>
<Employee>
   <EmployeeNumber>909090</EmployeeNumber>
   <EmployeeName>Doess, Smith</EmployeeName>
   <EmployeeClass>UCL</EmployeeClass>
   <WorkOrders>
      <WorkOrderNumber>999935</WorkOrderNumber>
   </WorkOrders>
</Employee>

説明:

複合キーを使用したMuenchian グループ化方法の適切な使用。

于 2012-11-20T18:51:40.283 に答える