XSLT 1.0样式表正在复制输出

时间:2017-01-16 17:21:25

标签: xml xslt xslt-1.0 muenchian-grouping

我几天前问了一个问题,这个问题得到了很好的回答,但却忘记了在选定的解决方案中引入一个关键要求。问题可以在这里找到:

Change output based on value in xsl:key in XSLT 1.0

新输入XML:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<EligibilityRecords xmlns="http://Eligibility_LSDD">
  <Eligibility_Detail_Record xmlns="">
    <PT_PARTICIPANT_FILE_IMP_ID></PT_PARTICIPANT_FILE_IMP_ID>
    <PT_PARTICIPANT_STATUS>Active</PT_PARTICIPANT_STATUS>
    <PT_LST_NM>VALLE</PT_LST_NM>
    <PT_FRST_NM>FRANKIE</PT_FRST_NM>
    <EN_PLAN_NAME>Health Reimbursement Arrangement</EN_PLAN_NAME>
    <EN_MBRSHP_EFF_STRT_DT>01012017</EN_MBRSHP_EFF_STRT_DT>
    <EN_MBRSHP_EFF_END_DT></EN_MBRSHP_EFF_END_DT>
    <EN_PLAN_YEAR_STRT_DT>01012017</EN_PLAN_YEAR_STRT_DT>
    <DP_PARTICIPANT_FILE_IMP_ID></DP_PARTICIPANT_FILE_IMP_ID>
    <DP_DEPENDENT_FILE_IMP_ID></DP_DEPENDENT_FILE_IMP_ID>
    <DP_RELATIONSHIP></DP_RELATIONSHIP>
  </Eligibility_Detail_Record>
  <Eligibility_Detail_Record xmlns="">
    <PT_PARTICIPANT_FILE_IMP_ID>123456</PT_PARTICIPANT_FILE_IMP_ID>
    <PT_PARTICIPANT_STATUS>Active</PT_PARTICIPANT_STATUS>
    <PT_LST_NM>BULLOCK</PT_LST_NM>
    <PT_FRST_NM>SANDRA</PT_FRST_NM>
    <EN_PLAN_NAME></EN_PLAN_NAME>
    <EN_MBRSHP_EFF_STRT_DT>01012017</EN_MBRSHP_EFF_STRT_DT>
    <EN_MBRSHP_EFF_END_DT></EN_MBRSHP_EFF_END_DT>
    <EN_PLAN_YEAR_STRT_DT>01012017</EN_PLAN_YEAR_STRT_DT>
    <DP_PARTICIPANT_FILE_IMP_ID></DP_PARTICIPANT_FILE_IMP_ID>
    <DP_DEPENDENT_FILE_IMP_ID></DP_DEPENDENT_FILE_IMP_ID>
    <DP_RELATIONSHIP></DP_RELATIONSHIP>
  </Eligibility_Detail_Record>
  <Eligibility_Detail_Record xmlns="">
    <PT_PARTICIPANT_FILE_IMP_ID>553739837</PT_PARTICIPANT_FILE_IMP_ID>
    <PT_PARTICIPANT_STATUS>Retired</PT_PARTICIPANT_STATUS>
    <PT_LST_NM>DOE</PT_LST_NM>
    <PT_FRST_NM>JANE</PT_FRST_NM>
    <EN_PLAN_NAME>Health Reimbursement Arrangement</EN_PLAN_NAME>
    <EN_MBRSHP_EFF_STRT_DT>01012017</EN_MBRSHP_EFF_STRT_DT>
    <EN_MBRSHP_EFF_END_DT></EN_MBRSHP_EFF_END_DT>
    <EN_PLAN_YEAR_STRT_DT>01012017</EN_PLAN_YEAR_STRT_DT>
    <DP_PARTICIPANT_FILE_IMP_ID></DP_PARTICIPANT_FILE_IMP_ID>
    <DP_DEPENDENT_FILE_IMP_ID></DP_DEPENDENT_FILE_IMP_ID>
    <DP_RELATIONSHIP></DP_RELATIONSHIP>
  </Eligibility_Detail_Record>
  <Eligibility_Detail_Record xmlns="">
    <PT_PARTICIPANT_FILE_IMP_ID>610051908</PT_PARTICIPANT_FILE_IMP_ID>
    <PT_PARTICIPANT_STATUS>COB</PT_PARTICIPANT_STATUS>
    <PT_LST_NM>JACKSON</PT_LST_NM>
    <PT_FRST_NM>MICHAEL</PT_FRST_NM>
    <EN_PLAN_NAME>Health Reimbursement Arrangement</EN_PLAN_NAME>
    <EN_MBRSHP_EFF_STRT_DT>01012017</EN_MBRSHP_EFF_STRT_DT>
    <EN_MBRSHP_EFF_END_DT></EN_MBRSHP_EFF_END_DT>
    <EN_PLAN_YEAR_STRT_DT>01012017</EN_PLAN_YEAR_STRT_DT>
    <DP_PARTICIPANT_FILE_IMP_ID>610051908</DP_PARTICIPANT_FILE_IMP_ID>
    <DP_DEPENDENT_FILE_IMP_ID>NC110015202761</DP_DEPENDENT_FILE_IMP_ID>
    <DP_RELATIONSHIP>Spouse</DP_RELATIONSHIP>
    <DP_LST_NM>JACKSON</DP_LST_NM>
    <DP_FRST_NM>MELISSA</DP_FRST_NM>
  </Eligibility_Detail_Record>
  <Eligibility_Detail_Record xmlns="">
    <PT_PARTICIPANT_FILE_IMP_ID>561859010</PT_PARTICIPANT_FILE_IMP_ID>
    <PT_PARTICIPANT_STATUS>Terminated</PT_PARTICIPANT_STATUS>
    <PT_LST_NM>MCLEOD</PT_LST_NM>
    <PT_FRST_NM>CONOR</PT_FRST_NM>
    <EN_PLAN_NAME>Health Reimbursement Arrangement</EN_PLAN_NAME>
    <EN_MBRSHP_EFF_STRT_DT>01012016</EN_MBRSHP_EFF_STRT_DT>
    <EN_MBRSHP_EFF_END_DT></EN_MBRSHP_EFF_END_DT>
    <EN_PLAN_YEAR_STRT_DT>01012016</EN_PLAN_YEAR_STRT_DT>
    <DP_PARTICIPANT_FILE_IMP_ID>561859010</DP_PARTICIPANT_FILE_IMP_ID>
    <DP_DEPENDENT_FILE_IMP_ID>SC000018241906</DP_DEPENDENT_FILE_IMP_ID>
    <DP_RELATIONSHIP>Dependent</DP_RELATIONSHIP>
    <DP_LST_NM>MCLEOD</DP_LST_NM>
    <DP_FRST_NM>DUNCAN</DP_FRST_NM>
  </Eligibility_Detail_Record>
  <Eligibility_Detail_Record xmlns="">
    <PT_PARTICIPANT_FILE_IMP_ID>573794953</PT_PARTICIPANT_FILE_IMP_ID>
    <PT_PARTICIPANT_STATUS>Active</PT_PARTICIPANT_STATUS>
    <PT_LST_NM>GABRIEL</PT_LST_NM>
    <PT_FRST_NM>PETER</PT_FRST_NM>
    <EN_PLAN_NAME>Health Reimbursement Arrangement</EN_PLAN_NAME>
    <EN_MBRSHP_EFF_STRT_DT>01012016</EN_MBRSHP_EFF_STRT_DT>
    <EN_MBRSHP_EFF_END_DT></EN_MBRSHP_EFF_END_DT>
    <EN_PLAN_YEAR_STRT_DT>01012016</EN_PLAN_YEAR_STRT_DT>
    <DP_PARTICIPANT_FILE_IMP_ID></DP_PARTICIPANT_FILE_IMP_ID>
    <DP_DEPENDENT_FILE_IMP_ID></DP_DEPENDENT_FILE_IMP_ID>
    <DP_RELATIONSHIP></DP_RELATIONSHIP>
  </Eligibility_Detail_Record>
  <Eligibility_Detail_Record xmlns="">
    <PT_PARTICIPANT_FILE_IMP_ID>553739837</PT_PARTICIPANT_FILE_IMP_ID>
    <PT_PARTICIPANT_STATUS>Retired</PT_PARTICIPANT_STATUS>
    <PT_LST_NM>DOE</PT_LST_NM>
    <PT_FRST_NM>JANE</PT_FRST_NM>
    <EN_PLAN_NAME>Health Reimbursement Arrangement</EN_PLAN_NAME>
    <EN_MBRSHP_EFF_STRT_DT>01012016</EN_MBRSHP_EFF_STRT_DT>
    <EN_MBRSHP_EFF_END_DT></EN_MBRSHP_EFF_END_DT>
    <EN_PLAN_YEAR_STRT_DT>01012016</EN_PLAN_YEAR_STRT_DT>
    <DP_PARTICIPANT_FILE_IMP_ID>553739837</DP_PARTICIPANT_FILE_IMP_ID>
    <DP_DEPENDENT_FILE_IMP_ID>NC110012077673</DP_DEPENDENT_FILE_IMP_ID>
    <DP_RELATIONSHIP>Spouse</DP_RELATIONSHIP>
    <DP_LST_NM>DOE</DP_LST_NM>
    <DP_FRST_NM>JOHN</DP_FRST_NM>
  </Eligibility_Detail_Record>
  <Eligibility_Detail_Record xmlns="">
    <PT_PARTICIPANT_FILE_IMP_ID>553739837</PT_PARTICIPANT_FILE_IMP_ID>
    <PT_PARTICIPANT_STATUS>Retired</PT_PARTICIPANT_STATUS>
    <PT_LST_NM>DOE</PT_LST_NM>
    <PT_FRST_NM>JANE</PT_FRST_NM>
    <EN_PLAN_NAME>Health Reimbursement Arrangement</EN_PLAN_NAME>
    <EN_MBRSHP_EFF_STRT_DT>01012016</EN_MBRSHP_EFF_STRT_DT>
    <EN_MBRSHP_EFF_END_DT></EN_MBRSHP_EFF_END_DT>
    <EN_PLAN_YEAR_STRT_DT>01012016</EN_PLAN_YEAR_STRT_DT>
    <DP_PARTICIPANT_FILE_IMP_ID>553739837</DP_PARTICIPANT_FILE_IMP_ID>
    <DP_DEPENDENT_FILE_IMP_ID>NC110012077680</DP_DEPENDENT_FILE_IMP_ID>
    <DP_RELATIONSHIP>Dependent</DP_RELATIONSHIP>
    <DP_LST_NM>DOE</DP_LST_NM>
    <DP_FRST_NM>JIMMY</DP_FRST_NM>
  </Eligibility_Detail_Record>
  <Eligibility_Detail_Record xmlns="">
    <PT_PARTICIPANT_FILE_IMP_ID>553739837</PT_PARTICIPANT_FILE_IMP_ID>
    <PT_PARTICIPANT_STATUS>Retired</PT_PARTICIPANT_STATUS>
    <PT_LST_NM>DOE</PT_LST_NM>
    <PT_FRST_NM>JANE</PT_FRST_NM>
    <EN_PLAN_NAME>Health Reimbursement Arrangement</EN_PLAN_NAME>
    <EN_MBRSHP_EFF_STRT_DT>01012016</EN_MBRSHP_EFF_STRT_DT>
    <EN_MBRSHP_EFF_END_DT></EN_MBRSHP_EFF_END_DT>
    <EN_PLAN_YEAR_STRT_DT>01012016</EN_PLAN_YEAR_STRT_DT>
    <DP_PARTICIPANT_FILE_IMP_ID>553739837</DP_PARTICIPANT_FILE_IMP_ID>
    <DP_DEPENDENT_FILE_IMP_ID>NC110012077681</DP_DEPENDENT_FILE_IMP_ID>
    <DP_RELATIONSHIP>Dependent</DP_RELATIONSHIP>
    <DP_LST_NM>DOE</DP_LST_NM>
    <DP_FRST_NM>JESSICA</DP_FRST_NM>
  </Eligibility_Detail_Record>
  <Eligibility_Detail_Record xmlns="">
    <PT_PARTICIPANT_FILE_IMP_ID>583736677</PT_PARTICIPANT_FILE_IMP_ID>
    <PT_PARTICIPANT_STATUS>Active</PT_PARTICIPANT_STATUS>
    <PT_LST_NM>RIBEYE</PT_LST_NM>
    <PT_FRST_NM>COWBOY</PT_FRST_NM>
    <EN_PLAN_NAME>Health Savings Account</EN_PLAN_NAME>
    <EN_MBRSHP_EFF_STRT_DT>01012016</EN_MBRSHP_EFF_STRT_DT>
    <EN_MBRSHP_EFF_END_DT></EN_MBRSHP_EFF_END_DT>
    <EN_PLAN_YEAR_STRT_DT>01012016</EN_PLAN_YEAR_STRT_DT>
    <DP_PARTICIPANT_FILE_IMP_ID>583736677</DP_PARTICIPANT_FILE_IMP_ID>
    <DP_DEPENDENT_FILE_IMP_ID>NC110012077681</DP_DEPENDENT_FILE_IMP_ID>
    <DP_RELATIONSHIP>Dependent</DP_RELATIONSHIP>
    <DP_LST_NM>RIBEYE</DP_LST_NM>
    <DP_FRST_NM>CLASSIC</DP_FRST_NM>
  </Eligibility_Detail_Record>
