Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

skipIfExpression not matching correctly in import mapping #1507

Open
Monica-Wood opened this issue Oct 4, 2023 · 3 comments
Open

skipIfExpression not matching correctly in import mapping #1507

Monica-Wood opened this issue Oct 4, 2023 · 3 comments

Comments

@Monica-Wood
Copy link

I am trying to put a 'skipGroupIfExpression' options on a date, where it will only import it if contains the term 'bulk'

I am using:

{"skipGroupIfExpression":"^/ead/eadheader/filedesc/titlestmt/date !~ /bulk/"} 

This returns as 'true' no matter what the content is and skips it. If I reverse it with a =~ instead, it always returns false and tries to import it.

Example data in this element: 1982-1992 (bulk 1989-1990)

I've also tried with skipIfExpression with the same results. I am not sure if something has broken with this, or it's because of the EAD XML elements, rather than just calling ^1 like you do with a spreadsheet (has worked in the past with spreadsheets).

Branch: dev/php8

@collectiveaccess
Copy link
Owner

Please try{"skipGroupIfExpression":"^/eadheader/filedesc/titlestmt/date !~ /bulk/"}

@Monica-Wood
Copy link
Author

Confirm this worked. Now to remember this for future.

@collectiveaccess
Copy link
Owner

For XML formats the tag reference structure is "^" + an XPath expression. Those expressions include the root tag. You can alter this by setting a basePath setting on your mapping, if you wish.

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

No branches or pull requests

2 participants