lib/traject_plus/macros/xml.rb in traject_plus-1.0.0 vs lib/traject_plus/macros/xml.rb in traject_plus-1.1.0

- old
+ new

@@ -8,9 +8,12 @@ # @param namespaces [Hash<String,String>] The namespaces for the xpath query # @param options [Hash] other options, may include :trim def extract_xml(xpath, namespaces, options = {}) lambda do |xml, accumulator, _context| result = xml.xpath(xpath, namespaces).map(&:text) + unless options.empty? + Deprecation.warn(self, "passing options to extract_xml is deprecated and will be removed in the next major release. Use the Traject 3 pipeline instead") + end result = TrajectPlus::Extraction.apply_extraction_options(result, options) accumulator.concat(result) end end end