traject_plus 1.3.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d47d5d02e74d7c07596131245fae67f22216eea3d48c77f4580a901d81725c90
|
4
|
+
data.tar.gz: 71eae5b4ad6ab04b38d0c65e5e27c5541cf90816e415bb278da4a17905ba799c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ee90ffd3dc1601c5a5ccdc569127378b08ad9c7b8bb9dce7eca3ec1c15b9c12303bcaf7c0e73bc8d5c5b36bfa467b6cd37d77bd207d397a388862ee418f21ce
|
7
|
+
data.tar.gz: cebf3fda210f12e3e53c9388bbd440ccc2dcd44daf1dcaadc19da2b6ba6283fd06b214b92c5454c8d6cce59203417aa59d42ede8108e144bdfe95dc7435b6d42
|
@@ -6,9 +6,11 @@ module TrajectPlus
|
|
6
6
|
module FGDC
|
7
7
|
NS = { fgdc: 'http://www.fgdc.gov/metadata/fgdc-std-001-1998.dtd' }.freeze
|
8
8
|
|
9
|
+
include Traject::Macros::NokogiriMacros
|
10
|
+
|
9
11
|
# @param xpath [String] the xpath query expression
|
10
|
-
def extract_fgdc(xpath
|
11
|
-
|
12
|
+
def extract_fgdc(xpath)
|
13
|
+
extract_xpath(xpath, ns: NS)
|
12
14
|
end
|
13
15
|
end
|
14
16
|
end
|
@@ -9,9 +9,11 @@ module TrajectPlus
|
|
9
9
|
dc: 'http://purl.org/dc/elements/1.1/',
|
10
10
|
xlink: 'http://www.w3.org/1999/xlink' }.freeze
|
11
11
|
|
12
|
+
include Traject::Macros::NokogiriMacros
|
13
|
+
|
12
14
|
# @param xpath [String] the xpath query expression
|
13
|
-
def extract_mods(xpath
|
14
|
-
|
15
|
+
def extract_mods(xpath)
|
16
|
+
extract_xpath(xpath, ns: NS)
|
15
17
|
end
|
16
18
|
end
|
17
19
|
end
|
@@ -5,9 +5,11 @@ module TrajectPlus
|
|
5
5
|
module Tei
|
6
6
|
NS = { tei: 'http://www.tei-c.org/ns/1.0' }.freeze
|
7
7
|
|
8
|
+
include Traject::Macros::NokogiriMacros
|
9
|
+
|
8
10
|
# @param xpath [String] the xpath query expression
|
9
|
-
def extract_tei(xpath
|
10
|
-
|
11
|
+
def extract_tei(xpath)
|
12
|
+
extract_xpath(xpath, ns: NS)
|
11
13
|
end
|
12
14
|
end
|
13
15
|
end
|
@@ -8,6 +8,8 @@ module TrajectPlus
|
|
8
8
|
# @param namespaces [Hash<String,String>] The namespaces for the xpath query
|
9
9
|
# @param options [Hash] other options, may include :trim
|
10
10
|
def extract_xml(xpath, namespaces, options = {})
|
11
|
+
Deprecation.warn(self, "extract_xml is deprecated and will be removed in the next major release. Use the Traject 3 pipeline instead")
|
12
|
+
|
11
13
|
lambda do |xml, accumulator, _context|
|
12
14
|
result = xml.xpath(xpath, namespaces).map(&:text)
|
13
15
|
unless options.empty?
|
data/lib/traject_plus/version.rb
CHANGED