ff: recover ncip template lost in code migration
authorBill Erickson <berick@esilibrary.com>
Thu, 6 Mar 2014 19:11:17 +0000 (14:11 -0500)
committerBill Erickson <berick@esilibrary.com>
Thu, 6 Mar 2014 19:11:17 +0000 (14:11 -0500)
Signed-off-by: Bill Erickson <berick@esilibrary.com>

Open-ILS/src/templates/ncip/v1/CreateItem.tt2 [new file with mode: 0644]

diff --git a/Open-ILS/src/templates/ncip/v1/CreateItem.tt2 b/Open-ILS/src/templates/ncip/v1/CreateItem.tt2
new file mode 100644 (file)
index 0000000..32d26bd
--- /dev/null
@@ -0,0 +1,61 @@
+[%- USE date -%]
+<?xml version = '1.0' encoding='UTF-8'?>
+<!DOCTYPE NCIPMessage PUBLIC "-//NISO//NCIP DTD Version 1//EN" 
+    "http://www.niso.org/ncip/v1_0/imp1/dtd/ncip_v1_0.dtd">
+
+<NCIPMessage version="http://www.niso.org/ncip/v1_0/imp1/dtd/ncip_v1_0.dtd">
+  <CreateItem> 
+    <InitiationHeader> 
+      <FromAgencyId> 
+        <UniqueAgencyId> 
+          <Scheme>[% ff_agency_uri | xml %]</Scheme> 
+          <Value>[% ff_agency_name | xml %]</Value> 
+        </UniqueAgencyId> 
+      </FromAgencyId> 
+      <ToAgencyId> 
+        <UniqueAgencyId> 
+          <Scheme>[% ils_agency_uri | xml %]</Scheme>
+          <Value>[% ils_agency_name | xml %]</Value> 
+        </UniqueAgencyId> 
+      </ToAgencyId> 
+    </InitiationHeader> 
+    <MandatedAction>
+      <DateEventOccurred>[% date.format(date.now, '%FT%T%z') %]</DateEventOccurred>
+    </MandatedAction>
+    <UniqueItemId> 
+      <UniqueAgencyId> 
+        <Scheme>[% ff_agency_uri | xml %]</Scheme>
+        <Value>[% ff_agency_name | xml %]</Value> 
+      </UniqueAgencyId> 
+      <ItemIdentifierValue>[% item.barcode | xml %]</ItemIdentifierValue> 
+    </UniqueItemId> 
+    <BibliographicDescription> 
+      [% IF item.author %]<Author>[% item.author | xml %]</Author>[% END %]
+      [% IF item.title %]<Title>[% item.title | xml %]</Title>[% END %]
+    </BibliographicDescription> 
+    [% IF item.call_number %]
+    <ItemDescription>
+        <CallNumber>[% item.call_number | xml %]</CallNumber>
+    </ItemDescription>
+    [% END %]
+    [% IF item.owning_lib %]
+    <Location>
+      <LocationType>
+        <Scheme>http://www.niso.org/ncip/v1_0/imp1/schemes/locationtype/locationtype.scm</Scheme>
+        <Value>Permanent Location</Value> 
+      </LocationType>
+      <LocationName>
+        <LocationNameInstance>
+          <LocationNameLevel>1</LocationNameLevel>
+          <LocationNameValue>[% item.owning_lib %]</LocationNameValue>
+        </LocationNameInstance>
+      </LocationName>
+    </Location>
+    [% END %]
+  </CreateItem> 
+</NCIPMessage> 
+
+
+[%# 
+vim:sw=2:ts=2:sts=2:ft=tt2html
+%]