Subject: RE: [xsl] Simple XSL styling question From: "Michael Kay" <mike@xxxxxxxxxxxx> Date: Fri, 7 Jul 2006 10:40:42 +0100 |
> 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: [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.mehta@xxxxxxxxxxxxxxxxx] > > Sent: 06 July 2006 14:35 > > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > > 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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Simple XSL styling questi, David Carlisle | Thread | [xsl] Number formating (format-numb, Karen Yang |
Re: [xsl] Simple XSL styling questi, David Carlisle | Date | [xsl] XSLT to remove characters and, Georg Hohmann |
Month |