Re: Testing if all child nodes match (based on the val
Hi AllThe problem is usually in the '=' operator (thinking positive): in XLST, if one item in the left side sequence and one item in the right side sequence equal, the whole expression returns true. The trick is to reverse it: with the '!=' (think negative: think what you don't want and then reverse it), which means: if one item on the left side is sequence is unequal to any item in the right side sequence, the whole expression returns false:
(: returns false precisely when you want true() to return :) group/person/sex !=group/person/sex
(: reverse the result :) not(group/person/sex !=group/person/sex)
and *and* it together with the rest:
(: full expression :) not(group/person/sex !=group/person/sex) and not(group/person/age !=group/person/age)
Cheers, -- Abel Braaksma
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