|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Just the first 'x' elements within a for-each
Hi Si, > [Using a predicate] doesn't seem to want to work whereas using: > > <xsl:if test="position() <= 2"> > > within the for-each does? Might this be something to do with the XSL > parsing in XML Spy 5? I guess that it could be: if you haven't got MSXML3 installed, then XML Spy might be using MSXML2, which doesn't support XSLT. But that would depend on the namespace that you're using in the stylesheet. You don't describe in what way it "doesn't work", so it's hard to tell. Can you show a full stylesheet with the code that doesn't work and the code that does? > Oh and I had a good look around but couldn't find a simple > description for 'declarative programming'? I think of it in terms of programming by saying *what* you want to do rather than in terms of *how* you want to do it. So instead of phrasing your requirement in procedural terms as "I want to loop over all the nodes and stop after the second", say "I want to process the first two nodes". Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