</EligibilityRecords>

新要求

  • 如果 PT_PARTICIPANT_STATUS 是&#34;退休&#34;或&#34; COB&#34;更改为&#34; Active&#34;

输出XML:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<ns0:EligibilityRecords xmlns="http://Eligibility_LSDD_Internal">
  <Eligibility_Detail_Record xmlns="">
    <PT_PARTICIPANT_FILE_IMP_ID>553739837</PT_PARTICIPANT_FILE_IMP_ID>
    <PT_PARTICIPANT_STATUS>Active</PT_PARTICIPANT_STATUS>
    <PT_LST_NM>DOE</PT_LST_NM>
    <PT_FRST_NM>JANE</PT_FRST_NM>
    <EN_PLAN_NAME>Health Reimbursement Arrangement</EN_PLAN_NAME>
    <EN_PLAN_TYPE>Family</EN_PLAN_TYPE>
    <EN_MBRSHP_EFF_STRT_DT>01012017</EN_MBRSHP_EFF_STRT_DT>
    <EN_MBRSHP_EFF_END_DT></EN_MBRSHP_EFF_END_DT>
    <EN_PLAN_YEAR_STRT_DT>01012017</EN_PLAN_YEAR_STRT_DT>
    <Dependent_Record>
      <DP_PARTICIPANT_FILE_IMP_ID>553739837</DP_PARTICIPANT_FILE_IMP_ID>
      <DP_DEPENDENT_FILE_IMP_ID>NC110012077673</DP_DEPENDENT_FILE_IMP_ID>
      <DP_RELATIONSHIP>Spouse</DP_RELATIONSHIP>
      <DP_LST_NM>DOE</DP_LST_NM>
      <DP_FRST_NM>JOHN</DP_FRST_NM>
    </Dependent_Record>
    <Dependent_Record>
      <DP_PARTICIPANT_FILE_IMP_ID>553739837</DP_PARTICIPANT_FILE_IMP_ID>
      <DP_DEPENDENT_FILE_IMP_ID>NC110012077680</DP_DEPENDENT_FILE_IMP_ID>
      <DP_RELATIONSHIP>Dependent</DP_RELATIONSHIP>
      <DP_LST_NM>DOE</DP_LST_NM>
      <DP_FRST_NM>JIMMY</DP_FRST_NM>
    </Dependent_Record>
    <Dependent_Record>
      <DP_PARTICIPANT_FILE_IMP_ID>553739837</DP_PARTICIPANT_FILE_IMP_ID>
      <DP_DEPENDENT_FILE_IMP_ID>NC110012077681</DP_DEPENDENT_FILE_IMP_ID>
      <DP_RELATIONSHIP>Dependent</DP_RELATIONSHIP>
      <DP_LST_NM>DOE</DP_LST_NM>
      <DP_FRST_NM>JESSICA</DP_FRST_NM>
    </Dependent_Record>
  </Eligibility_Detail_Record>
  <Eligibility_Detail_Record xmlns="">
    <PT_PARTICIPANT_FILE_IMP_ID>610051908</PT_PARTICIPANT_FILE_IMP_ID>
    <PT_PARTICIPANT_STATUS>Active</PT_PARTICIPANT_STATUS>
    <PT_LST_NM>JACKSON</PT_LST_NM>
    <PT_FRST_NM>MICHAEL</PT_FRST_NM>
    <EN_PLAN_NAME>Health Reimbursement Arrangement</EN_PLAN_NAME>
    <EN_PLAN_TYPE>IndSpouse</EN_PLAN_TYPE>
    <EN_MBRSHP_EFF_STRT_DT>01012017</EN_MBRSHP_EFF_STRT_DT>
    <EN_MBRSHP_EFF_END_DT></EN_MBRSHP_EFF_END_DT>
    <EN_PLAN_YEAR_STRT_DT>01012017</EN_PLAN_YEAR_STRT_DT>
    <Dependent_Record>
      <DP_PARTICIPANT_FILE_IMP_ID>610051908</DP_PARTICIPANT_FILE_IMP_ID>
      <DP_DEPENDENT_FILE_IMP_ID>NC110015202761</DP_DEPENDENT_FILE_IMP_ID>
      <DP_RELATIONSHIP>Spouse</DP_RELATIONSHIP>
      <DP_LST_NM>JACKSON</DP_LST_NM>
      <DP_FRST_NM>MELISSA</DP_FRST_NM>
    </Dependent_Record>
  </Eligibility_Detail_Record>
  <Eligibility_Detail_Record xmlns="">
    <PT_PARTICIPANT_FILE_IMP_ID>561859010</PT_PARTICIPANT_FILE_IMP_ID>
    <PT_PARTICIPANT_STATUS>Terminated</PT_PARTICIPANT_STATUS>
    <PT_LST_NM>MCLEOD</PT_LST_NM>
    <PT_FRST_NM>CONOR</PT_FRST_NM>
    <EN_PLAN_NAME>Health Reimbursement Arrangement</EN_PLAN_NAME>
    <EN_PLAN_TYPE>IndChild</EN_PLAN_TYPE>
    <EN_MBRSHP_EFF_STRT_DT>01012016</EN_MBRSHP_EFF_STRT_DT>
    <EN_MBRSHP_EFF_END_DT></EN_MBRSHP_EFF_END_DT>
    <EN_PLAN_YEAR_STRT_DT>01012016</EN_PLAN_YEAR_STRT_DT>
    <Dependent_Record>
      <DP_PARTICIPANT_FILE_IMP_ID>561859010</DP_PARTICIPANT_FILE_IMP_ID>
      <DP_DEPENDENT_FILE_IMP_ID>SC000018241906</DP_DEPENDENT_FILE_IMP_ID>
      <DP_RELATIONSHIP>Dependent</DP_RELATIONSHIP>
      <DP_LST_NM>MCLEOD</DP_LST_NM>
      <DP_FRST_NM>DUNCAN</DP_FRST_NM>
    </Dependent_Record>
  </Eligibility_Detail_Record>
  <Eligibility_Detail_Record xmlns="">
    <PT_PARTICIPANT_FILE_IMP_ID>573794953</PT_PARTICIPANT_FILE_IMP_ID>
    <PT_PARTICIPANT_STATUS>Active</PT_PARTICIPANT_STATUS>
    <PT_LST_NM>GABRIEL</PT_LST_NM>
    <PT_FRST_NM>PETER</PT_FRST_NM>
    <EN_PLAN_NAME>Health Reimbursement Arrangement</EN_PLAN_NAME>
    <EN_MBRSHP_EFF_STRT_DT>01012016</EN_MBRSHP_EFF_STRT_DT>
    <EN_MBRSHP_EFF_END_DT></EN_MBRSHP_EFF_END_DT>
    <EN_PLAN_YEAR_STRT_DT>01012016</EN_PLAN_YEAR_STRT_DT>
    <EN_PLAN_TYPE>Ind</EN_PLAN_TYPE>
  </Eligibility_Detail_Record>
  <Eligibility_Detail_Record xmlns="">
    <PT_PARTICIPANT_FILE_IMP_ID>583736677</PT_PARTICIPANT_FILE_IMP_ID>
    <PT_PARTICIPANT_STATUS>Active</PT_PARTICIPANT_STATUS>
    <PT_LST_NM>RIBEYE</PT_LST_NM>
    <PT_FRST_NM>COWBOY</PT_FRST_NM>
    <EN_PLAN_NAME>Health Savings Account</EN_PLAN_NAME>
    <EN_HDHP_COVERAGE_LEVEL>Family</EN_HDHP_COVERAGE_LEVEL>
    <EN_MBRSHP_EFF_STRT_DT>01012016</EN_MBRSHP_EFF_STRT_DT>
    <EN_MBRSHP_EFF_END_DT></EN_MBRSHP_EFF_END_DT>
    <EN_PLAN_YEAR_STRT_DT>01012016</EN_PLAN_YEAR_STRT_DT>
    <Dependent_Record>
      <DP_PARTICIPANT_FILE_IMP_ID>583736677</DP_PARTICIPANT_FILE_IMP_ID>
      <DP_DEPENDENT_FILE_IMP_ID>NC110012077681</DP_DEPENDENT_FILE_IMP_ID>
      <DP_RELATIONSHIP>Dependent</DP_RELATIONSHIP>
      <DP_LST_NM>RIBEYE</DP_LST_NM>
      <DP_FRST_NM>CLASSIC</DP_FRST_NM>
    </Dependent_Record>
  </Eligibility_Detail_Record>
</ns0:EligibilityRecords>

上面链接中找到的原始答案使用了 xsl:copy-of 来复制名称以特定字符串开头的所有节点,因为没有逻辑需要在这些字符串上运行节点集。由于 PT_PARTICIPANT_STATUS 发生在其中一组节点的中间,因此不再有效。

我修改了XSLT以使用 xsl:template 方法代替所有原始逻辑,新逻辑使用了一个警告。 Eligibility_Detail_Record 节点被多次复制。

XSLT:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:var="http://schemas.microsoft.com/BizTalk/2003/var" exclude-result-prefixes="msxsl var s0 ns0" version="1.0" xmlns:s0="http://Eligibility_LSDD" xmlns:ns0="http://Eligibility_LSDD_Internal">
  <xsl:output omit-xml-declaration="yes" method="xml" version="1.0" />
  <xsl:key name="participants" match="Eligibility_Detail_Record" use="PT_PARTICIPANT_FILE_IMP_ID"/>
  <xsl:template match="@*|node()">
    <xsl:copy>
      <xsl:apply-templates select="@*|node()"/>
    </xsl:copy>
  </xsl:template>
  <xsl:template match="EligibilityRecords">
    <ns0:EligibilityRecords>
      <xsl:apply-templates select="Eligibility_Detail_Record"/>
    </ns0:EligibilityRecords>
  </xsl:template>
  <xsl:template match="Eligibility_Detail_Record">
    <!--Strip all Eligibility_Detail_Records that have a blank PT_PARTICIPANT_FILE_IMP_ID AND The EN_PLAN_NAME node is not "Health Reimbursement Arrangement" or "Health Savings Account"-->
    <xsl:for-each select="../Eligibility_Detail_Record[string(PT_PARTICIPANT_FILE_IMP_ID) and (EN_PLAN_NAME='Health Reimbursement Arrangement' or EN_PLAN_NAME='Health Savings Account')]
      [count(.|key('participants',PT_PARTICIPANT_FILE_IMP_ID)[1])=1]">
      <xsl:variable name="participantCount" select="count(key('participants',PT_PARTICIPANT_FILE_IMP_ID))"/>
      <Eligibility_Detail_Record>
        <xsl:variable name="participantStatus" select="PT_PARTICIPANT_STS"/>
        <xsl:apply-templates select="@*|node()|PT_PARTICIPANT_STS|EN_PLAN_NAME">
          <xsl:with-param name="participantStatus" select="$participantStatus"/>
          <xsl:with-param name="participantCount" select="$participantCount"/>
        </xsl:apply-templates>
        <!--Create a new Dependent_Record that is a child record of Eligibility_Detail_Record for each DP_PARTICIPANT_FILE_IMP_ID that matches a PT_PARTICIPANT_FILE_IMP_ID-->
        <xsl:for-each select="key('participants',PT_PARTICIPANT_FILE_IMP_ID)[string(DP_PARTICIPANT_FILE_IMP_ID)]">
          <Dependent_Detail_Record>
            <xsl:copy-of select="*[starts-with(name(),'DP_')]"/>
            <xsl:copy-of select="PT_EMPLOYER_CD"/>
          </Dependent_Detail_Record>
        </xsl:for-each>
      </Eligibility_Detail_Record>
      <!--</xsl:if>-->
    </xsl:for-each>
  </xsl:template>

  <xsl:template match="PT_PARTICIPANT_STS">
    <xsl:param name="participantStatus"/>
    <PT_PARTICIPANT_STS>
      <xsl:choose>
        <xsl:when test="$participantStatus = 'Retired' or $participantStatus = 'COB'">Active</xsl:when>
        <xsl:otherwise>
          <xsl:value-of select="$participantStatus"/>
        </xsl:otherwise>
      </xsl:choose>
    </PT_PARTICIPANT_STS>
  </xsl:template>

  <xsl:template match="EN_PLAN_NAME">
    <xsl:param name="participantCount"/>
    <xsl:copy-of select="self::EN_PLAN_NAME"/>
    <xsl:choose>
      <!--Add an EN_PLAN_TYPE field for each Record that has an EN_PLAN_NAME of "Health Reimbursement Arrangement" that reads:-->
      <xsl:when test="self::EN_PLAN_NAME='Health Reimbursement Arrangement'">
        <xsl:call-template name="HRA">
          <xsl:with-param name="participantCount" select="$participantCount"/>
        </xsl:call-template>
      </xsl:when>
      <!--Add an EN_HDHP_COVERAGE_LEVEL field for each Record that has en EN_PLAN_NAME of "Health Savings Account" that reads:-->
      <xsl:when test="self::EN_PLAN_NAME='Health Savings Account'">
        <xsl:call-template name="HSA">
          <xsl:with-param name="participantCount" select="$participantCount"/>
        </xsl:call-template>
      </xsl:when>
    </xsl:choose>
  </xsl:template>

  <xsl:template match="*[starts-with(name(),'DP_')]" />

  <xsl:template name="HRA">
    <xsl:param name="participantCount"/>
    <EN_PLAN_TYPE>
      <xsl:choose>
        <xsl:when test="$participantCount > 1">Family</xsl:when>
        <xsl:when test="$participantCount = 1 and ../DP_RELATIONSHIP = 'Dependent'">IndChild</xsl:when>
        <xsl:when test="$participantCount = 1 and ../DP_RELATIONSHIP = 'Spouse'">IndSpouse</xsl:when>
        <xsl:when test="$participantCount = 1">Ind</xsl:when>
      </xsl:choose>
    </EN_PLAN_TYPE>
  </xsl:template>

  <xsl:template name="HSA">
    <xsl:param name="participantCount"/>
    <EN_HDHP_COVERAGE_LEVEL>
      <xsl:choose>
        <xsl:when test="$participantCount > 1 or
          $participantCount = 1 and string(../DP_RELATIONSHIP)">Family</xsl:when>
        <xsl:when test="$participantCount = 1">Single</xsl:when>
      </xsl:choose>
    </EN_HDHP_COVERAGE_LEVEL>
  </xsl:template>

