Subject: RE: XSL problem From: Kay Michael <Michael.Kay@xxxxxxx> Date: Mon, 2 Aug 1999 17:54:17 +0100 |
You could try something like: <periodicals> <xsl:for-each select="//tr[position()!=1]"> <periodical> <subject><xsl:value-of select="preceding::b[1]"/></subject> <description><xsl:value-of select="preceding::i[1]"/></description> <title><xsl:value-of select="td[1]"/></title> <author><xsl:value-of select="td[2]"/></author> <length><xsl:value-of select="td[3]"/></length> </periodical> </xsl:for-each> </periodicals> > -----Original Message----- > From: McKisson, Shawn [mailto:mckisss@xxxxxxxxxxxx] > Sent: 02 August 1999 16:31 > To: 'xsl-list@xxxxxxxxxxxxxxxx' > Subject: RE: XSL problem > > > Oops I have taken too literally - I apoligize for not > describing the problem > a little better. > To be more concrete, I need to parse through well formed HTML. > I have an structure that looks like the following: > > <hr><p><b> Periodical Subject </b></p></hr> > <i> Peridocal Subject Desc <i> > <table> > <tr> > <th> garbage text </th> > <th> more garbage text </th> > <th> even more junk </th> > </tr> > <tr> > <td> Periodical Title </td> > <td> Periodical Author (assume to be a single element) </td> > <td> Periodical length (in pages) </td> > </tr> > <tr> > <td> Periodical Title </td> > <td> Periodical Author (assume to be a single element) </td> > <td> Periodical length (in pages) </td> > </tr> > <tr> > > <td> Periodical Title </td> > <td> Periodical Author (assume to be a single element) </td> > <td> Periodical length (in pages) </td> > </tr> > <tr> > <td> Periodical Title </td> > <td> Periodical Author (assume to be a single element) </td> > <td> Periodical length (in pages) </td> > </tr> > </table> > . > . > <the entire block appears here again, with a different > subject until all the > subject are exhausted> > > > What I need to turn this into is > > <periodical-list> > <periodical> > <subject> Periodical Subject </subject> > <desc> Periodical Subject Desc </desc> > <title> Periodical Title </title> > <author> Periodical Author </author> > <length> Periodical Length </length> > </periodical> > > <periodical> > AND SO ON UNTIL ALL PERIODICAL SUBJECTS AND PERIODICALS > ARE EXHAUSTED > </periodical> > </periodical-list> > > Any ideas? > > -----Original Message----- > From: David Carlisle [mailto:davidc@xxxxxxxxx] > Sent: Friday, July 30, 1999 5:44 PM > To: xsl-list@xxxxxxxxxxxxxxxx > Subject: Re: XSL problem > > > > > > <Xn> > > is that _really_ what you want with dynamically generated > element names. > You can have that if that's what you want, but it is immoral, > you should > be asking for at least <X num="n"> > > David > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: XSL problem, David Carlisle | Thread | What's the correct DTD for XSL?, Paul W. Abrahams |
Re: XSL problem, David Carlisle | Date | Re: Someone bashing XSL, Michael Mason |
Month |