« Return to Thread: WebTestReport.xsl -- add template to parse out line breaks for step

Re: WebTestReport.xsl -- add template to parse out line breaks for <testInfo> step

by A Vander :: Rate this Message:

Reply to Author | View in Thread

Maybe this will get you started, I just added an apply-templates to reprocess the testInfo step after the standard one so I can catch the info an add something to the report, see the lines with "myTurn".

Piece of WebTestreport.xsl ( I'm using wt 3.0):
...
    <!-- Special representation for the <testInfo .../> steps if any -->
    <xsl:template name="displayTestInfo">
        <xsl:if test=".//step[@taskName = 'testInfo']">
            <div class="testInfo">
                <div class="testInfoTitle">Test info</div>
                <ul class="testInfo">
                <xsl:for-each select=".//step[@taskName = 'testInfo']">
                                        <li>
                                           
                                                <xsl:value-of select="parameter[@name = 'type']/@value"/>
                                                <xsl:text>:&space;</xsl:text>
                                           

                                            <xsl:value-of select="concat(parameter[@name = 'info']/@value, parameter[@name = 'nested text']/@value)"/>
                                        </li>
                </xsl:for-each>
               
                <xsl:apply-templates select=".//step[@taskName = 'testInfo']" mode="myTurn"/>
                </ul>
            </div>
        </xsl:if>
    </xsl:template>
   
    <xsl:template match="step[@taskName = 'testInfo']" mode="myTurn">
        <p>myTurn to say something about testinfo: <xsl:value-of select="parameter[@name = 'type']/@value" /></p>
    </xsl:template>
...

Hope this helps,

Avander

 « Return to Thread: WebTestReport.xsl -- add template to parse out line breaks for step