[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Simple XSL styling question

Subject: Re: Simple XSL styling question
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 7 Jul 2006 10:06:43 +0100
xslt test question
yor posted input had a type="failures" attribute on results element (and
type="text" on thr child test element)

Your xslt has
   <xsl:for-each select="test">
					<xsl:choose>
		<xsl:when test="current()/@type='failures'">

which is the same thing as

   <xsl:for-each select="test">
					<xsl:choose>
		<xsl:when test="@type='failures'">

and tests that the type attribute on the test attribute is "failures"
which appears never to be the case.



This test is reather strange

<xsl:variable name="current" select="testrun/results/*" /> 
<xsl:apply-templates select="/testrun/results[test = $current/test]" />


It applies templates to all results element that have a test child
thathas string value equal to the test file child of any element in
$current (which are test elements).  $current/test is empty as $current
itself consists of test elements and they have no test children, also
teh test elements appear to be empty so they all have string value of ""
and are all = to each other.


I think you just want something like

<xsl:for-each select="/testrun/results[@type='failures']/test">
  ...
</xsl:for-each>
<xsl:for-each select="/testrun/results[@type='success']/test">
  ...
</xsl:for-each>


David

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.