Edit HTML stylesheet to only display certain items

Hi guys,

Ive automated a web application using a tool called QTP. This tool provides results of a test run to the screen after a particular run. You can then export these results to a word doc or html format. My problem is that the stylesheet which it uses to export the results includes way too much information. Currently when i export to html format, the results include passed steps, warnings and other such information that i dont particularly need in my report.
I would like to just report solely on the failures of my scripts run. Therefore once my script finishes execution, i would have a list of failures only....not a list of passes, warnings, failures, which application objects were used, etc, etc.
Ive provided the stylesheet which im using....can someone please show me how i might be able to edit it so that it just includes the Failures when i export the results to html format?

Thanks
current-xsl-stylesheet.txt
DiCanio13Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Geert BormansInformation ArchitectCommented:
Can you please also pass us an XML example.
It is not clear from your question what you need
0
DiCanio13Author Commented:
Hi Gertone,

I can only give you a screenshot of the xml output and also the standard report that is generated from the current stylesheet. Hopefully this will be enough information for you?
What i would like is to be able to edit the current stylesheet so that when i export the standard results to a word doc, only the "fails" will be included in the doc and not all the other status checks such as passed, warnings and done.

Im assuming this code in the stylesheet might need to be edited?

<td class="table_cell" > <!-- Status column -->
<xsl:choose>
<xsl:when test="NodeArgs[@status='Failed']">
    <span class = "Failed"><xsl:copy-of select="$IDS_FAILED"/></span></xsl:when>
<xsl:when test="NodeArgs[@status='Warning']">
    <span class = "Warning"><xsl:copy-of select="$IDS_WARNING"/></span></xsl:when>      
<xsl:when test="NodeArgs[@status='Passed']">
    <span class = "Passed"><xsl:copy-of select="$IDS_PASSED"/></span></xsl:when>
<xsl:otherwise>
     <span class = "Done"><xsl:copy-of select="$IDS_DONE"/></span></xsl:otherwise>      
</xsl:choose>
</td>
QuickTest-Professional-Report.doc
QTP-results-screenshot.doc
0
Geert BormansInformation ArchitectCommented:
well, this is very difficult without the source information, try this instead
<td class="table_cell" > <!-- Status column -->
<xsl:choose>
<xsl:when test="NodeArgs[@status='Failed']">
    <span class = "Failed"><xsl:copy-of select="$IDS_FAILED"/></span></xsl:when>
<xsl:when test="NodeArgs[@status='Warning']"></xsl:when>      
<xsl:when test="NodeArgs[@status='Passed']"></xsl:when>
<xsl:otherwise></xsl:otherwise>      
</xsl:choose>
</td>

Open in new window

0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

Geert BormansInformation ArchitectCommented:
I am afraid that that is only deleting the titles.
I am afraid I can't help you without at least some view on the original XML
(you can get the original XML by replacing the stylesheet with an identity copy by the way, if this running in a bigger system)
0
DiCanio13Author Commented:
Hi Gertone,

From looking at the stylesheet, i think ive found where the solution to this might be -

<xsl:choose>
       <xsl:when test="child::*[position() = 2 and name() = 'Step']" >
             <tr>
                      <td class="table_hl" width="20%"><xsl:copy-of select="$IDS_NAME"/></td>
      <td class="table_hl" width="10%"><xsl:copy-of select="$IDS_STATUS"/></td>
      <td class="table_hl" width="10%"><xsl:copy-of select="$IDS_TIME"/></td>
      <td class="table_hl" width="60%"><xsl:copy-of select="$IDS_DETAILS"/></td>
            </tr>      
       </xsl:when>
       <xsl:otherwise>  </xsl:otherwise>
</xsl:choose>

If we were able to constrict the "when" statement to only include objects with a status of 'Failed', then i think it would work. Are you able to help with this?
0
DiCanio13Author Commented:
i was able to attach the xml, does this help you?
Results.txt
0
Geert BormansInformation ArchitectCommented:
0
Geert BormansInformation ArchitectCommented:
well, since points have been reduced by the admin on the follow up question because of the duplicate,
I would like to ask you to "accept" this one rather than just deleting it.
I am still trying to get this years "Points Earned Average", so deleted questions look bad on my statistics :-)

Please note that a lot of effort allready went to this question before you had the necessary info to start the follow up.
(you should not have started a follow up in the first place)
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
DiCanio13Author Commented:
Follow up question, plus this one added up to 500 points
0
Geert BormansInformation ArchitectCommented:
thx
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.