Subject: RE: [xsl] XML/XSLT formatting problem From: "Michael Kay" <mike@xxxxxxxxxxxx> Date: Thu, 6 Jan 2005 09:28:41 -0000 |
<xsl:template match="results"> <xsl:apply-templates select="image[id=current()/@lastid]/following-sibling::*"> ... Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: Chris Hicks [mailto:chrish2000@xxxxxxxxxxxxxx] > Sent: 06 January 2005 07:09 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: [xsl] XML/XSLT formatting problem > > Hi, > > I have a problem where I need to start printing values from a nodeset > starting from a certain position in the set. > > My xml looks similar to this: > > <results lastid="9"> > <image> > <id>37</id> > <imagetitle>Fred</imagetitle> > <imagelocation>fred.jpg</imagelocation> > </image> > <image> > <id>22</id> > <imagetitle>Barney</imagetitle> > <imagelocation>barney.jpg</imagelocation> > </image> > <image> > <id>9</id> > <imagetitle>Wilma</imagetitle> > <imagelocation>wilma.jpg</imagelocation> > </image> > <image> > <id>12</id> > <imagetitle>Dino</imagetitle> > <imagelocation>dino.jpg</imagelocation> > </image> > <image> > <id>1</id> > <imagetitle>Bam Bam</imagetitle> > <imagelocation>bambam.jpg</imagelocation> > </image> > </results> > > I need to check the "lastid" attribute in the result node when looping > through the nodeset in order to know when to start printing > results (this > represents the last id printed on the previous page). In the > above example > I want to start printing results starting from id = 12. > > Any tips on where to begin would be appreciated. > > Cheers, > > > Chris
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XML/XSLT formatting probl, Geert Josten | Thread | RE: [xsl] XML/XSLT formatting probl, Chris Hicks |
Re: [xsl] XML/XSLT formatting probl, Geert Josten | Date | RE: [xsl] use XSLT or XQuery in Sax, Michael Kay |
Month |