Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: styles

  1. #1
    New to the CF scene
    Join Date
    Apr 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    styles

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="tvstyle.xsl"?> 
    <!-- produced for the bleb.org TV system at Thu Feb 28 08:39:48 2013 -->
    <channel id="bbc1_scotland" source="Sky" date="28/02/2013">
      <programme>
      <flags> (S) </flags>
    <desc>The latest news, sport, business and weather from the BBC's Breakfast team. Also in HD.  Including Reporting Scotland at 25 and 55 minutes past each hour.</desc>
    <title>Breakfast</title>
    <end>0915</end>
    <start>0600</start>
      </programme>
      <programme>
      <flags> (S) </flags>
    <desc>...James Martin. 4/5. James Martin and his brigade of chefs begin to implement changes in hospitals across the UK. In Birmingham they try out a new ordering system. Also in HD. [AD]</desc>
    <title>Operation Hospital Food with...</title>
    <end>1000</end>
    <start>0915</start>
      </programme>
      <programme>
      <flags> (S) </flags>
    <desc>Martin Roberts and Lucy Alexander visit a property in Devizes, Wiltshire; a two-bed house in Stoke-on-Trent; and a ground floor flat in Norwood, London. Also in HD. Then BBC News; Weather.</desc>
    <title>Homes Under the Hammer</title>
    <end>1100</end>
    <start>1000</start>
      </programme>
      <programme>
      <flags> (S) </flags>
    <desc>14/20. Series looking at benefit fraud. Investigators for the NHS discover a financial analyst at a London hospital siphoning off taxpayers' money into his friends' bank accounts. Also in HD. </desc>
    <title>Saints and Scroungers</title>
    <end>1145</end>
    <start>1100</start>
      </programme>
      <programme>
      <flags> (S) </flags>
    <desc>9/15. Joe Crowley catches up with people who decided to renovate unloved houses. Joe revisits a Shropshire sculptor who had plans to renovate an empty warehouse.  Then BBC News; Weather.</desc>
    <title>Britain's Empty Homes Revisited</title>
    <end>1215</end>
    <start>1145</start>
      </programme>
      <programme>
      <flags> (S) </flags>
    <subtitle>Derby</subtitle>
    <desc>Tim Wonnacott heads to Derby University as the red and blue teams go head-to-head in another Bargain Hunt battle, with help from experts Thomas Plant and Jonathan Pratt. </desc>
    <title>Bargain Hunt</title>
    <end>1300</end>
    <start>1215</start>
      </programme>
      <programme>
      <flags> (S) </flags>
    <desc>The latest national and international news stories from the BBC News team, followed by weather. </desc>
    <title>BBC News at One</title>
    <end>1330</end>
    <start>1300</start>
      </programme>
      <programme>
      <flags> (S) </flags>
    <desc>The latest news and weather from around Scotland. </desc>
    <title>Reporting Scotland</title>
    <end>1345</end>
    <start>1330</start>
      </programme>
      <programme>
      <flags> (S) </flags>
    <subtitle>Exterminating Angel</subtitle>
    <desc>A domestic disturbance takes a sinister turn as Rob finds himself caught in a septuagenarian love triangle. Al is eager to spend the evening with Jas. Also in HD. [AD]</desc>
    <title>Doctors</title>
    <end>1410</end>
    <start>1345</start>
      </programme>
      <programme>
      <flags> (S) </flags>
    <desc>2/8. Danger UXD: Sitcom. Del continues to deal in dodgy goods; most lethal of all, a box of dolls he acquires from Denzil. So they need to get rid of them sooner rather than later... </desc>
    <title>Only Fools and Horses</title>
    <end>1500</end>
    <start>1410</start>
      </programme>
      <programme>
      <flags> (S) </flags>
    <desc>Nick Knowles hosts the general knowledge quiz show. If contestants achieve absolute perfection, they win the cash prize. If they fail, the money rolls over to the next game. Also in HD. </desc>
    <title>Perfection</title>
    <end>1545</end>
    <start>1500</start>
      </programme>
      <programme>
      <flags> (S) </flags>
    <subtitle>Cumbria</subtitle>
    <desc>Nicki Chapman helps a couple looking for some rural respite and privacy. With 800,000 pounds to spend, they are after a 17th-century farmhouse with land for their animals. </desc>
    <title>Escape to the Country</title>
    <end>1630</end>
    <start>1545</start>
      </programme>
      <programme>
      <flags> (S) </flags>
    <desc>Antiques experts Eric Knowles and James Braxton battle it out at in Stansted Mountfitchet. Their challenge is to buy the hidden gems that they can sell on for the highest prices. Also in HD. </desc>
    <title>Put Your Money Where Your Mouth Is</title>
    <end>1715</end>
    <start>1630</start>
      </programme>
      <programme>
      <flags> (S) </flags>
    <desc>Quiz in which contestants try to score as few points as possible by plumbing the depths of their general knowledge to come up with the answers no-one else can think of. Also in HD. </desc>
    <title>Pointless</title>
    <end>1800</end>
    <start>1715</start>
      </programme>
      <programme>
      <flags> (S) </flags>
    <desc>The latest national and international news stories from the BBC News team, followed by weather. </desc>
    <title>BBC News at Six</title>
    <end>1830</end>
    <start>1800</start>
      </programme>
      <programme>
      <flags> (S) </flags>
    <desc>The latest news and weather from around Scotland presented by Sally Magnusson. </desc>
    <title>Reporting Scotland</title>
    <end>1900</end>
    <start>1830</start>
      </programme>
      <programme>
      <flags> (S) </flags>
    <desc>If it's got Britain talking then it will get talked about on The One Show. Matt Baker and Alex Jones present the stories that matter from across the country. Also in HD. </desc>
    <title>The One Show</title>
    <end>1930</end>
    <start>1900</start>
      </programme>
      <programme>
      <flags> (S) </flags>
    <desc>Patrick is angry and upset when Denise arranges a carer to look after him. Also in HD. [AD] Then Reporting Scotland.</desc>
    <title>EastEnders</title>
    <end>2000</end>
    <start>1930</start>
      </programme>
      <programme>
      <flags> (S) </flags>
    <desc>School-based drama. Barry's behaviour finally makes Sian snap. With Sian's career on the line, can Michael and the school save her? Meanwhile, Kevin and Chalky cause a stir. Also in HD. [AD]</desc>
    <title>Waterloo Road</title>
    <end>2100</end>
    <start>2000</start>
      </programme>
      <programme>
      <flags> (S) </flags>
    <desc>2/2. Changing Families: Documentary looking at how some of the Child of Our Time children - and their parents and grandparents - have coped with the changes in their families. [AD]</desc>
    <title>Child of Our Time</title>
    <end>2200</end>
    <start>2100</start>
      </programme>
      <programme>
      <flags> (S) </flags>
    <desc>The latest national and international news, with reports from BBC correspondents worldwide. </desc>
    <title>BBC News at Ten</title>
    <end>2225</end>
    <start>2200</start>
      </programme>
      <programme>
      <flags> (S) </flags>
    <desc>The latest news and weather from around Scotland.  Followed by national weather.</desc>
    <title>Reporting Scotland</title>
    <end>2235</end>
    <start>2225</start>
      </programme>
      <programme>
      <flags> (S) </flags>
    <desc>David Dimbleby chairs Question Time from Eastleigh, the former seat of disgraced ex-MP Chris Huhne and now the site of a fierce by-election battle between the coalition partners. Also in HD. </desc>
    <title>Question Time</title>
    <end>2335</end>
    <start>2235</start>
      </programme>
      <programme>
      <flags> (S) </flags>
    <desc>A political review of the week including live coverage of the Eastleigh by-election result presented by Andrew Neil with Michael Portillo, Alastair Campbell and guests. </desc>
    <title>This Week: By Election Special</title>
    <end>0230</end>
    <start>2335</start>
      </programme>
      <programme>
      <flags> (S) </flags>
    <desc>Detailed weather forecast. </desc>
    <title>Skiing Weatherview</title>
    <end>0235</end>
    <start>0230</start>
      </programme>
      <programme>
      <flags> (S) </flags>
    <desc>BBC One joins the BBC's rolling news channel for a night of news, with bulletins on the hour and the headlines every 15 minutes. </desc>
    <title>BBC News</title>
    <end>0600</end>
    <start>0235</start>
      </programme>
      <programme>
      <flags> (S) </flags>
    <desc>The latest news, sport, business and weather from the BBC's Breakfast team. Also in HD. Including Reporting Scotland at 25 and 55 minutes past each hour.</desc>
    <title>Breakfast</title>
    <end>0915</end>
    <start>0600</start>
      </programme>
    </channel>
    I have just started learning xml I was trying to put this into a styled table but for whatever it doesn't seem to be working

    Code:
    <?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="/programme">
     <html>
     <body>
     <table border="1">
     <xsl:for-each select="programme/title">
     <tr>
     <td><xsl:value-of select="title"/></td>
     <td><xsl:value-of select="flags"/></td>
     <td><xsl:value-of select="start"/></td>
     
     <td bgcolor="#FFE4C4">
     </td>
     </tr>
     </xsl:for-each>
     </table>
     </body>
    </html>
     </xsl:template>
    </xsl:stylesheet>
    Any help would be great.

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,303
    Thanks
    23
    Thanked 612 Times in 611 Posts
    Code:
    <?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>
    	<table border="1">
    		<xsl:for-each select="channel/programme">
    			<tr>
    			<td><xsl:value-of select="title"/></td>
    			<td><xsl:value-of select="flags"/></td>
    			<td><xsl:value-of select="start"/></td>
    			<td bgcolor="#FFE4C4"></td>
    			</tr>
    		</xsl:for-each>
    	</table>
    	</body>
    	</html>
    	</xsl:template>
    </xsl:stylesheet>
    Evolution - The non-random survival of random variants.

    "If you leave hydrogen alone, for long enough, it begins to think about itself."


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •