From a37f8862f0cca4788034c972987a1494bb23f0a1 Mon Sep 17 00:00:00 2001 From: Brian Harrington Date: Tue, 7 May 2024 15:18:45 -0400 Subject: [PATCH] Replace https in XML namespaces with http --- backend/app/exporters/serializers/dc.rb | 10 +++++----- backend/app/exporters/serializers/eac.rb | 6 +++--- backend/app/exporters/serializers/ead.rb | 4 ++-- backend/app/exporters/serializers/marc21.rb | 8 ++++---- backend/app/exporters/serializers/marc_auth.rb | 8 ++++---- backend/app/exporters/serializers/mets.rb | 12 ++++++------ backend/app/exporters/serializers/mods.rb | 2 +- 7 files changed, 25 insertions(+), 25 deletions(-) diff --git a/backend/app/exporters/serializers/dc.rb b/backend/app/exporters/serializers/dc.rb index 6ab9175723..f5df40083c 100644 --- a/backend/app/exporters/serializers/dc.rb +++ b/backend/app/exporters/serializers/dc.rb @@ -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) { diff --git a/backend/app/exporters/serializers/eac.rb b/backend/app/exporters/serializers/eac.rb index 3ede0190f1..34d8342c23 100644 --- a/backend/app/exporters/serializers/eac.rb +++ b/backend/app/exporters/serializers/eac.rb @@ -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) diff --git a/backend/app/exporters/serializers/ead.rb b/backend/app/exporters/serializers/ead.rb index 8c853ee69b..4d02412ca9 100644 --- a/backend/app/exporters/serializers/ead.rb +++ b/backend/app/exporters/serializers/ead.rb @@ -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 diff --git a/backend/app/exporters/serializers/marc21.rb b/backend/app/exporters/serializers/marc21.rb index f54a56eb4c..6abb69def6 100644 --- a/backend/app/exporters/serializers/marc21.rb +++ b/backend/app/exporters/serializers/marc21.rb @@ -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 { diff --git a/backend/app/exporters/serializers/marc_auth.rb b/backend/app/exporters/serializers/marc_auth.rb index a0792d2a85..335f7aa531 100644 --- a/backend/app/exporters/serializers/marc_auth.rb +++ b/backend/app/exporters/serializers/marc_auth.rb @@ -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) diff --git a/backend/app/exporters/serializers/mets.rb b/backend/app/exporters/serializers/mets.rb index 2640d1269b..91f0146dcd 100644 --- a/backend/app/exporters/serializers/mets.rb +++ b/backend/app/exporters/serializers/mets.rb @@ -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 diff --git a/backend/app/exporters/serializers/mods.rb b/backend/app/exporters/serializers/mods.rb index 98f0859701..565d96fb9a 100644 --- a/backend/app/exporters/serializers/mods.rb +++ b/backend/app/exporters/serializers/mods.rb @@ -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)