[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: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 7 Jul 2006 10:40:42 +0100
xsl styling
> 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">

The "for-each" will select nothing unless the outermost element of your
document is called "test". But it is called "testrun".

I think you're having trouble understanding how XSLT instructions change the
context node. The general rule is that apply-templates and for-each set the
context node to each selected node in turn; everything else leaves the
context node unchanged.

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

P.S. Please tell your lawyers to get rid of the attachment to your email.
Sending mail to a public list and then telling people it's confidential is
absurd - what do you expect us to do with it? You can't have it both ways,
either you want us to help you or you don't.



> </xsl:template>
> 
> </xsl:stylesheet> 
> 
> -----Original Message-----
> From: Michael Kay [mailto:mike@xxxxxxxxxxxx]
> Sent: 06 July 2006 16:30
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: RE:  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.mehta@xxxxxxxxxxxxxxxxx]
> > Sent: 06 July 2006 14:35
> > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> > Subject:  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

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.