Compare attribute values through whole node-set

Shoprat

New Member
I have xml data. And parse it using xslt transformation.What I need is to find out if all child elements of particular element have same nested-element's values. Look:if we have same values in :\[code\]<parent> <child> <compare>1</compare> </child> <child> <compare>1</compare> </child></parent>\[/code\]we should copy all tree and set flag to "1":\[code\]<parent> ... </child> <flag>1</flag></parent>\[/code\]If we have diffirent values:\[code\]<parent> <child> <compare>1</compare> </child> <child> <compare>2</compare> </child></parent>\[/code\]we should copy all tree and set flag to "":\[code\]<parent> ... </child> <flag/></parent>\[/code\]
 
Back
Top