-
Notifications
You must be signed in to change notification settings - Fork 5
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
Rethink PICA Path Expression syntax #66
Comments
New grammar:
|
No, not for me. I'm working primarily with Catmandu, PICA & MARC. I aligned the I would be fine with the change of the occurrence syntax if we keep the rest aligned with |
The subfield x is also very essential. It often contains a counter. Would be nice to have this possibility also:
In MARCspec this ist a subspec. |
Ok, so different occurrences syntax cannot be solved without breaking changes - unless position only makes sense in combination with subfields, so we can differentiate whether How about the other extensions to express multiple subfields? |
I suggest to discuss this with @phochste and see if we should implement them for pica_map() and marc_map(). |
I'm still using this thread to collect ideas of possible changes and extension before discussion whether and which to implement. So far:
|
What is the benefit of allowing whitespace? |
Improve readability and most important same consistent syntax as WinIBW rules. We might strip whitespace but if string templates are allowed this gets complex and has little benefit anyway. |
In favor of not supporting whitespace and string templates, the remaining issues are:
|
ok
To transform the path in "clients" like Could you create a developer release or branch with the new syntax? I would refactor the Catmandu modules based on that. Not sure when I will have time for this... |
I thought about adding the functionality only in the |
Closed in favor of #109, #108 and #97. Use of |
The PICA Path expression syntax is aligned with MARCSpec but this has some drawbacks:
123A[01]
) differs from syntax used in PICA Plain serialization format (123A/01
)I think WinIBW compatibility is more important than MARCSpec compatibility.
Examples from WinIBW Excel export:
021A
Full field022A/00
Full field, select occurrence004A $A
Subfield029A $8 $a
Multiple subfields, implicit OR021A $a+$d
Multiple subfields, explicit AND021A $a+" : $d
String templateThere are two issues here:
/
instead of[..]
By now the syntax for multiple subfields is implicit AND (
021A $ad
), we could extend to explicit form021A $a+$d
, add implicit OR029A $8 $a
and string templates. Does WinIBW support escapes in string templates? I'd expect JSON escaping rules, no?I'd deprecate current position syntax with
/
and use the slash as alternative syntax for occurrences as well.The text was updated successfully, but these errors were encountered: