You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is a common transform requirement to create a new URI based on an exiting URI, just with a different namespace.
For example, in a transform loop we filter a population dataset and produce a new dataset only containing adults. When we process an entity with entity.ID="ns24:17", where ns24 is a prefix for http://people/. And we want the outgoing entity after filtration to have entity.ID="ns25:17", where ns25 stands for http://adults/.
Currently, this has to be solved using manual string splitting and concatination. E.g.
It is a common transform requirement to create a new URI based on an exiting URI, just with a different namespace.
For example, in a transform loop we filter a population dataset and produce a new dataset only containing adults. When we process an entity with
entity.ID="ns24:17"
, where ns24 is a prefix forhttp://people/
. And we want the outgoing entity after filtration to haveentity.ID="ns25:17"
, where ns25 stands forhttp://adults/
.Currently, this has to be solved using manual string splitting and concatination. E.g.
I am not sure what the utility function(s) should look like exactly. Maybe something like this:
It would not be much conciser, but add robustness for this common use case.
A utility function to extract the namespace/namespace prefix from URIs without manual string splitting would also be welcome.
The text was updated successfully, but these errors were encountered: