Conclusion xsl in the table



  • Question xsl Objective: To set staff leave schedule as table: In line, a staff member is 48 pillars for the quarters of the month. The request forms a xml in which a list of the quarters of the month on which the leave is scheduled for each staff member. We need to get this xml out. The challenge is not exactly my profile, so the instrument is superficial. Problem is: The table is as follows:

        <TR>
            <TD class = "Title">ФИО</TD>
            <xsl:for-each select = "VOCATIONS_LIST/WEEEK_LIST/WEEK">
                <TD><xsl:value-of select=" /users/3123/idanil "/></TD>
            </xsl:for-each>
        </TR>
    

    Next, I want the staff cycle to release the leave information, but since for each staff member, the blocks will be limited to how to fill the entire line with 48 weeks? I don't want every staff member to build a list of 48 elements and to notice the ones he had on his vacation.



  • That's what I thought, if anyone's interested. There's still some redundancy. Not intended for be optimal and correct.

    <TABLE style = "border-width:1px;border-style:solid;border-color:black;">
        <TR>
            <TD class = "Title">ФИО</TD>
            <xsl:for-each select = "VOCATIONS_LIST/WEEEK_LIST/WEEK">
                <TD class="Weeks"><xsl:value-of select=" /users/3123/idanil "/></TD>
            </xsl:for-each>
        </TR>
        <xsl:for-each select = "VOCATIONS_LIST/STAFF_LIST/STAFF">
            <TR>
                <TD><xsl:value-of select="PEOPLE_NAME"/></TD>
                <xsl:variable name="StaffID" select=" /users/3123/idanil " />  
                <xsl:for-each select = "../../WEEEK_LIST/WEEK">
                    <xsl:variable name="WeekID" select=" /users/3123/idanil " />     
                    <TD>
                        <xsl:if test="../../STAFF_LIST/STAFF/PLAN_VOCATION_LIST/WEEK[ /users/3123/idanil =$WeekID][@STAFF_ID=$StaffID]">
                            <xsl:attribute name="bgcolor">black</xsl:attribute>
                        </xsl:if>
                        <xsl:if test="../../STAFF_LIST/STAFF/VOCATION_LIST/WEEK[ /users/3123/idanil =$WeekID][@STAFF_ID=$StaffID]">
                            <font style="font-family:Wingdings 3;color:red">&#136;</font>
                        </xsl:if>&#160;
                    </TD>
                </xsl:for-each>
            </TR>
        </xsl:for-each>
    </TABLE>
    

Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2