Lookup Muenchian Technique
- Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
- Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
Xsl
Collapse
X
Collapse
-
-
I've come across with some people mentioning it: it seems to relate to groupings that I do in DB using SQL stored procedure that has not got stupid limitation of a "functional" language.
Not sure grouping will help in case of first N rows.Comment
-
Now, how does that saying go: "If you only have a hammer, everything begins to look like a nail."Originally posted by AtWI do not believe it is possible to select FIRST X nodes satisfying given criteria (true in our case) and stop matching immediately after first node that fails such criteria - thus excluding possibly further nodes that satisfy that criteria: prove it otherwise please, I would appreciate it a lot and will shut up about XSL for 24 hours (until I hit some other brick wall).
You're looking at it all wrong. How exactly does "FIRST X nodes satisfying given criteria" differ from "break out of a loop"? Which we've already told you is a wrong way of thinking in this language...Insanity: repeating the same actions, but expecting different results.
threadeds website, and here's my blog.
Comment
-
threaded - either offer your solution (at least DimPrawn offered one that I actually found myself, though its not ideal due to having to use node-set() which is non-standard extention, leading me to believe its not possible to do that using pure XSL) or feck off.
I am solving real life problems - I don't care if language is called functional or not, if it does the job well then its pretty functional for me, if not, then it disfunctional - something that XSLT is.Comment
-
With a combination of position() and preceding-sibling()
Something like
@my-value='false' and not(ancestor::*/preceding-sibling::row/entry/@my-value='false')Comment
-
ok, so this is basically this: select node if:
a) its true (rather than false you used)
AND
b) none of the previous nodes were false?Comment
-
Well, here is a solution that you may well understand.
Start constructing a variable, inside this iterate through each node, if it has the value put out a 'True', end constructing the variable.
Construct a new variable, if the first four chars of the variable above is 'True', set it to True.
Use the second var as your boolean, as it is either True or null.
threaded in "And I've seen that done. What, in maven? Hush now or you'll upset someone." modeInsanity: repeating the same actions, but expecting different results.
threadeds website, and here's my blog.
Comment
-
It can certainly do the job Atw so it is functional in more than one sense. The question is can you do the job ? If you are not up to it then you are an inferior foreign code imigrant.Originally posted by AtWthreaded - either offer your solution (at least DimPrawn offered one that I actually found myself, though its not ideal due to having to use node-set() which is non-standard extention, leading me to believe its not possible to do that using pure XSL) or feck off.
I am solving real life problems - I don't care if language is called functional or not, if it does the job well then its pretty functional for me, if not, then it disfunctional - something that XSLT is.
Please leave this country and go back to the simple for/next loops of your birth. Real men use ML - it should be on the entrance exams anyway.Comment
-
Comment
-
You have not offered the solution - DimPrawn did, even though I strongly suspect that performance will suffer for long sets, but then again I would not use XSL for performance critical operations, even though clearly having small loop that will abort quickly will always be faster - so much for functional way of doing things being better, eh?Comment
- Home
- News & Features
- First Timers
- IR35 / S660 / BN66
- Employee Benefit Trusts
- Agency Workers Regulations
- MSC Legislation
- Limited Companies
- Dividends
- Umbrella Company
- VAT / Flat Rate VAT
- Job News & Guides
- Money News & Guides
- Guide to Contracts
- Successful Contracting
- Contracting Overseas
- Contractor Calculators
- MVL
- Contractor Expenses
Advertisers
Contractor Services
CUK News
- Autumn Budget 2026: FCSA’s 5 contractor asks of John Healey Today 04:15
- Andy Burnham's Zoom gripe doesn’t apply to IT contractors, say recruiters Yesterday 03:41
- Check your Loan Recall paperwork for the Isle of Man: it could matter Aug 25 03:27
- Budget 2026: Contractor advisers ask for ‘IR35 reset’ Aug 24 04:57
- Why might an umbrella company fail to pay its total tax bill to HMRC? Aug 18 06:08
- Contractors, here are the late payment fixes that the Lords just turned down Aug 17 08:03
- How will HMRC's Direct Debit plan affect contractors paying VAT and PAYE? Aug 13 23:54
- HMRC's new 'reckless' tax offence: an IR35 game-changer for contractors? Aug 13 13:50
- “I’m not a Machiavellian overlord”: Adrian Sacco breaks his silence on the Contractor Loan Recalls Aug 13 06:50
- ‘Bounce back’ in IT contractor demand in July 2026, even if ‘one swallow doesn’t make a summer’ Aug 12 07:50

Comment