Skip to content

Add custom x3ml:uuid xpath function.#166

Open
aindlq wants to merge 1 commit intoisl:masterfrom
aindlq:custom-uuid-xpath-function
Open

Add custom x3ml:uuid xpath function.#166
aindlq wants to merge 1 commit intoisl:masterfrom
aindlq:custom-uuid-xpath-function

Conversation

@aindlq
Copy link

@aindlq aindlq commented Jul 2, 2024

In MIDAS mappings for PHAROS we have a situation where if some ID element is defined then we want to use it's value as part of URI or otherwise generate UUID based on number of elements.

Without this change the whole mapping needs to be duplicated with different generators based on exist/not exist of that element.

With this change we can simply do something like:

(if (a2606) then a2606 else x3ml:uuid(lower-case(concat(a2700, a2690, a2664))))

and if a2606 is defined we get work/ID if it doesn't then we get work/UUID.

Signed-off-by: Artem Kozlov <artem@rem.sh>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant