I have a terrible part of XML that I need to process through BizTalk, and I was able to normalize it in this example below. I'm not an XSLT ninja, but between the network and the VS2010 debugger, I can find my way around XSL.
Now I need a smart XSLT bit to "weed out" duplicate elements and store the latter only according to the date in the ValidFromDate attribute.
The ValidFromDate attribute is of type XSD: Date.
<SomeData> <A ValidFromDate="2011-12-01">A_1</A> <A ValidFromDate="2012-01-19">A_2</A> <B CalidFromDate="2011-12-03">B_1</B> <B ValidFromDate="2012-01-17">B_2</B> <B ValidFromDate="2012-01-19">B_3</B> <C ValidFromDate="2012-01-20">C_1</C> <C ValidFromDate="2011-01-20">C_2</C> </SomeData>
After the conversion, I would like to save only these lines:
<SomeData> <A ValidFromDate="2012-01-19">A_2</A> <B ValidFromDate="2012-01-19">B_3</B> <C ValidFromDate="2012-01-20">C_1</C> </SomeData>
Any tips on how I combined this XSL? I emptied the Internet trying to find a solution, and I tried many smart XSL sorting scripts, but none of them felt me ββin the right direction.
source share