For-each of a collection of headers and find a certain attribute in another collection of Items. If I have something like:
<ROOT>
<Listings>
<Listing>
<Headers>
<Header width="3cm" value="UserName" />
<Header width="3cm" value="MobileAlias" />
<Header width="3cm" value="Name" />
<Header width="3cm" value="Email" />
<Header width="1cm" value="Gender" />
<Header width="2cm" value="LastLoginDate" />
<Header width="2cm" value="LastActivityDate" />
<Header width="1.5cm" value="IsApproved" />
<Header width="1.5cm" value="IsLockedOut" />
</Headers>
<Footers></Footers>
<Items>
<Item UserName="Admin" MobileAlias="Admin" Name="Systems Administrator" Email="[email protected]" Gender="Male" LastLoginDate="29-07-2009 12:54:59" LastActivityDate="29-07-2009 12:56:37" IsApproved="True" IsLockedOut="False" />
<Item UserName="Guest" MobileAlias="Guest" Name="Anonymous User" Email="[email protected]" Gender="Male" LastLoginDate="" LastActivityDate="" IsApproved="True" IsLockedOut="False" />
</Items>
</Listing>
</Listings>
</ROOT>
How can I get something like:
<fo:table-row>
<fo:table-cell><fo:block>Admin</fo:block></fo:table-cell>
<fo:table-cell><fo:block>Admin</fo:block></fo:table-cell>
<fo:table-cell><fo:block>System Administrator</fo:block></fo:table-cell>
<fo:table-cell><fo:block>[email protected]</fo:block></fo:table-cell>
<fo:table-cell><fo:block>Male</fo:block></fo:table-cell>
<fo:table-cell><fo:block>29-07-2009 12:54:59</fo:block></fo:table-cell>
<fo:table-cell><fo:block>29-07-2009 12:56:37</fo:block></fo:table-cell>
<fo:table-cell><fo:block>True</fo:block></fo:table-cell>
<fo:table-cell><fo:block>True</fo:block></fo:table-cell>
</fo:table-row>
(...)
I mean, for-each Item in Items, for-each Header in Headers, return the attribute Header@value from Item
Much appreciated.