lib/xmpr.rb in xmpr-0.1.0 vs lib/xmpr.rb in xmpr-0.2.0

- old
+ new

@@ -18,11 +18,12 @@ # module XMPR # Namespace shortcuts, and fallbacks for undeclared namespaces. NAMESPACES = { "aux" => "http://ns.adobe.com/exif/1.0/aux/", - "crs" => "http://ns.adobe.com/camera-raw-settings/1.0/", + "cc" => "http://creativecommons.org/ns#", + "crs" => "http://ns.adobe.com/camera-raw-settings/1.0/", "dc" => "http://purl.org/dc/elements/1.1/", "exif" => "http://ns.adobe.com/exif/1.0/", "Iptc4xmpCore" => "http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/", "pdf" => "http://ns.adobe.com/pdf/1.3/", "photoshop" => "http://ns.adobe.com/photoshop/1.0/", @@ -98,11 +99,9 @@ def standalone_value(element, lang:) if alt_element = element.xpath("./rdf:Alt", NAMESPACES).first alt_value(alt_element, lang: lang) elsif array_element = element.xpath("./rdf:Bag | ./rdf:Seq", NAMESPACES).first array_value(array_element) - else - raise "Don't know how to handle:\n#{element}" end end def alt_value(element, lang:) if lang && item = element.xpath("./rdf:li[@xml:lang=#{lang.inspect}]", NAMESPACES).first