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
-
I think the penny, may, finally, have droppedFirst Law of Contracting: Only the strong surviveComment
-
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
- All the big IR35/employment status cases of 2025: ranked Dec 23 08:55
- Why IT contractors are (understandably) fed up with recruitment agencies Today 13:57
- Contractors, don’t fall foul of HMRC’s expenses rules this Christmas party season Dec 19 09:55
- A delay to the employment status consultation isn’t why an IR35 fix looks further out of reach Dec 18 08:22
- How asking a tech jobs agency basic questions got one IT contractor withdrawn Dec 17 07:21
- Are Home Office immigration policies sacrificing IT contractors for ‘cheap labour’? Dec 16 07:48
- Will 2026 see the return of the ‘Outside IR35’ contractor? Dec 15 07:51
- Contractors, Reeves’ dividends raid is disastrous. Act, but without acceptance Dec 12 07:10
- Why JSL indemnity clauses putting umbrella contractors on the hook could be a PR disaster Dec 11 07:36
- The JSL legislation we’ll surely get just dropped. Here’s 4 ‘indelibles’ Dec 10 07:26

Comment