[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: How do I pick the first three elements and ignore the rest?


Subject: RE: How do I pick the first three elements and ignore the rest?
From: "Nic Williams" <nwilliam@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 4 Feb 1999 09:04:28 -0000

Guy,

I'm not using IE or anything MS come to that. We're using XT at the moment
and the method you've highlighted doesn't work. Is there an alternative that
conforms to the standard?

Thanks,

Nic.

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of
> Guy_Murphy@xxxxxxxxxx
> Sent: 03 February 1999 15:13
> To: xsl-list@xxxxxxxxxxxxxxxx
> Subject: Re: How do I pick the first three elements and
> ignore the rest?
>
>
> Hi.
>
> I haven't tested it, but in IE5b2 I think the match you'd
> want would be
> "li[$lt$ 3]" or it might be "li[index() $lt$ 3]"
>
> If you're using another parser I would be pretty sure that it
> will have a
> way of filtering with an evaluation of the index.
>
> There aren't any really good references at the moment, as I'm
> using the IE5
> parser I find myself paying most attention to the pattern
> matching syntax
> examples at http://www.microsoft.com/xml/
>
> There are a couple of XML newsgroups on Usenet, but to my
> knowledge no XSL
> specific NGs. On XML issues the responses are quite good, and getting
> increasingly better on XSL. There's quite a high degree of polution on
> these groups as there's a fare number of Web designers waking-up at
> panicking at the prospect of XML/XSL.
>
> Cheers
>      Guy.
>
>
>
>
>
> xsl-list@xxxxxxxxxxxxxxxx on 02/03/99 07:41:45 PM
>
> To:   xsl-list@xxxxxxxxxxxxxxxx
> cc:    (bcc: Guy Murphy/UK/MAID)
> Subject:  How do I pick the first three elements and ignore the rest?
>
>
>
>
> I would like to pick the first three LI elements contained within a
> HEADLINES section. I can get the first using first-of-any().
> How do I get
> all three though.
> My XML would look something like:
> <HEADLINES>
>         <UL>
>         <LI>Man Lands on Mars</LI>
>         <LI>Moon rock is edible</LI>
>         <LI>Space dust cloggs AC unit<LI>
>         <LI>Splash down in English Channel</LI>
>         <LI>...</LI>
>         <LI>...</LI>
>         <LI>...</LI>
>         <LI>...</LI>
>         </UL>
> </HEADLINES>
> If there is a better place for me to be asking these fairly
> basic questions
> then please point me there. Is there a good easy to read
> reference - the WD
> is a little heavy going and lacking in good examples.
> Cheers,
> Nic.
> ______________________________________________________________
> __________
> Nicolas Williams                Internet:
> nwilliam@xxxxxxxxxxxxxxxxxxxxx
> Internet Specialist                Phone: 44-(0)1223-325285 (direct)
> Schlumberger Cambridge Research         : 44-(0)1223-315576
> High Cross                           Fax: 44-(0)1223-311830
> Madingley Road                    Mobile: 44-(0)410 726330
> Cambridge                           http://www.cambridge.scr.slb.com
> CB3 OEL                             http://www.slb.com
> Microsoft Certified Systems Engineer (MCSE)
> Microsoft Certified Professional + Internet (MCP + Internet)
> 'To err is human. To really mess something up takes a computer.'
>
>  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
Keywords