[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Position() Function Using Filter

Subject: Re: Position() Function Using Filter
From: Lighton Phiri <lighton.phiri@xxxxxxxxx>
Date: Sat, 29 Oct 2011 00:34:54 +0200
Re:  Position() Function Using Filter
Thanks all the the valuable feedback. The count approach suggested by
Andrew& Brandon did the trick :) --count(preceding-sibling::*)
Awesome!

just so you know, I forgot an important detail --I am working with
xslt 1.0 and so "index-of and " and the book[tokenize(., '/')[last()]
eq $bpage] hint wont work.

Lighton Phiri
http://lightonphiri.org/
@lightonphiri




On 28 October 2011 21:01, Imsieke, Gerrit, le-tex
<gerrit.imsieke@xxxxxxxxx> wrote:
>
>
> On 2011-10-28 20:17, Liam R E Quin wrote:
>>
>> On Fri, 2011-10-28 at 10:27 -0400, Murray McDonald wrote:
>>>
>>> If you are sure that there will be one and only one "match" then the
>>> '[1]'
>>> is unnecessary
>>>
>>> index-of(//book, //book[ends-with(., 'ASTRO_00007.JPG')])[1]
>>
>> On the other hand, the difference between /a/b/c[1] and (/a/b/c)[1] is a
>> major source of confusion for the newcomer and the "perpetual
>> intermediate" [1] alike.
>
> Thanks for confusing the perpetual intermediate with a [1] that looks like
a
> positional predicate but that actually is a citation link. Pun intended?
>
>>
>> Sometimes you have to make the computer work a little harder if it means
>> getting the right answer more often.
>
> Agree [+1].

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.