MI-DPLA / combine

Combine /kämˌbīn/ - Metadata Aggregator Platform
MIT License
26 stars 11 forks source link

xml2kvp: concatenate multi-valued, split to multi-valued #212

Closed ghukill closed 6 years ago

ghukill commented 6 years ago

Provides keys that will undergo concatenation if multi-valued.

e.g., indexing MARC XML, ignoring ind# and code attributes, you can get the following values for the constructed field marc|record___marc|datafield___@tag=245:

['Poeti contemporanei :', 'Prati, Aleardi, Carducci, Praga, Giacosa /', 'Corrado Corradino.']
Kumāratantram.
['Demarcacion de limites con los Estados Unidos del Brasil,', 'Documentos comp. y tr. por Manuel V. Ballivián ...']
["Pierre Ranson, peintre de fleurs et d'arabesques.", "56 planches accompagnées d'une notice et d'un essai de catalogue de l'oeuvre,", 'par Henri Clouzot.']

These lists are looking at record-by-record, but looking at value-by-value, they are deconstructed. Would be helpful to allow concatenation within field, or copy to.

And/or, this might be a good argument for determing sensible order of field copying. As it would be possible to copy marc|record___marc|datafield___@tag=245 to concat_245 with the concatenation applied to concat_245 after the copy.

ghukill commented 6 years ago

Additionally, split field to multi-valued

ghukill commented 6 years ago

Concatenating values works via two args:

Proceeding with splitting...

ghukill commented 6 years ago

Done.