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

Doesn't work on all valid MARCspec #13

Open
coandco opened this issue Feb 5, 2021 · 2 comments
Open

Doesn't work on all valid MARCspec #13

coandco opened this issue Feb 5, 2021 · 2 comments

Comments

@coandco
Copy link

coandco commented Feb 5, 2021

Hi!
I'm trying to use php-marc-spec to parse the MARCspec 5..$a{^1=3} ("give me the 'a' subfield of all 5xx fields whose first indicator is equal to 3"), but php-marc-spec improperly parses it to lump the subspec in with the subfield:

Array
(
    [0] => 5..$a{^1=3}
    [field] => 5..
    [1] => 5..
    [tag] => 5..
    [2] => 5..
    [subfields] => $a{^1=3}
    [4] => $a{^1=3}
)

Am I missing something? It seems like it should be valid MARCspec.

@cKlee
Copy link
Contributor

cKlee commented Feb 24, 2021

Hi there! I like to look into it. I hope to find time very soon. Sorry for letting you wait.

@raphael-st
Copy link

We have the same problem here. A workaround is to repeat the field and add a backslash to the indicator value.

So, 5..$a{^1=3} would become 5..$a{5..^1=\3}.

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

3 participants