Skip to content

Commit

Permalink
Merge pull request #3194 from abbistani/ANW-2025
Browse files Browse the repository at this point in the history
ANW-2025 Replace https in XML namespaces with http
  • Loading branch information
thimios committed May 22, 2024
2 parents 1c003fb + a37f886 commit edb8660
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 25 deletions.
10 changes: 5 additions & 5 deletions backend/app/exporters/serializers/dc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@ def serialize_dc(dc, xml)
private

def _root(dc, xml)
schema_locations = "https://purl.org/dc/elements/1.1/ https://dublincore.org/schemas/xmls/qdc/2006/01/06/dc.xsd https://purl.org/dc/terms/ https://dublincore.org/schemas/xmls/qdc/2006/01/06/dcterms.xsd"
schema_locations = "http://purl.org/dc/elements/1.1/ https://dublincore.org/schemas/xmls/qdc/2006/01/06/dc.xsd http://purl.org/dc/terms/ https://dublincore.org/schemas/xmls/qdc/2006/01/06/dcterms.xsd"

dc_root = xml.dc(
'xmlns' => 'https://purl.org/dc/elements/1.1/',
"xmlns:dcterms" => "https://purl.org/dc/terms/",
"xmlns:xlink" => "https://www.w3.org/1999/xlink",
'xmlns:xsi' => 'https://www.w3.org/2001/XMLSchema-instance',
'xmlns' => 'http://purl.org/dc/elements/1.1/',
"xmlns:dcterms" => "http://purl.org/dc/terms/",
"xmlns:xlink" => "http://www.w3.org/1999/xlink",
'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
'xsi:schemaLocation' => schema_locations) {


Expand Down
6 changes: 3 additions & 3 deletions backend/app/exporters/serializers/eac.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,9 @@ def within(xml, node, records)
def _eac(obj, xml)
json = obj.json
xml.send('eac-cpf', { 'xmlns' => 'urn:isbn:1-931666-33-4',
'xmlns:html' => 'https://www.w3.org/1999/xhtml',
'xmlns:xlink' => 'https://www.w3.org/1999/xlink',
'xmlns:xsi' => 'https://www.w3.org/2001/XMLSchema-instance',
'xmlns:html' => 'http://www.w3.org/1999/xhtml',
'xmlns:xlink' => 'http://www.w3.org/1999/xlink',
'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
'xsi:schemaLocation' => 'urn:isbn:1-931666-33-4 https://eac.staatsbibliothek-berlin.de/schema/cpf.xsd',
'xml:lang' => 'eng' }) do
_control(json, xml)
Expand Down
4 changes: 2 additions & 2 deletions backend/app/exporters/serializers/ead.rb
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ def stream(data)

doc = Nokogiri::XML::Builder.new(:encoding => "UTF-8") do |xml|
ead_attributes = {
'xmlns:xsi' => 'https://www.w3.org/2001/XMLSchema-instance',
'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
'xsi:schemaLocation' => 'urn:isbn:1-931666-22-9 https://www.loc.gov/ead/ead.xsd',
'xmlns:xlink' => 'https://www.w3.org/1999/xlink'
'xmlns:xlink' => 'http://www.w3.org/1999/xlink'
}

if data.publish === false
Expand Down
8 changes: 4 additions & 4 deletions backend/app/exporters/serializers/marc21.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ def serialize(marc, opts = {})
private

def _root(marc, xml)
xml.collection('xmlns' => 'https://www.loc.gov/MARC21/slim',
'xmlns:marc' => 'https://www.loc.gov/MARC21/slim',
'xmlns:xsi' => 'https://www.w3.org/2001/XMLSchema-instance',
'xsi:schemaLocation' => 'https://www.loc.gov/MARC21/slim https://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd') {
xml.collection('xmlns' => 'http://www.loc.gov/MARC21/slim',
'xmlns:marc' => 'http://www.loc.gov/MARC21/slim',
'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
'xsi:schemaLocation' => 'http://www.loc.gov/MARC21/slim https://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd') {

xml.record {

Expand Down
8 changes: 4 additions & 4 deletions backend/app/exporters/serializers/marc_auth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ def serialize(marc, _opts = {})
def _marc(obj, xml)
json = obj.json
xml.collection(
'xmlns' => 'https://www.loc.gov/MARC21/slim',
'xmlns:marc' => 'https://www.loc.gov/MARC21/slim',
'xmlns:xsi' => 'https://www.w3.org/2001/XMLSchema-instance',
'xsi:schemaLocation' => 'https://www.loc.gov/MARC21/slim https://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd'
'xmlns' => 'http://www.loc.gov/MARC21/slim',
'xmlns:marc' => 'http://www.loc.gov/MARC21/slim',
'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
'xsi:schemaLocation' => 'http://www.loc.gov/MARC21/slim https://www.loc.gov/standards/marcxml/schema/MARC21slim.xsd'
) do
xml.record do
_leader(json, xml)
Expand Down
12 changes: 6 additions & 6 deletions backend/app/exporters/serializers/mets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ def serialize(data, opts = {})
private

def mets(data, xml, dmd = "mods")
xml.mets('xmlns' => 'https://www.loc.gov/METS/',
'xmlns:mods' => 'https://www.loc.gov/mods/v3',
'xmlns:dc' => 'https://purl.org/dc/elements/1.1/',
'xmlns:xlink' => 'https://www.w3.org/1999/xlink',
'xmlns:xsi' => "https://www.w3.org/2001/XMLSchema-instance",
'xsi:schemaLocation' => "https://www.loc.gov/METS/ https://www.loc.gov/standards/mets/mets.xsd") {
xml.mets('xmlns' => 'http://www.loc.gov/METS/',
'xmlns:mods' => 'http://www.loc.gov/mods/v3',
'xmlns:dc' => 'http://purl.org/dc/elements/1.1/',
'xmlns:xlink' => 'http://www.w3.org/1999/xlink',
'xmlns:xsi' => "http://www.w3.org/2001/XMLSchema-instance",
'xsi:schemaLocation' => "http://www.loc.gov/METS/ https://www.loc.gov/standards/mets/mets.xsd") {
xml.metsHdr(:CREATEDATE => Time.now.iso8601) {
xml.agent(:ROLE => data.header_agent_role, :TYPE => data.header_agent_type) {
xml.name data.header_agent_name
Expand Down
2 changes: 1 addition & 1 deletion backend/app/exporters/serializers/mods.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def serialize(mods, opts = {})

def serialize_mods(mods, xml)
root_args = {'version' => '3.4'}
root_args['xmlns'] = 'https://www.loc.gov/mods/v3'
root_args['xmlns'] = 'http://www.loc.gov/mods/v3'

xml.mods(root_args) {
serialize_mods_inner(mods, xml)
Expand Down

0 comments on commit edb8660

Please sign in to comment.