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?

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.

Gertone (Geert Bormans)Information ArchitectCommented:
Can you please also pass us an XML example.
It is not clear from your question what you need
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: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>
     <span class = "Done"><xsl:copy-of select="$IDS_DONE"/></span></xsl:otherwise>      
Gertone (Geert Bormans)Information ArchitectCommented:
well, this is very difficult without the source information, try this instead
<td class="table_cell" > <!-- Status column -->
<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>

Open in new window

Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Gertone (Geert Bormans)Information 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)
DiCanio13Author Commented:
Hi Gertone,

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

       <xsl:when test="child::*[position() = 2 and name() = 'Step']" >
                      <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>
       <xsl:otherwise>  </xsl:otherwise>

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?
DiCanio13Author Commented:
i was able to attach the xml, does this help you?
Gertone (Geert Bormans)Information ArchitectCommented:
Gertone (Geert Bormans)Information 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)

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
Gertone (Geert Bormans)Information ArchitectCommented:
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.