xsl-list
[Top] [All Lists]

RE: [xsl] Simple XSL styling question

2006-07-07 01:43:15
This is my code but nothing is coming up:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform ">

                <xsl:template match="/">
  <html>
  <body>
    <h2>Results Summary</h2>
                        <xsl:variable name="current"
select="testrun/results/*" /> 
      <xsl:for-each select="test">
                                        <xsl:choose>
                <xsl:when test="current()/@type='failures'">
                <table border="1">
      <tr bgcolor="red">
        <th>Failures</th>
      </tr>
      <tr>
                        <xsl:apply-templates
select="/testrun/results[test = $current/test]" />
        <td><xsl:value-of select="@name"/></td>
      </tr>
    </table>
                        </xsl:when>
                </xsl:choose>
</xsl:for-each>
  </body>
  </html>
</xsl:template>

</xsl:stylesheet> 

-----Original Message-----
From: Michael Kay [mailto:mike(_at_)saxonica(_dot_)com] 
Sent: 06 July 2006 16:30
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] Simple XSL styling question

It's impossible from this description to tell why you are finding this
difficult, and therefore impossible to give you any advice. Don't be
afraid to show your code - it tells us where your difficulties lie.

Michael Kay
http://www.saxonica.com/


-----Original Message-----
From: Mehta, Chirag [mailto:chirag(_dot_)mehta(_at_)bankofamerica(_dot_)com]
Sent: 06 July 2006 14:35
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Simple XSL styling question

Hi guys,
 
I'm having issues doing something very simple using XSL.
 
I have the source XML:
 
<?xml version="1.0" encoding='ISO-8859-1' standalone='yes' ?> 
<?xml-stylesheet type="text/xsl" href="results.xsl"?>
 
<testrun timestamp="07/05/06 14:10:10">
    <results type="failures">
        <test name="TestFuturesScenarioBucketed::testGammaBucketed"
type="text"></test>
    </results>
    <results type="successful">
        <test name="TestFuturesScenarioBucketed::testBase"
type="text"></test>
        <test name="TestFuturesScenarioBucketed::testGammaParallel"
type="text"></test>
    </results>
    <statistics>
        <testsRun>20</testsRun>
        <failuresTotal>1</failuresTotal>
        <errors>1</errors>
        <failures>0</failures>
    </statistics>
    <results type="failure detail"></results> </testrun>
 
And I want to report in Explorer that shows three tables, one for 
failures, one for success and one for the summary. I also need the 
timestamp showing.
 
Any ideas? I cannot seem to get the tests on two different tables, 
only on one.

Kind Regards and thanks in advance,

Chirag Mehta





Notice to recipient:
The information in this internet e-mail and any attachments is 
confidential and may be privileged. It is intended solely for the 
addressee. If you are not the intended addressee please notify the 
sender immediately by telephone. If you are not the intended 
recipient, any disclosure, copying, distribution or any action taken 
or omitted to be taken in reliance on it, is prohibited and may be 
unlawful.

When addressed to external clients any opinions or advice contained in

this internet e-mail are subject to the terms and conditions expressed

in any applicable governing terms of business or client engagement 
letter issued by the pertinent Bank of America group entity.

If this email originates from the U.K. please note that Bank of 
America, N.A., London Branch and Banc of America Securities Limited 
are authorised and regulated by the Financial Services Authority.


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




Notice to recipient:
The information in this internet e-mail and any attachments is confidential and 
may be privileged. It is intended solely for the addressee. If you are not the 
intended addressee please notify the sender immediately by telephone. If you 
are not the intended recipient, any disclosure, copying, distribution or any 
action taken or omitted to be taken in reliance on it, is prohibited and may be 
unlawful.

When addressed to external clients any opinions or advice contained in this 
internet e-mail are subject to the terms and conditions expressed in any 
applicable governing terms of business or client engagement letter issued by 
the pertinent Bank of America group entity.

If this email originates from the U.K. please note that Bank of America, N.A., 
London Branch and Banc of America Securities Limited are authorised and 
regulated by the Financial Services Authority.


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>