Tidying up the templates, making sure is valid XML
[working/NCIPServer.git] / templates / includes / LookupUserResponse.inc
1 <UserId>[% user.userdata.cardnumber %]</UserId>
2 [%# <UserFiscalAccount></UserFiscalAccount>
3 LoanedItemsCount
4 LoanedItem
5 RequestedItemsCount
6 RequestedItem
7 %]
8 <UserOptionalFields>
9 [% FOREACH element IN elements %]
10   [% IF element.textContent == 'User Address Information' %]
11      <PhysicalAddress>
12        <StructuredAddress>
13        <Line1>[% user.userdata.streetnumber %] [% user.userdata.address %]</Line1>
14        [% IF user.userdata.address2 %]
15        <Line2>[% user.userdata.address2 %]</Line2>
16        [% END %]
17        [% IF user.userdata.city %]
18        <Locality>[% user.userdata.city %]</Locality>
19        [% END %]
20        [% IF user.userdata.state %]
21        <Region>[% user.userdata.state %]</Region>
22        [% END %]
23        [% IF user.userdata.zipcode %]
24        <PostalCode>[% user.userdata.zipcode %]</PostalCode>
25        [% END %]
26        [% IF user.userdata.country %]
27        <Country>[% user.userdata.country %]</Country>
28        [% END %]
29        </StructuredAddress>
30      </PhysicalAddress>
31   [% END %]
32   [% IF element.textContent == 'Name Information' %]
33     <NameInformation>
34       <PersonalNameInformation>
35         <StructuredPersonalUserName>
36           <GivenName>[% user.userdata.firstname %]</GivenName>
37           <Surname>[% user.userdata.surname %]</Surname>
38         </StructuredPersonalUserName>
39       </PersonalNameInformation>
40     </NameInformation>
41   [% END %]
42 [% END %]
43 </UserOptionalFields>