これは皆さんにとって複雑ではないかもしれませんが、私にとっては非常に困難です。これは私の2回目の試みです。データを変更して、変換にかかる時間が少ない情報を追加しました。
基本的に、私は3つの休暇プラン(VA、SS、WR)で構成されるデータを取得し、各プランが労働者ごとに1年間に各給与期間に発生する時間を予測しようとしています。データを短くするために、データには3つの支払い期間しか含めていません。労働者/発効日の組み合わせごとに個別の記録が必要です。したがって、労働者に3つの休暇計画があり、隔週(26回/年)で支払われる場合、その労働者は78のレコードを持つことができます。
これが私が始めているXMLです(私の例では最初の3つの支払い期間の日付のみを使用しており、26のすべてではないことを思い出してください):
<?xml version='1.0' encoding='UTF-8'?>
<bb:Report_Data xmlns:bb="urn:com.workday.report/Projected_Balances_Outbound">
<bb:Report_Entry>
<bb:projectedBalanceTotal.principalId>1238974569</bb:projectedBalanceTotal.principalId>
<bb:All_Eligible_Time_Off_Plans_for_Worker>
<bb:projectedBalanceTotal.planCodeId>SS</bb:projectedBalanceTotal.planCodeId>
<bb:projectedBalanceTotal.leaveCodeId>SS</bb:projectedBalanceTotal.leaveCodeId>
<bb:projected_balance_accrual_amount_for_the_pay_period>3.323</bb:projected_balance_accrual_amount_for_the_pay_period>
<bb:projectedBalanceTotal.effectiveDate1>07112012</bb:projectedBalanceTotal.effectiveDate1>
<bb:projectedBalanceTotal.effectiveDate2>07252012</bb:projectedBalanceTotal.effectiveDate2>
<bb:projectedBalanceTotal.effectiveDate3>08082012</bb:projectedBalanceTotal.effectiveDate3>
</bb:All_Eligible_Time_Off_Plans_for_Worker>
<bb:All_Eligible_Time_Off_Plans_for_Worker>
<bb:projectedBalanceTotal.planCodeId>VA</bb:projectedBalanceTotal.planCodeId>
<bb:projectedBalanceTotal.leaveCodeId>VA</bb:projectedBalanceTotal.leaveCodeId>
<bb:projected_balance_accrual_amount_for_the_pay_period>0</bb:projected_balance_accrual_amount_for_the_pay_period>
<bb:projectedBalanceTotal.effectiveDate1>07112012</bb:projectedBalanceTotal.effectiveDate1>
<bb:projectedBalanceTotal.effectiveDate2>07252012</bb:projectedBalanceTotal.effectiveDate2>
<bb:projectedBalanceTotal.effectiveDate3>08082012</bb:projectedBalanceTotal.effectiveDate3>
</bb:All_Eligible_Time_Off_Plans_for_Worker>
<bb:All_Eligible_Time_Off_Plans_for_Worker>
<bb:projectedBalanceTotal.planCodeId>WR</bb:projectedBalanceTotal.planCodeId>
<bb:projectedBalanceTotal.leaveCodeId>WR</bb:projectedBalanceTotal.leaveCodeId>
<bb:projected_balance_accrual_amount_for_the_pay_period>0</bb:projected_balance_accrual_amount_for_the_pay_period>
<bb:projectedBalanceTotal.effectiveDate1>07112012</bb:projectedBalanceTotal.effectiveDate1>
<bb:projectedBalanceTotal.effectiveDate2>07252012</bb:projectedBalanceTotal.effectiveDate2>
<bb:projectedBalanceTotal.effectiveDate3>08082012</bb:projectedBalanceTotal.effectiveDate3>
</bb:All_Eligible_Time_Off_Plans_for_Worker>
<bb:projectedBalanceTotal.employeeid>123454</bb:projectedBalanceTotal.employeeid>
</bb:Report_Entry>
<bb:Report_Entry>
<bb:projectedBalanceTotal.principalId>4545645878</bb:projectedBalanceTotal.principalId>
<bb:All_Eligible_Time_Off_Plans_for_Worker>
<bb:projectedBalanceTotal.planCodeId>SS</bb:projectedBalanceTotal.planCodeId>
<bb:projectedBalanceTotal.leaveCodeId>SS</bb:projectedBalanceTotal.leaveCodeId>
<bb:projected_balance_accrual_amount_for_the_pay_period>3.692</bb:projected_balance_accrual_amount_for_the_pay_period>
<bb:projectedBalanceTotal.effectiveDate1>07112012</bb:projectedBalanceTotal.effectiveDate1>
<bb:projectedBalanceTotal.effectiveDate2>07252012</bb:projectedBalanceTotal.effectiveDate2>
<bb:projectedBalanceTotal.effectiveDate3>08082012</bb:projectedBalanceTotal.effectiveDate3>
</bb:All_Eligible_Time_Off_Plans_for_Worker>
<bb:All_Eligible_Time_Off_Plans_for_Worker>
<bb:projectedBalanceTotal.planCodeId>VA</bb:projectedBalanceTotal.planCodeId>
<bb:projectedBalanceTotal.leaveCodeId>VA</bb:projectedBalanceTotal.leaveCodeId>
<bb:projected_balance_accrual_amount_for_the_pay_period>0</bb:projected_balance_accrual_amount_for_the_pay_period>
<bb:projectedBalanceTotal.effectiveDate1>07112012</bb:projectedBalanceTotal.effectiveDate1>
<bb:projectedBalanceTotal.effectiveDate2>07252012</bb:projectedBalanceTotal.effectiveDate2>
<bb:projectedBalanceTotal.effectiveDate3>08082012</bb:projectedBalanceTotal.effectiveDate3>
</bb:All_Eligible_Time_Off_Plans_for_Worker>
<bb:All_Eligible_Time_Off_Plans_for_Worker>
<bb:projectedBalanceTotal.planCodeId>WR</bb:projectedBalanceTotal.planCodeId>
<bb:projectedBalanceTotal.leaveCodeId>WR</bb:projectedBalanceTotal.leaveCodeId>
<bb:projected_balance_accrual_amount_for_the_pay_period>0</bb:projected_balance_accrual_amount_for_the_pay_period>
<bb:projectedBalanceTotal.effectiveDate1>07112012</bb:projectedBalanceTotal.effectiveDate1>
<bb:projectedBalanceTotal.effectiveDate2>07252012</bb:projectedBalanceTotal.effectiveDate2>
<bb:projectedBalanceTotal.effectiveDate3>08082012</bb:projectedBalanceTotal.effectiveDate3>
</bb:All_Eligible_Time_Off_Plans_for_Worker>
<bb:projectedBalanceTotal.employeeid>445241</bb:projectedBalanceTotal.employeeid>
</bb:Report_Entry>
</bb:Report_Data>
これは、変換後に出力を表示するために必要なものです。
<?xml version='1.0' encoding='UTF-8'?>
<bb:Report_Data xmlns:bb="urn:com.workday.report/Projected_Balances_Outbound">
<projectedBalanceTotal>
<bb:projectedBalanceTotal.principalId>1238974569</bb:projectedBalanceTotal.principalId>
<bb:projectedBalanceTotal.planCodeId>SS</bb:projectedBalanceTotal.planCodeId>
<bb:projectedBalanceTotal.leaveCodeId>SS</bb:projectedBalanceTotal.leaveCodeId>
<bb:projected_balance_accrual_amount_for_the_pay_period>3.323</bb:projected_balance_accrual_amount_for_the_pay_period>
<bb:projectedBalanceTotal.effectiveDate1>07112012</bb:projectedBalanceTotal.effectiveDate1>
<bb:projectedBalanceTotal.employeeid>123454</bb:projectedBalanceTotal.employeeid>
</projectedBalanceTotal>
<projectedBalanceTotal>
<bb:projectedBalanceTotal.principalId>1238974569/bb:projectedBalanceTotal.principalId>
<bb:projectedBalanceTotal.planCodeId>SS</bb:projectedBalanceTotal.planCodeId>
<bb:projectedBalanceTotal.leaveCodeId>SS</bb:projectedBalanceTotal.leaveCodeId>
<bb:projected_balance_accrual_amount_for_the_pay_period>3.323</bb:projected_balance_accrual_amount_for_the_pay_period>
<bb:projectedBalanceTotal.effectiveDate1>07252012</bb:projectedBalanceTotal.effectiveDate1>
<bb:projectedBalanceTotal.employeeid>123454</bb:projectedBalanceTotal.employeeid>
</projectedBalanceTotal>
<projectedBalanceTotal>
<bb:projectedBalanceTotal.principalId>1238974569/bb:projectedBalanceTotal.principalId>
<bb:projectedBalanceTotal.planCodeId>SS</bb:projectedBalanceTotal.planCodeId>
<bb:projectedBalanceTotal.leaveCodeId>SS</bb:projectedBalanceTotal.leaveCodeId>
<bb:projected_balance_accrual_amount_for_the_pay_period>3.323</bb:projected_balance_accrual_amount_for_the_pay_period>
<bb:projectedBalanceTotal.effectiveDate1>08082012</bb:projectedBalanceTotal.effectiveDate1>
<bb:projectedBalanceTotal.employeeid>123454</bb:projectedBalanceTotal.employeeid>
</projectedBalanceTotal>
<projectedBalanceTotal>
<bb:projectedBalanceTotal.principalId>1238974569/bb:projectedBalanceTotal.principalId>
<bb:projectedBalanceTotal.planCodeId>WR</bb:projectedBalanceTotal.planCodeId>
<bb:projectedBalanceTotal.leaveCodeId>WR</bb:projectedBalanceTotal.leaveCodeId>
<bb:projected_balance_accrual_amount_for_the_pay_period>0</bb:projected_balance_accrual_amount_for_the_pay_period>
<bb:projectedBalanceTotal.effectiveDate1>07112012</bb:projectedBalanceTotal.effectiveDate1>
<bb:projectedBalanceTotal.employeeid>123454</bb:projectedBalanceTotal.employeeid>
</projectedBalanceTotal>
<projectedBalanceTotal>
<bb:projectedBalanceTotal.principalId>1238974569/bb:projectedBalanceTotal.principalId>
<bb:projectedBalanceTotal.planCodeId>WR</bb:projectedBalanceTotal.planCodeId>
<bb:projectedBalanceTotal.leaveCodeId>WR</bb:projectedBalanceTotal.leaveCodeId>
<bb:projected_balance_accrual_amount_for_the_pay_period>0</bb:projected_balance_accrual_amount_for_the_pay_period>
<bb:projectedBalanceTotal.effectiveDate1>07252012</bb:projectedBalanceTotal.effectiveDate1>
<bb:projectedBalanceTotal.employeeid>123454</bb:projectedBalanceTotal.employeeid>
</projectedBalanceTotal>
<projectedBalanceTotal>
<bb:projectedBalanceTotal.principalId>1238974569/bb:projectedBalanceTotal.principalId>
<bb:projectedBalanceTotal.planCodeId>WR</bb:projectedBalanceTotal.planCodeId>
<bb:projectedBalanceTotal.leaveCodeId>WR</bb:projectedBalanceTotal.leaveCodeId>
<bb:projected_balance_accrual_amount_for_the_pay_period>0</bb:projected_balance_accrual_amount_for_the_pay_period>
<bb:projectedBalanceTotal.effectiveDate1>08082012</bb:projectedBalanceTotal.effectiveDate1>
<bb:projectedBalanceTotal.employeeid>123454</bb:projectedBalanceTotal.employeeid>
</projectedBalanceTotal>
<projectedBalanceTotal>
<bb:projectedBalanceTotal.principalId>1238974569/bb:projectedBalanceTotal.principalId>
<bb:projectedBalanceTotal.planCodeId>VA</bb:projectedBalanceTotal.planCodeId>
<bb:projectedBalanceTotal.leaveCodeId>VA</bb:projectedBalanceTotal.leaveCodeId>
<bb:projected_balance_accrual_amount_for_the_pay_period>0</bb:projected_balance_accrual_amount_for_the_pay_period>
<bb:projectedBalanceTotal.effectiveDate1>07112012</bb:projectedBalanceTotal.effectiveDate1>
<bb:projectedBalanceTotal.employeeid>123454</bb:projectedBalanceTotal.employeeid>
</projectedBalanceTotal>
<projectedBalanceTotal>
<bb:projectedBalanceTotal.principalId>1238974569/bb:projectedBalanceTotal.principalId>
<bb:projectedBalanceTotal.planCodeId>VA</bb:projectedBalanceTotal.planCodeId>
<bb:projectedBalanceTotal.leaveCodeId>VA</bb:projectedBalanceTotal.leaveCodeId>
<bb:projected_balance_accrual_amount_for_the_pay_period>0</bb:projected_balance_accrual_amount_for_the_pay_period>
<bb:projectedBalanceTotal.effectiveDate1>07252012</bb:projectedBalanceTotal.effectiveDate1>
<bb:projectedBalanceTotal.employeeid>123454</bb:projectedBalanceTotal.employeeid>
</projectedBalanceTotal>
<projectedBalanceTotal>
<bb:projectedBalanceTotal.principalId>1238974569/bb:projectedBalanceTotal.principalId>
<bb:projectedBalanceTotal.planCodeId>VA</bb:projectedBalanceTotal.planCodeId>
<bb:projectedBalanceTotal.leaveCodeId>VA</bb:projectedBalanceTotal.leaveCodeId>
<bb:projected_balance_accrual_amount_for_the_pay_period>0</bb:projected_balance_accrual_amount_for_the_pay_period>
<bb:projectedBalanceTotal.effectiveDate1>08082012</bb:projectedBalanceTotal.effectiveDate1>
<bb:projectedBalanceTotal.employeeid>123454</bb:projectedBalanceTotal.employeeid>
</projectedBalanceTotal>
<projectedBalanceTotal>
<bb:projectedBalanceTotal.principalId>4545645878/bb:projectedBalanceTotal.principalId>
<bb:projectedBalanceTotal.planCodeId>SS</bb:projectedBalanceTotal.planCodeId>
<bb:projectedBalanceTotal.leaveCodeId>SS</bb:projectedBalanceTotal.leaveCodeId>
<bb:projected_balance_accrual_amount_for_the_pay_period>3.692</bb:projected_balance_accrual_amount_for_the_pay_period>
<bb:projectedBalanceTotal.effectiveDate1>07112012</bb:projectedBalanceTotal.effectiveDate1>
<bb:projectedBalanceTotal.employeeid>445241</bb:projectedBalanceTotal.employeeid>
</projectedBalanceTotal>
<projectedBalanceTotal>
<bb:projectedBalanceTotal.principalId>4545645878/bb:projectedBalanceTotal.principalId>
<bb:projectedBalanceTotal.planCodeId>SS</bb:projectedBalanceTotal.planCodeId>
<bb:projectedBalanceTotal.leaveCodeId>SS</bb:projectedBalanceTotal.leaveCodeId>
<bb:projected_balance_accrual_amount_for_the_pay_period>3.692</bb:projected_balance_accrual_amount_for_the_pay_period>
<bb:projectedBalanceTotal.effectiveDate1>07252012</bb:projectedBalanceTotal.effectiveDate1>
<bb:projectedBalanceTotal.employeeid>445241</bb:projectedBalanceTotal.employeeid>
</projectedBalanceTotal>
<projectedBalanceTotal>
<bb:projectedBalanceTotal.principalId>4545645878/bb:projectedBalanceTotal.principalId>
<bb:projectedBalanceTotal.planCodeId>SS</bb:projectedBalanceTotal.planCodeId>
<bb:projectedBalanceTotal.leaveCodeId>SS</bb:projectedBalanceTotal.leaveCodeId>
<bb:projected_balance_accrual_amount_for_the_pay_period>3.692</bb:projected_balance_accrual_amount_for_the_pay_period>
<bb:projectedBalanceTotal.effectiveDate1>08082012</bb:projectedBalanceTotal.effectiveDate1>
<bb:projectedBalanceTotal.employeeid>445241</bb:projectedBalanceTotal.employeeid>
</projectedBalanceTotal>
<projectedBalanceTotal>
<bb:projectedBalanceTotal.principalId>4545645878/bb:projectedBalanceTotal.principalId>
<bb:projectedBalanceTotal.planCodeId>WR</bb:projectedBalanceTotal.planCodeId>
<bb:projectedBalanceTotal.leaveCodeId>WR</bb:projectedBalanceTotal.leaveCodeId>
<bb:projected_balance_accrual_amount_for_the_pay_period>0</bb:projected_balance_accrual_amount_for_the_pay_period>
<bb:projectedBalanceTotal.effectiveDate1>07112012</bb:projectedBalanceTotal.effectiveDate1>
<bb:projectedBalanceTotal.employeeid>445241</bb:projectedBalanceTotal.employeeid>
</projectedBalanceTotal>
<projectedBalanceTotal>
<bb:projectedBalanceTotal.principalId>4545645878/bb:projectedBalanceTotal.principalId>
<bb:projectedBalanceTotal.planCodeId>WR</bb:projectedBalanceTotal.planCodeId>
<bb:projectedBalanceTotal.leaveCodeId>WR</bb:projectedBalanceTotal.leaveCodeId>
<bb:projected_balance_accrual_amount_for_the_pay_period>0</bb:projected_balance_accrual_amount_for_the_pay_period>
<bb:projectedBalanceTotal.effectiveDate1>07252012</bb:projectedBalanceTotal.effectiveDate1>
<bb:projectedBalanceTotal.employeeid>445241</bb:projectedBalanceTotal.employeeid>
</projectedBalanceTotal>
<projectedBalanceTotal>
<bb:projectedBalanceTotal.principalId>4545645878/bb:projectedBalanceTotal.principalId>
<bb:projectedBalanceTotal.planCodeId>WR</bb:projectedBalanceTotal.planCodeId>
<bb:projectedBalanceTotal.leaveCodeId>WR</bb:projectedBalanceTotal.leaveCodeId>
<bb:projected_balance_accrual_amount_for_the_pay_period>0</bb:projected_balance_accrual_amount_for_the_pay_period>
<bb:projectedBalanceTotal.effectiveDate1>08082012</bb:projectedBalanceTotal.effectiveDate1>
<bb:projectedBalanceTotal.employeeid>445241</bb:projectedBalanceTotal.employeeid>
</projectedBalanceTotal>
<projectedBalanceTotal>
<bb:projectedBalanceTotal.principalId>4545645878/bb:projectedBalanceTotal.principalId>
<bb:projectedBalanceTotal.planCodeId>VA</bb:projectedBalanceTotal.planCodeId>
<bb:projectedBalanceTotal.leaveCodeId>VA</bb:projectedBalanceTotal.leaveCodeId>
<bb:projected_balance_accrual_amount_for_the_pay_period>0</bb:projected_balance_accrual_amount_for_the_pay_period>
<bb:projectedBalanceTotal.effectiveDate1>07112012</bb:projectedBalanceTotal.effectiveDate1>
<bb:projectedBalanceTotal.employeeid>445241</bb:projectedBalanceTotal.employeeid>
</projectedBalanceTotal>
<projectedBalanceTotal>
<bb:projectedBalanceTotal.principalId>4545645878/bb:projectedBalanceTotal.principalId>
<bb:projectedBalanceTotal.planCodeId>VA</bb:projectedBalanceTotal.planCodeId>
<bb:projectedBalanceTotal.leaveCodeId>VA</bb:projectedBalanceTotal.leaveCodeId>
<bb:projected_balance_accrual_amount_for_the_pay_period>0</bb:projected_balance_accrual_amount_for_the_pay_period>
<bb:projectedBalanceTotal.effectiveDate1>07252012</bb:projectedBalanceTotal.effectiveDate1>
<bb:projectedBalanceTotal.employeeid>445241</bb:projectedBalanceTotal.employeeid>
</projectedBalanceTotal>
<projectedBalanceTotal>
<bb:projectedBalanceTotal.principalId>4545645878/bb:projectedBalanceTotal.principalId>
<bb:projectedBalanceTotal.planCodeId>VA</bb:projectedBalanceTotal.planCodeId>
<bb:projectedBalanceTotal.leaveCodeId>VA</bb:projectedBalanceTotal.leaveCodeId>
<bb:projected_balance_accrual_amount_for_the_pay_period>0</bb:projected_balance_accrual_amount_for_the_pay_period>
<bb:projectedBalanceTotal.effectiveDate1>08082012</bb:projectedBalanceTotal.effectiveDate1>
<bb:projectedBalanceTotal.employeeid>445241</bb:projectedBalanceTotal.employeeid>
</projectedBalanceTotal>
</bb:Report_Data>
注意すべき点がいくつかあります...形式の変更に加えて、要素タグ「All_Eligible_Time_Off_Plans_for_Worker」を完全に削除し、「bb:Report_Entry」を「projectedBalanceTotal」に置き換えています。
「All_Eligible_Time_Off_Plans_for_Worker」を正常に削除し、「bb:Report_Entry」を「projectedBalanceTotal」に置き換えるXSLコードを記述していることを除いて、実質的に開始点はありません。それはここで見つけることができます:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:wd="urn:com.workday.report/CR-INT486-Kuali_Trojan_Time-Absence_Balances__Hospital_Bi-Weekly_-Outbound"
exclude-result-prefixes="wd">
<xsl:output indent="yes"/>
<xsl:strip-space elements="*"/>
<xsl:template match="comment()|processing-instruction()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="*">
<xsl:element name="{local-name()}">
<xsl:apply-templates select="node()|@*"/>
</xsl:element>
</xsl:template>
<xsl:template match="wd:All_Eligible_Time_Off_Plans_for_Worker">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="wd:Report_Data">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
<xsl:template match="wd:Report_Entry">
<projectedleaveBalanceTotal>
<xsl:apply-templates select="node()|@*"/>
</projectedleaveBalanceTotal>
</xsl:template>
</xsl:stylesheet>
どんな助けでも素晴らしいでしょう!よろしくお願いします。