</xsl:stylesheet>

1 个答案:

答案 0 :(得分:0)

在原始答案中,您应该可以更改:

<xsl:copy-of select="*[starts-with(name(),'PT_')]|EN_PLAN_NAME"/>

为:

<xsl:apply-templates select="*[starts-with(name(),'PT_')]|EN_PLAN_NAME"/>

添加identity transform按原样复制所有内容:

<xsl:template match="@*|node()">
  <xsl:copy>
    <xsl:apply-templates select="@*|node()"/>
  </xsl:copy>
</xsl:template>

并覆盖PT_PARTICIPANT_STATUS的身份转换:

<xsl:template match="PT_PARTICIPANT_STATUS[.='Retired' or .='COB']">
  <xsl:copy>
    <xsl:text>Active</xsl:text>
  </xsl:copy>
</xsl:template>

完整示例......

XML输入

<EligibilityRecords xmlns="http://Eligibility_LSDD">
    <Eligibility_Detail_Record xmlns="">
        <PT_PARTICIPANT_FILE_IMP_ID></PT_PARTICIPANT_FILE_IMP_ID>
        <PT_PARTICIPANT_STATUS>Active</PT_PARTICIPANT_STATUS>
        <PT_LST_NM>VALLE</PT_LST_NM>
        <PT_FRST_NM>FRANKIE</PT_FRST_NM>
        <EN_PLAN_NAME>Health Reimbursement Arrangement</EN_PLAN_NAME>
        <EN_MBRSHP_EFF_STRT_DT>01012017</EN_MBRSHP_EFF_STRT_DT>
        <EN_MBRSHP_EFF_END_DT></EN_MBRSHP_EFF_END_DT>
        <EN_PLAN_YEAR_STRT_DT>01012017</EN_PLAN_YEAR_STRT_DT>
        <DP_PARTICIPANT_FILE_IMP_ID></DP_PARTICIPANT_FILE_IMP_ID>
        <DP_DEPENDENT_FILE_IMP_ID></DP_DEPENDENT_FILE_IMP_ID>
        <DP_RELATIONSHIP></DP_RELATIONSHIP>
    </Eligibility_Detail_Record>
    <Eligibility_Detail_Record xmlns="">
        <PT_PARTICIPANT_FILE_IMP_ID>123456</PT_PARTICIPANT_FILE_IMP_ID>
        <PT_PARTICIPANT_STATUS>Active</PT_PARTICIPANT_STATUS>
        <PT_LST_NM>BULLOCK</PT_LST_NM>
        <PT_FRST_NM>SANDRA</PT_FRST_NM>
        <EN_PLAN_NAME></EN_PLAN_NAME>
        <EN_MBRSHP_EFF_STRT_DT>01012017</EN_MBRSHP_EFF_STRT_DT>
        <EN_MBRSHP_EFF_END_DT></EN_MBRSHP_EFF_END_DT>
        <EN_PLAN_YEAR_STRT_DT>01012017</EN_PLAN_YEAR_STRT_DT>
        <DP_PARTICIPANT_FILE_IMP_ID></DP_PARTICIPANT_FILE_IMP_ID>
        <DP_DEPENDENT_FILE_IMP_ID></DP_DEPENDENT_FILE_IMP_ID>
        <DP_RELATIONSHIP></DP_RELATIONSHIP>
    </Eligibility_Detail_Record>
    <Eligibility_Detail_Record xmlns="">
        <PT_PARTICIPANT_FILE_IMP_ID>553739837</PT_PARTICIPANT_FILE_IMP_ID>
        <PT_PARTICIPANT_STATUS>Retired</PT_PARTICIPANT_STATUS>
        <PT_LST_NM>DOE</PT_LST_NM>
        <PT_FRST_NM>JANE</PT_FRST_NM>
        <EN_PLAN_NAME>Health Reimbursement Arrangement</EN_PLAN_NAME>
        <EN_MBRSHP_EFF_STRT_DT>01012017</EN_MBRSHP_EFF_STRT_DT>
        <EN_MBRSHP_EFF_END_DT></EN_MBRSHP_EFF_END_DT>
        <EN_PLAN_YEAR_STRT_DT>01012017</EN_PLAN_YEAR_STRT_DT>
        <DP_PARTICIPANT_FILE_IMP_ID></DP_PARTICIPANT_FILE_IMP_ID>
        <DP_DEPENDENT_FILE_IMP_ID></DP_DEPENDENT_FILE_IMP_ID>
        <DP_RELATIONSHIP></DP_RELATIONSHIP>
    </Eligibility_Detail_Record>
    <Eligibility_Detail_Record xmlns="">
        <PT_PARTICIPANT_FILE_IMP_ID>610051908</PT_PARTICIPANT_FILE_IMP_ID>
        <PT_PARTICIPANT_STATUS>COB</PT_PARTICIPANT_STATUS>
        <PT_LST_NM>JACKSON</PT_LST_NM>
        <PT_FRST_NM>MICHAEL</PT_FRST_NM>
        <EN_PLAN_NAME>Health Reimbursement Arrangement</EN_PLAN_NAME>
        <EN_MBRSHP_EFF_STRT_DT>01012017</EN_MBRSHP_EFF_STRT_DT>
        <EN_MBRSHP_EFF_END_DT></EN_MBRSHP_EFF_END_DT>
        <EN_PLAN_YEAR_STRT_DT>01012017</EN_PLAN_YEAR_STRT_DT>
        <DP_PARTICIPANT_FILE_IMP_ID>610051908</DP_PARTICIPANT_FILE_IMP_ID>
        <DP_DEPENDENT_FILE_IMP_ID>NC110015202761</DP_DEPENDENT_FILE_IMP_ID>
        <DP_RELATIONSHIP>Spouse</DP_RELATIONSHIP>
        <DP_LST_NM>JACKSON</DP_LST_NM>
        <DP_FRST_NM>MELISSA</DP_FRST_NM>
    </Eligibility_Detail_Record>
    <Eligibility_Detail_Record xmlns="">
        <PT_PARTICIPANT_FILE_IMP_ID>561859010</PT_PARTICIPANT_FILE_IMP_ID>
        <PT_PARTICIPANT_STATUS>Terminated</PT_PARTICIPANT_STATUS>
        <PT_LST_NM>MCLEOD</PT_LST_NM>
        <PT_FRST_NM>CONOR</PT_FRST_NM>
        <EN_PLAN_NAME>Health Reimbursement Arrangement</EN_PLAN_NAME>
        <EN_MBRSHP_EFF_STRT_DT>01012016</EN_MBRSHP_EFF_STRT_DT>
        <EN_MBRSHP_EFF_END_DT></EN_MBRSHP_EFF_END_DT>
        <EN_PLAN_YEAR_STRT_DT>01012016</EN_PLAN_YEAR_STRT_DT>
        <DP_PARTICIPANT_FILE_IMP_ID>561859010</DP_PARTICIPANT_FILE_IMP_ID>
        <DP_DEPENDENT_FILE_IMP_ID>SC000018241906</DP_DEPENDENT_FILE_IMP_ID>
        <DP_RELATIONSHIP>Dependent</DP_RELATIONSHIP>
        <DP_LST_NM>MCLEOD</DP_LST_NM>
        <DP_FRST_NM>DUNCAN</DP_FRST_NM>
    </Eligibility_Detail_Record>
    <Eligibility_Detail_Record xmlns="">
        <PT_PARTICIPANT_FILE_IMP_ID>573794953</PT_PARTICIPANT_FILE_IMP_ID>
        <PT_PARTICIPANT_STATUS>Active</PT_PARTICIPANT_STATUS>
        <PT_LST_NM>GABRIEL</PT_LST_NM>
        <PT_FRST_NM>PETER</PT_FRST_NM>
        <EN_PLAN_NAME>Health Reimbursement Arrangement</EN_PLAN_NAME>
        <EN_MBRSHP_EFF_STRT_DT>01012016</EN_MBRSHP_EFF_STRT_DT>
        <EN_MBRSHP_EFF_END_DT></EN_MBRSHP_EFF_END_DT>
        <EN_PLAN_YEAR_STRT_DT>01012016</EN_PLAN_YEAR_STRT_DT>
        <DP_PARTICIPANT_FILE_IMP_ID></DP_PARTICIPANT_FILE_IMP_ID>
        <DP_DEPENDENT_FILE_IMP_ID></DP_DEPENDENT_FILE_IMP_ID>
        <DP_RELATIONSHIP></DP_RELATIONSHIP>
    </Eligibility_Detail_Record>
    <Eligibility_Detail_Record xmlns="">
        <PT_PARTICIPANT_FILE_IMP_ID>553739837</PT_PARTICIPANT_FILE_IMP_ID>
        <PT_PARTICIPANT_STATUS>Retired</PT_PARTICIPANT_STATUS>
        <PT_LST_NM>DOE</PT_LST_NM>
        <PT_FRST_NM>JANE</PT_FRST_NM>
        <EN_PLAN_NAME>Health Reimbursement Arrangement</EN_PLAN_NAME>
        <EN_MBRSHP_EFF_STRT_DT>01012016</EN_MBRSHP_EFF_STRT_DT>
        <EN_MBRSHP_EFF_END_DT></EN_MBRSHP_EFF_END_DT>
        <EN_PLAN_YEAR_STRT_DT>01012016</EN_PLAN_YEAR_STRT_DT>
        <DP_PARTICIPANT_FILE_IMP_ID>553739837</DP_PARTICIPANT_FILE_IMP_ID>
        <DP_DEPENDENT_FILE_IMP_ID>NC110012077673</DP_DEPENDENT_FILE_IMP_ID>
        <DP_RELATIONSHIP>Spouse</DP_RELATIONSHIP>
        <DP_LST_NM>DOE</DP_LST_NM>
        <DP_FRST_NM>JOHN</DP_FRST_NM>
    </Eligibility_Detail_Record>
    <Eligibility_Detail_Record xmlns="">
        <PT_PARTICIPANT_FILE_IMP_ID>553739837</PT_PARTICIPANT_FILE_IMP_ID>
        <PT_PARTICIPANT_STATUS>Retired</PT_PARTICIPANT_STATUS>
        <PT_LST_NM>DOE</PT_LST_NM>
        <PT_FRST_NM>JANE</PT_FRST_NM>
        <EN_PLAN_NAME>Health Reimbursement Arrangement</EN_PLAN_NAME>
        <EN_MBRSHP_EFF_STRT_DT>01012016</EN_MBRSHP_EFF_STRT_DT>
        <EN_MBRSHP_EFF_END_DT></EN_MBRSHP_EFF_END_DT>
        <EN_PLAN_YEAR_STRT_DT>01012016</EN_PLAN_YEAR_STRT_DT>
        <DP_PARTICIPANT_FILE_IMP_ID>553739837</DP_PARTICIPANT_FILE_IMP_ID>
        <DP_DEPENDENT_FILE_IMP_ID>NC110012077680</DP_DEPENDENT_FILE_IMP_ID>
        <DP_RELATIONSHIP>Dependent</DP_RELATIONSHIP>
        <DP_LST_NM>DOE</DP_LST_NM>
        <DP_FRST_NM>JIMMY</DP_FRST_NM>
    </Eligibility_Detail_Record>
    <Eligibility_Detail_Record xmlns="">
        <PT_PARTICIPANT_FILE_IMP_ID>553739837</PT_PARTICIPANT_FILE_IMP_ID>
        <PT_PARTICIPANT_STATUS>Retired</PT_PARTICIPANT_STATUS>
        <PT_LST_NM>DOE</PT_LST_NM>
        <PT_FRST_NM>JANE</PT_FRST_NM>
        <EN_PLAN_NAME>Health Reimbursement Arrangement</EN_PLAN_NAME>
        <EN_MBRSHP_EFF_STRT_DT>01012016</EN_MBRSHP_EFF_STRT_DT>
        <EN_MBRSHP_EFF_END_DT></EN_MBRSHP_EFF_END_DT>
        <EN_PLAN_YEAR_STRT_DT>01012016</EN_PLAN_YEAR_STRT_DT>
        <DP_PARTICIPANT_FILE_IMP_ID>553739837</DP_PARTICIPANT_FILE_IMP_ID>
        <DP_DEPENDENT_FILE_IMP_ID>NC110012077681</DP_DEPENDENT_FILE_IMP_ID>
        <DP_RELATIONSHIP>Dependent</DP_RELATIONSHIP>
        <DP_LST_NM>DOE</DP_LST_NM>
        <DP_FRST_NM>JESSICA</DP_FRST_NM>
    </Eligibility_Detail_Record>
    <Eligibility_Detail_Record xmlns="">
        <PT_PARTICIPANT_FILE_IMP_ID>583736677</PT_PARTICIPANT_FILE_IMP_ID>
        <PT_PARTICIPANT_STATUS>Active</PT_PARTICIPANT_STATUS>
        <PT_LST_NM>RIBEYE</PT_LST_NM>
        <PT_FRST_NM>COWBOY</PT_FRST_NM>
        <EN_PLAN_NAME>Health Savings Account</EN_PLAN_NAME>
        <EN_MBRSHP_EFF_STRT_DT>01012016</EN_MBRSHP_EFF_STRT_DT>
        <EN_MBRSHP_EFF_END_DT></EN_MBRSHP_EFF_END_DT>
        <EN_PLAN_YEAR_STRT_DT>01012016</EN_PLAN_YEAR_STRT_DT>
        <DP_PARTICIPANT_FILE_IMP_ID>583736677</DP_PARTICIPANT_FILE_IMP_ID>
        <DP_DEPENDENT_FILE_IMP_ID>NC110012077681</DP_DEPENDENT_FILE_IMP_ID>
        <DP_RELATIONSHIP>Dependent</DP_RELATIONSHIP>
        <DP_LST_NM>RIBEYE</DP_LST_NM>
        <DP_FRST_NM>CLASSIC</DP_FRST_NM>
    </Eligibility_Detail_Record>
