Filter template output with the xml filter where appropriate.
authorJason Stephenson <jason@sigio.com>
Wed, 25 Jun 2014 15:59:21 +0000 (11:59 -0400)
committerJason Stephenson <jason@sigio.com>
Sat, 19 Jul 2014 15:20:17 +0000 (11:20 -0400)
Signed-off-by: Jason Stephenson <jason@sigio.com>
templates/includes/AcceptItemResponse.inc
templates/includes/CheckInItemResponse.inc
templates/includes/CheckOutItemResponse.inc
templates/includes/LookupUserResponse.inc
templates/includes/RequestItemResponse.inc
templates/problem.tt

index 5b30807..436deeb 100644 (file)
@@ -1,8 +1,8 @@
 <RequestId>
-  <AgencyId>[% requestagency %]</AgencyId>
-  <RequestIdentifierValue>[% requestid %]</RequestIdentifierValue>
+  <AgencyId>[% requestagency | xml %]</AgencyId>
+  <RequestIdentifierValue>[% requestid | xml %]</RequestIdentifierValue>
 </RequestId>
 <ItemId>
   <ItemIdentifierType>Item Barcode</ItemIdentifierType>
-  <ItemIdentifierValue>[% newbarcode %]</ItemIdentifierValue>
+  <ItemIdentifierValue>[% newbarcode | xml%]</ItemIdentifierValue>
 </ItemId>
index 33a693a..c677422 100644 (file)
@@ -1,5 +1,5 @@
 <UniqueItemId>
-<ItemIdentifierValue>[% barcode %]</ItemIdentifierValue>
+<ItemIdentifierValue>[% barcode | xml %]</ItemIdentifierValue>
 </UniqueItemId>
 <UserOptionalFields>
 </UserOptionalFields>
index 48e36c5..3b6a74d 100644 (file)
@@ -1,6 +1,6 @@
 <DateDue>[% datedue %]</DateDue>
 <UniqueItemId>
-<ItemIdentifierValue>[% barcode %]</ItemIdentifierValue>
+<ItemIdentifierValue>[% barcode | xml %]</ItemIdentifierValue>
 </UniqueItemId>
 <UserOptionalFields>
 </UserOptionalFields>
index fbcad05..a9c4057 100644 (file)
@@ -1,6 +1,6 @@
 
 <UserId>
-<UserIdentifierValue>[% user.userdata.cardnumber %]</UserIdentifierValue>
+<UserIdentifierValue>[% user.userdata.cardnumber | xml %]</UserIdentifierValue>
 </UserId>
 [%# <UserFiscalAccount></UserFiscalAccount>
 LoanedItemsCount
@@ -15,21 +15,21 @@ RequestedItem
       <UserAddressRoleType>Primary Address</UserAddressRoleType>
      <PhysicalAddress>
        <StructuredAddress>
-       <Line1>[% user.userdata.streetnumber %] [% user.userdata.address %]</Line1>
+       <Line1>[% user.userdata.streetnumber | xml %] [% user.userdata.address | xml %]</Line1>
        [% IF user.userdata.address2 %]
-       <Line2>[% user.userdata.address2 %]</Line2>
+       <Line2>[% user.userdata.address2 | xml %]</Line2>
        [% END %]
        [% IF user.userdata.city %]
-       <Locality>[% user.userdata.city %]</Locality>
+       <Locality>[% user.userdata.city | xml %]</Locality>
        [% END %]
        [% IF user.userdata.state %]
-       <Region>[% user.userdata.state %]</Region>
+       <Region>[% user.userdata.state | xml %]</Region>
        [% END %]
        [% IF user.userdata.zipcode %]
-       <PostalCode>[% user.userdata.zipcode %]</PostalCode>
+       <PostalCode>[% user.userdata.zipcode | xml %]</PostalCode>
        [% END %]
        [% IF user.userdata.country %]
-       <Country>[% user.userdata.country %]</Country>
+       <Country>[% user.userdata.country | xml %]</Country>
        [% END %]
        </StructuredAddress>
      </PhysicalAddress>
@@ -39,8 +39,8 @@ RequestedItem
     <NameInformation>
       <PersonalNameInformation>
         <StructuredPersonalUserName>
-          <GivenName>[% user.userdata.firstname %]</GivenName>
-          <Surname>[% user.userdata.surname %]</Surname>
+          <GivenName>[% user.userdata.firstname | xml %]</GivenName>
+          <Surname>[% user.userdata.surname | xml %]</Surname>
         </StructuredPersonalUserName>
       </PersonalNameInformation>
     </NameInformation>
index 36d7d20..eafd628 100644 (file)
@@ -1,4 +1,4 @@
 <RequestId>
-  <AgencyId>[% requestagency %]</AgencyId>
-  <RequestIdentifierValue>[% messages.request_id %]</RequestIdentifierValue>
+  <AgencyId>[% requestagency | xml %]</AgencyId>
+  <RequestIdentifierValue>[% messages.request_id | xml %]</RequestIdentifierValue>
 </RequestId>
index f51c82f..ef93460 100644 (file)
         [% END %]
      [% END %]
         <ProcessingErrorElement>
-          <ElementName>[% processingerrorelement %]</ElementName>
-          <ProcessingErrorValue>[% barcode %]</ProcessingErrorValue>
+          <ElementName>[% processingerrorelement | xml %]</ElementName>
+          <ProcessingErrorValue>[% barcode | xml %]</ProcessingErrorValue>
         </ProcessingErrorElement>
       </ProcessingError> 
-      <ProblemDetail>[% error_detail %]</ProblemDetail>
+      <ProblemDetail>[% error_detail | xml %]</ProblemDetail>
     </Problem>
   </[% messagetype %]>
 </NCIPMessage>