metafacture / metafacture-fix

Work in progress towards an implementation of the Fix language for Metafacture
Apache License 2.0
6 stars 2 forks source link

Add function to delete all source elements at once #335

Open TobiasNx opened 10 months ago

TobiasNx commented 10 months ago

Catmandu has for marc21 a variable record that can be used to remove all elements of the source data. Since record can be a element name, I would suggest a function remove_sourceRecord or something like that to delete all source elements.

blackwinter commented 10 months ago

Catmandu has for marc21 a variable record that can be used to remove all elements of the source data.

Can you provide a link to the documentation?

TobiasNx commented 10 months ago

https://librecatproject.wordpress.com/2014/12/19/day-xx-marc-to-dublin-core-12/#comment-15162 No link for the documentation but @phochste told me this.

blackwinter commented 10 months ago

So it's not a "variable", just a regular field. Metafix doesn't have/need this field, but instead operates on the record itself.

How is your proposed remove_sourceRecord different from remove_field(*) or reject()?

blackwinter commented 10 months ago

Oh, I see, you want to remove the source fields, but keep any newly added fields? Without having to explicitly enumerate them in retain()?

Not sure if this is feasible, but it's certainly a use case.