OZONE Asylum
Forums
XML - XSL - XSLT - XHTML - CSS - DOM
how do u use keys to group, the following code doesn't work for me...
This page's ID:
25504
Search
QuickChanges
Forums
FAQ
Archives
Register
Edit Post
Who can edit a post?
The poster and administrators may edit a post. The poster can only edit it for a short while after the initial post.
Your User Name:
Your Password:
Login Options:
Remember Me On This Computer
Your Text:
Insert Slimies »
Insert UBB Code »
Close
Last Tag
|
All Tags
UBB Help
I would expect TestMachine_1 11.000.51 Stand Alone TestMachine_2 11.000.51 Stand Alone But the second set of build info doesn't appear. any ideas? I'm trying to group by: machine build suite script [code] <?xml version="1.0" encoding="ISO-8859-1"?> <?xml-stylesheet type="text/xsl" href="Events.xsl"?> <logStart> <events> <event id="host"> <date_time>2005-04-11 16:11:41.641</date_time> <host_address>111.16.33.113</host_address> <host_name>TestMachine_1</host_name> <jre_version>1.4.1_01</jre_version> <os_name>Windows 2000</os_name> <os_version>5.0</os_version> <screen_rez>1024x768</screen_rez> <user_name>peterson</user_name> <timezone>BST</timezone> </event> <event id="info_event"> <date_time>2005-04-11 16:11:39.579</date_time> <message>info event 1 1</message> <script>AutomationUnitTests.UnitTest_EventLog1(1)</script> <suite>independent</suite> <build>Stand Alone</build> </event> <event id="info_event"> <date_time>2005-04-11 16:11:39.579</date_time> <message>info event 1 2</message> <script>AutomationUnitTests.UnitTest_EventLog1(1)</script> <suite>independent</suite> <build>Stand Alone</build> </event> <event id="info_event"> <date_time>2005-04-11 16:11:39.579</date_time> <message>info event 1 3</message> <script>AutomationUnitTests.UnitTest_EventLog1(2)</script> <suite>independent2</suite> <build>Stand Alone</build> </event> <event id="info_event"> <date_time>2005-04-11 16:11:39.579</date_time> <message>info event 1 4</message> <script>AutomationUnitTests.UnitTest_EventLog1(3)</script> <suite>independent</suite> <build>11.000.51</build> </event> </events> <events> <event id="host"> <date_time>2005-04-11 16:11:41.641</date_time> <host_address>111.16.33.114</host_address> <host_name>TestMachine_2</host_name> <jre_version>1.4.1_01</jre_version> <os_name>Windows 2000</os_name> <os_version>5.0</os_version> <screen_rez>1024x768</screen_rez> <user_name>peterson</user_name> <timezone>BST</timezone> </event> <event id="info_event"> <date_time>2005-04-11 16:11:39.579</date_time> <message>info event 2 1</message> <script>AutomationUnitTests.UnitTest_EventLog1(1)</script> <suite>independent</suite> <build>Stand Alone</build> </event> <event id="info_event"> <date_time>2005-04-11 16:11:39.579</date_time> <message>info event 2 2</message> <script>AutomationUnitTests.UnitTest_EventLog1(1)</script> <suite>independent</suite> <build>Stand Alone</build> </event> <event id="info_event"> <date_time>2005-04-11 16:11:39.579</date_time> <message>info event 2 3</message> <script>AutomationUnitTests.UnitTest_EventLog1(2)</script> <suite>independent2</suite> <build>Stand Alone</build> </event> <event id="info_event"> <date_time>2005-04-11 16:11:39.579</date_time> <message>info event 2 4</message> <script>AutomationUnitTests.UnitTest_EventLog1(3)</script> <suite>independent</suite> <build>11.000.51</build> </event> <event id="info_event"> <date_time>2005-04-11 16:11:39.579</date_time> <message>info event 2 5</message> <script>AutomationUnitTests.UnitTest_EventLog1(3)</script> <suite>independent</suite> <build>11.000.51</build> </event> <event id="xde_error_event"> <date_time>2005-04-11 16:19:59.766</date_time> <aut_title>AUT pid not available.</aut_title> <message>Now an XDE Error has occured.</message> <screen_dump> <date_time>2005-04-11 16:19:59.766</date_time> <file_path>C:/images/AutomationUnitTests.UnitTest_EventLog1_20050411_161959766.jpg</file_path> </screen_dump> <script>AutomationUnitTests.UnitTest_EventLog1(2)</script> <suite>independent</suite> <build>Stand Alone</build> </event> </events> </logStart> <!-- File : Events.xsl --> <?xml version="1.0" encoding="ISO-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:key name="listBuilds" match="event" use="build" /> <xsl:template match="/"> <html> <head> <title>test</title> </head> <body> <h1>Testing Logs</h1> <br/> <xsl:apply-templates select="logStart/events" /> </body> </html> </xsl:template> <xsl:template match="events"> <xsl:value-of select="./event[@id = 'host']/host_name" /><br/><br/> <xsl:for-each select="event[count(. | key('listBuilds', build)[1]) = 1]" > <xsl:sort select="build" /> <xsl:value-of select="build"/><br/> </xsl:for-each> <br/><br/> </xsl:template> </xsl:stylesheet> [/code]
Loading...
Options:
Enable Slimies
Enable Linkwords
« Backwards
—
Onwards »