Skip to content

Commit aafd1dc

Browse files
committed
Adds a publisher to the digital preservation feed. Commit ready for merge.
- Legacy-Id: 11530
1 parent eb17c03 commit aafd1dc

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

ietf/doc/feeds.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,12 @@ def root_attributes(self):
8888
def add_item_elements(self, handler, item):
8989
super(Rss201WithNamespacesFeed, self).add_item_elements(handler, item)
9090

91-
for element_name in ['abstract','accessRights', 'format', ]:
91+
for element_name in ['abstract','accessRights', 'format', 'publisher',]:
9292
dc_item_name = 'dcterms_%s' % element_name
9393
dc_element_name = 'dcterms:%s' % element_name
94+
attrs= {'xsi:type':'dcterms:local'} if element_name == 'publisher' else {}
9495
if dc_item_name in item and item[dc_item_name] is not None:
95-
handler.addQuickElement(dc_element_name,item[dc_item_name])
96+
handler.addQuickElement(dc_element_name,item[dc_item_name],attrs)
9697

9798
if 'doi' in item and item['doi'] is not None:
9899
handler.addQuickElement('dcterms:identifier',item['doi'],{'xsi:type':'dcterms:doi'})
@@ -141,6 +142,7 @@ def item_extra_kwargs(self, item):
141142

142143
#TODO
143144
# R104 Publisher (Mandatory - but we need a string from them first)
145+
extra.update({'dcterms_publisher':'rfc-editor.org'})
144146

145147
#TODO MAYBE (Optional stuff)
146148
# R108 License

0 commit comments

Comments
 (0)