</EligibilityRecords>

XSLT 1.0

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

  <xsl:key name="participants" match="Eligibility_Detail_Record" use="PT_PARTICIPANT_FILE_IMP_ID"/>

  <xsl:template match="@*|node()">
    <xsl:copy>
      <xsl:apply-templates select="@*|node()"/>
    </xsl:copy>
  </xsl:template>

  <xsl:template match="/*">
    <xsl:copy>
      <!--Strip all Eligibility_Detail_Records that have a blank PT_PARTICIPANT_FILE_IMP_ID AND The EN_PLAN_NAME node is not "Health Reimbursement Arrangement" or "Health Savings Account"-->
      <xsl:for-each select="Eligibility_Detail_Record[string(PT_PARTICIPANT_FILE_IMP_ID) and (EN_PLAN_NAME='Health Reimbursement Arrangement' or EN_PLAN_NAME='Health Savings Account')]
        [count(.|key('participants',PT_PARTICIPANT_FILE_IMP_ID)[1])=1]">
        <xsl:variable name="participantCount" select="count(key('participants',PT_PARTICIPANT_FILE_IMP_ID))"/>
        <Eligibility_Detail_Record>
          <xsl:apply-templates select="*[starts-with(name(),'PT_')]|EN_PLAN_NAME"/>
          <xsl:choose>
            <!--Add an EN_PLAN_TYPE field for each Record that has an EN_PLAN_NAME of "Health Reimbursement Arrangement" that reads:-->
            <xsl:when test="EN_PLAN_NAME='Health Reimbursement Arrangement'">
              <xsl:call-template name="HRA">
                <xsl:with-param name="participantCount" select="$participantCount"/>
              </xsl:call-template>
            </xsl:when>
            <!--Add an EN_HDHP_COVERAGE_LEVEL field for each Record that has en EN_PLAN_NAME of "Health Savings Account" that reads:-->
            <xsl:when test="EN_PLAN_NAME='Health Savings Account'">
              <xsl:call-template name="HSA">
                <xsl:with-param name="participantCount" select="$participantCount"/>
              </xsl:call-template>
            </xsl:when>
          </xsl:choose>
          <xsl:copy-of select="*[not(self::EN_PLAN_NAME) and starts-with(name(),'EN_')]"/>
          <!--Create a new Dependent_Record that is a child record of Eligibility_Detail_Record for each DP_PARTICIPANT_FILE_IMP_ID that matches a PT_PARTICIPANT_FILE_IMP_ID-->
          <xsl:for-each select="key('participants',PT_PARTICIPANT_FILE_IMP_ID)[string(DP_PARTICIPANT_FILE_IMP_ID)]">
            <Dependent_Record>
              <xsl:copy-of select="*[starts-with(name(),'DP_')]"/>
            </Dependent_Record>
          </xsl:for-each>
        </Eligibility_Detail_Record>
      </xsl:for-each>
    </xsl:copy>
  </xsl:template>

  <xsl:template match="PT_PARTICIPANT_STATUS[.='Retired' or .='COB']">
    <xsl:copy>
      <xsl:text>Active</xsl:text>
    </xsl:copy>
  </xsl:template>

  <xsl:template name="HRA">
    <xsl:param name="participantCount"/>
    <EN_PLAN_TYPE>
      <xsl:choose>
        <!--"Family" if more than one dependent-->
        <xsl:when test="$participantCount > 1">Family</xsl:when>
        <!--"IndChild" if one and only one dependent that has DP_RELATIONSHIP of Dependent-->
        <xsl:when test="$participantCount = 1 and DP_RELATIONSHIP = 'Dependent'">IndChild</xsl:when>
        <!--"IndSpouse" if one and only one dependent that has DP_RELATIONSHIP of Spouse-->
        <xsl:when test="$participantCount = 1 and DP_RELATIONSHIP = 'Spouse'">IndSpouse</xsl:when>
        <!--"Ind" if no dependents are found-->
        <xsl:when test="$participantCount = 1">Ind</xsl:when>
      </xsl:choose>
    </EN_PLAN_TYPE>
  </xsl:template>

  <xsl:template name="HSA">
    <xsl:param name="participantCount"/>
    <EN_HDHP_COVERAGE_LEVEL>
      <xsl:choose>
        <!--"Family" if one or more dependents are found-->
        <xsl:when test="$participantCount > 1 or
          $participantCount = 1 and string(DP_RELATIONSHIP)">Family</xsl:when>
        <!--"Ind" if no dependents are found-->
        <xsl:when test="$participantCount = 1">Ind</xsl:when>
      </xsl:choose>
    </EN_HDHP_COVERAGE_LEVEL>
  </xsl:template>

</xsl:stylesheet>

XML输出

<EligibilityRecords xmlns="http://Eligibility_LSDD">
   <Eligibility_Detail_Record xmlns="">
      <PT_PARTICIPANT_FILE_IMP_ID>553739837</PT_PARTICIPANT_FILE_IMP_ID>
      <PT_PARTICIPANT_STATUS>Active</PT_PARTICIPANT_STATUS>
      <PT_LST_NM>DOE</PT_LST_NM>
      <PT_FRST_NM>JANE</PT_FRST_NM>
      <EN_PLAN_NAME>Health Reimbursement Arrangement</EN_PLAN_NAME>
      <EN_PLAN_TYPE>Family</EN_PLAN_TYPE>
      <EN_MBRSHP_EFF_STRT_DT>01012017</EN_MBRSHP_EFF_STRT_DT>
      <EN_MBRSHP_EFF_END_DT/>
      <EN_PLAN_YEAR_STRT_DT>01012017</EN_PLAN_YEAR_STRT_DT>
      <Dependent_Record>
         <DP_PARTICIPANT_FILE_IMP_ID>553739837</DP_PARTICIPANT_FILE_IMP_ID>
         <DP_DEPENDENT_FILE_IMP_ID>NC110012077673</DP_DEPENDENT_FILE_IMP_ID>
         <DP_RELATIONSHIP>Spouse</DP_RELATIONSHIP>
         <DP_LST_NM>DOE</DP_LST_NM>
         <DP_FRST_NM>JOHN</DP_FRST_NM>
      </Dependent_Record>
      <Dependent_Record>
         <DP_PARTICIPANT_FILE_IMP_ID>553739837</DP_PARTICIPANT_FILE_IMP_ID>
         <DP_DEPENDENT_FILE_IMP_ID>NC110012077680</DP_DEPENDENT_FILE_IMP_ID>
         <DP_RELATIONSHIP>Dependent</DP_RELATIONSHIP>
         <DP_LST_NM>DOE</DP_LST_NM>
         <DP_FRST_NM>JIMMY</DP_FRST_NM>
      </Dependent_Record>
      <Dependent_Record>
         <DP_PARTICIPANT_FILE_IMP_ID>553739837</DP_PARTICIPANT_FILE_IMP_ID>
         <DP_DEPENDENT_FILE_IMP_ID>NC110012077681</DP_DEPENDENT_FILE_IMP_ID>
         <DP_RELATIONSHIP>Dependent</DP_RELATIONSHIP>
         <DP_LST_NM>DOE</DP_LST_NM>
         <DP_FRST_NM>JESSICA</DP_FRST_NM>
      </Dependent_Record>
   </Eligibility_Detail_Record>
   <Eligibility_Detail_Record xmlns="">
      <PT_PARTICIPANT_FILE_IMP_ID>610051908</PT_PARTICIPANT_FILE_IMP_ID>
      <PT_PARTICIPANT_STATUS>Active</PT_PARTICIPANT_STATUS>
      <PT_LST_NM>JACKSON</PT_LST_NM>
      <PT_FRST_NM>MICHAEL</PT_FRST_NM>
      <EN_PLAN_NAME>Health Reimbursement Arrangement</EN_PLAN_NAME>
      <EN_PLAN_TYPE>IndSpouse</EN_PLAN_TYPE>
      <EN_MBRSHP_EFF_STRT_DT>01012017</EN_MBRSHP_EFF_STRT_DT>
      <EN_MBRSHP_EFF_END_DT/>
      <EN_PLAN_YEAR_STRT_DT>01012017</EN_PLAN_YEAR_STRT_DT>
      <Dependent_Record>
         <DP_PARTICIPANT_FILE_IMP_ID>610051908</DP_PARTICIPANT_FILE_IMP_ID>
         <DP_DEPENDENT_FILE_IMP_ID>NC110015202761</DP_DEPENDENT_FILE_IMP_ID>
         <DP_RELATIONSHIP>Spouse</DP_RELATIONSHIP>
         <DP_LST_NM>JACKSON</DP_LST_NM>
         <DP_FRST_NM>MELISSA</DP_FRST_NM>
      </Dependent_Record>
   </Eligibility_Detail_Record>
   <Eligibility_Detail_Record xmlns="">
      <PT_PARTICIPANT_FILE_IMP_ID>561859010</PT_PARTICIPANT_FILE_IMP_ID>
      <PT_PARTICIPANT_STATUS>Terminated</PT_PARTICIPANT_STATUS>
      <PT_LST_NM>MCLEOD</PT_LST_NM>
      <PT_FRST_NM>CONOR</PT_FRST_NM>
      <EN_PLAN_NAME>Health Reimbursement Arrangement</EN_PLAN_NAME>
      <EN_PLAN_TYPE>IndChild</EN_PLAN_TYPE>
      <EN_MBRSHP_EFF_STRT_DT>01012016</EN_MBRSHP_EFF_STRT_DT>
      <EN_MBRSHP_EFF_END_DT/>
      <EN_PLAN_YEAR_STRT_DT>01012016</EN_PLAN_YEAR_STRT_DT>
      <Dependent_Record>
         <DP_PARTICIPANT_FILE_IMP_ID>561859010</DP_PARTICIPANT_FILE_IMP_ID>
         <DP_DEPENDENT_FILE_IMP_ID>SC000018241906</DP_DEPENDENT_FILE_IMP_ID>
         <DP_RELATIONSHIP>Dependent</DP_RELATIONSHIP>
         <DP_LST_NM>MCLEOD</DP_LST_NM>
         <DP_FRST_NM>DUNCAN</DP_FRST_NM>
      </Dependent_Record>
   </Eligibility_Detail_Record>
   <Eligibility_Detail_Record xmlns="">
      <PT_PARTICIPANT_FILE_IMP_ID>573794953</PT_PARTICIPANT_FILE_IMP_ID>
      <PT_PARTICIPANT_STATUS>Active</PT_PARTICIPANT_STATUS>
      <PT_LST_NM>GABRIEL</PT_LST_NM>
      <PT_FRST_NM>PETER</PT_FRST_NM>
      <EN_PLAN_NAME>Health Reimbursement Arrangement</EN_PLAN_NAME>
      <EN_PLAN_TYPE>Ind</EN_PLAN_TYPE>
      <EN_MBRSHP_EFF_STRT_DT>01012016</EN_MBRSHP_EFF_STRT_DT>
      <EN_MBRSHP_EFF_END_DT/>
      <EN_PLAN_YEAR_STRT_DT>01012016</EN_PLAN_YEAR_STRT_DT>
   </Eligibility_Detail_Record>
   <Eligibility_Detail_Record xmlns="">
      <PT_PARTICIPANT_FILE_IMP_ID>583736677</PT_PARTICIPANT_FILE_IMP_ID>
      <PT_PARTICIPANT_STATUS>Active</PT_PARTICIPANT_STATUS>
      <PT_LST_NM>RIBEYE</PT_LST_NM>
      <PT_FRST_NM>COWBOY</PT_FRST_NM>
      <EN_PLAN_NAME>Health Savings Account</EN_PLAN_NAME>
      <EN_HDHP_COVERAGE_LEVEL>Family</EN_HDHP_COVERAGE_LEVEL>
      <EN_MBRSHP_EFF_STRT_DT>01012016</EN_MBRSHP_EFF_STRT_DT>
      <EN_MBRSHP_EFF_END_DT/>
      <EN_PLAN_YEAR_STRT_DT>01012016</EN_PLAN_YEAR_STRT_DT>
      <Dependent_Record>
         <DP_PARTICIPANT_FILE_IMP_ID>583736677</DP_PARTICIPANT_FILE_IMP_ID>
         <DP_DEPENDENT_FILE_IMP_ID>NC110012077681</DP_DEPENDENT_FILE_IMP_ID>
         <DP_RELATIONSHIP>Dependent</DP_RELATIONSHIP>
         <DP_LST_NM>RIBEYE</DP_LST_NM>
         <DP_FRST_NM>CLASSIC</DP_FRST_NM>
      </Dependent_Record>
   </Eligibility_Detail_Record>
</EligibilityRecords>