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

Introduce function, that turns object/simple element into array with one position #362

Open TobiasNx opened 3 months ago

TobiasNx commented 3 months ago

When working MARC -> MARC there is a scenario that you have an element that is possibly repeated but does not has to be.

If you want to add an element then you have to create to do some kind of workaround to achieve this.

TobiasNx commented 5 days ago

The function (to_array('path')) would be a wrapper for perhaps:

unless is_array("PATH")
    move_field("field","HELFER")
    move_field("HELFER","field.$append")
end