AnsweredAssumed Answered

Exporting xml - child table of a child table

Question asked by rrighini on Jan 3, 2019
Latest reply on Jan 3, 2019 by beverly

Hi

if anyone can help me with my query I would be soooooo grateful.  I need to export data as a DSO result xml.  My structure is below.  I have a number of staff who can have more than one contract and each contract can have more than one additional allowance attached to it.  All tables link by staffrecordID   Using the structure below I cannot get the additional payment information to export within the contract section.  If someone could tell me where I'm going wrong that would be brilliant

 

<SchoolWorkforceMembers>

<xsl:for-each select="fm:FMPDSORESULT/fm:ROW">

<SchoolWorkforceMember>

<StaffDetails>

     <TeacherNumber><xsl:value-of select="./fm:TeacherNumber" /></TeacherNumber>

     <StaffMemberName>

     <PersonFamilyName><xsl:value-of select="./fm:SecondName" /></PersonFamilyName>

     <GivenNames>

          <GivenName>

               <PersonGivenName><xsl:value-of select="./fm:FirstName" /></PersonGivenName>

          </GivenName>

     </GivenNames>

    </StaffMemberName>

     <FormerFamilyNames>

     <PersonFamilyName><xsl:value-of select="./fm:FormerSurname" /></PersonFamilyName>

     </FormerFamilyNames>

     <NINumber><xsl:value-of select="./fm:NInumber" /></NINumber>

     <GenderCurrent><xsl:value-of select="./fm:GenderCensusCode" /></GenderCurrent>

     <PersonBirthDate><xsl:value-of select="./fm:DOB" /></PersonBirthDate>

     <Ethnicity><xsl:value-of select="./fm:EthnicityCode" /></Ethnicity>

     <Disability><xsl:value-of select="./fm:DisabilityCode" /></Disability>

     <QTS><xsl:value-of select="./fm:QTS" /></QTS>

     <QTLS><xsl:value-of select="./fm:QTLS" /></QTLS>

     <EYTS><xsl:value-of select="./fm:EYTS" /></EYTS>

     <HLTAStatus><xsl:value-of select="./fm:HLTAstatus" /></HLTAStatus>

     <QTSRoute><xsl:value-of select="./fm:QTSrouteCode" /></QTSRoute>

     </StaffDetails>

 

<ContractOrServiceGroup>

     <ContractOrService>

     <xsl:for-each select="fm:PayrollNo/fm:DATA">

      <xsl:variable name="pos" select="position()"/>

<ContractType><xsl:value-of select="../../fm:ContractTypeCode/fm:DATA[$pos]" /></ContractType>

<ContractStart><xsl:value-of select="../../fm:ContractStart/fm:DATA[$pos]" /></ContractStart>

<ContractEnd><xsl:value-of select="../../fm:ContractEnd/fm:DATA[$pos]" /></ContractEnd>

<Post><xsl:value-of select="../../fm:ContractPostCode/fm:DATA[$pos]" /></Post>

<SchoolArrivalDate><xsl:value-of select="../../fm:OrganisationArrivalDate/fm:DATA[$pos]" /></SchoolArrivalDate>

<DailyRate><xsl:value-of select="../../fm:DailyRate/fm:DATA[$pos]" /></DailyRate>

<DestinationCode><xsl:value-of select="../../fm:DestinationCode/fm:DATA[$pos]" /></DestinationCode>

<Origin><xsl:value-of select="../../fm:OriginCode/fm:DATA[$pos]" /></Origin>

<PayReviewDate><xsl:value-of select="../../fm:PayReviewDate/fm:DATA[$pos]" /></PayReviewDate>

<LASchoolLevel><xsl:value-of select="../../fm:LASchoolLevel/fm:DATA[$pos]" /></LASchoolLevel>

 

<PostLevelDetails>

<Payments>

<PayRange><xsl:value-of select="../../fm:PayRangeCode/fm:DATA[$pos]" /></PayRange>

<PayFramework><xsl:value-of select="../../fm:LeadershipPayFramework/fm:DATA[$pos]" /></PayFramework>

<PayRangeMinimum><xsl:value-of select="../../fm:LeadershipPayRangeMinimum/fm:DATA[$pos]" /></PayRangeMinimum>

<PayRangeMaximum><xsl:value-of select="../../fm:LeadershipPayRangeMaximum/fm:DATA[$pos]" /></PayRangeMaximum>

<BasePay><xsl:value-of select="../../fm:BasePaySWC/fm:DATA[$pos]" /></BasePay>

<SafeguardedSalary><xsl:value-of select="../../fm:SafeguardedSalary/fm:DATA[$pos]" /></SafeguardedSalary>

</Payments>

 

<AdditionalPayments>

<AdditionalPayment>

<PaymentType><xsl:value-of select="../../fm:AdditionalPaymentTypeDescription/fm:DATA[$pos]" /></PaymentType>

<PaymentAmount><xsl:value-of select="../../fm:AdditionalPaymentAmount/fm:DATA[$pos]" /></PaymentAmount>

<PayStartDate><xsl:value-of select="../../fm:AdditionalPaymentStartDate/fm:DATA[$pos]" /></PayStartDate>

<PayEndDate><xsl:value-of select="../../fm:AdditionalPaymentEndDate/fm:DATA[$pos]" /></PayEndDate>

</AdditionalPayment>

</AdditionalPayments>

 

<Hours>

<HoursPerWeek><xsl:value-of select="../../fm:SWCHoursWorkedPerWeek/fm:DATA[$pos]" /></HoursPerWeek>

<FTEHours><xsl:value-of select="../../fm:SWCFTHoursPerWeek/fm:DATA[$pos]" /></FTEHours>

<WeeksPerYear><xsl:value-of select="../../fm:SWCweeksWorkedPerYear/fm:DATA[$pos]" /></WeeksPerYear>

</Hours>

</PostLevelDetails>

</xsl:for-each>

</ContractOrService>

</ContractOrServiceGroup>

</SchoolWorkforceMember>

</xsl:for-each>

</SchoolWorkforceMembers>

Outcomes