The UK Home Automation Archive

Archive Home
Group Home
Search Archive


Advanced Search

The UKHA-ARCHIVE IS CEASING OPERATIONS 31 DEC 2024


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

OT (ish-ish) Paging with XML & XSL


  • To: ukha_d@xxxxxxx
  • Subject: OT (ish-ish) Paging with XML & XSL
  • From: "frostie2001uk" <Neil.Frost@xxxxxxx>
  • Date: Sun, 25 Jan 2004 22:29:37 -0000
  • Mailing-list: list ukha_d@yahoogroups.com; contact ukha_d-owner@xxxxxxx
  • Reply-to: ukha_d@xxxxxxx

this is OT ish so sorry for that.. the ish bit is that it's for the
front end of my home webpage (that will be the "hub" of my HA
stuff)....

Anyway...

I'm downloading the bbc's news xml page using xPL, I then transform
it using XSL and asp to list the headlines as "clickable" links
to
the bbc page...

There are currently over 30 headlines... I only want to display 10 at
a time... that way it doesn't mess up the display... my xsl is like
this...


<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:output method="html" omit-xml-declaration="yes"
standalone="no"
indent="no" />
<xsl:template match="/">
<center>
<xsl:attribute name="class">newstitle</xsl:attribute>
<xsl:value-of select="rss/channel/title"/>
<br />
<xsl:attribute name="class">newstitle</xsl:attribute>
<xsl:value-of select="rss/channel/lastBuildDate"/>
<br />
</center>
<xsl:for-each select="rss/channel/item">
<a>
<xsl:attribute name="href"><xsl:value-of
select="link"/></xsl:attribute>
<xsl:attribute name="class">newslink</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<xsl:value-of select="title"/>
</a>
<br />
</xsl:for-each>
<center>
<xsl:attribute name="class">newstitle</xsl:attribute>
<xsl:value-of select="rss/channel/copyright"/>
</center>
</xsl:template>
</xsl:stylesheet>

Any help would be fantastic.... thanks

Neil


UK Home Automation Meet 2004 - BOOK NOW!
http://www.ukha2004.com

http://www.automatedhome.co.uk
Post message: ukha_d@yahoogroups.com
Subscribe:  ukha_d-subscribe@yahoogroups.com
Unsubscribe:  ukha_d-unsubscribe@yahoogroups.com
List owner:  ukha_d-owner@yahoogroups.com


Home | Main Index | Thread Index

Comments to the Webmaster are always welcomed, please use this contact form . Note that as this site is a mailing list archive, the Webmaster has no control over the contents of the messages. Comments about message content should be directed to the relevant mailing list.