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

Specification of cis:if match="all" for field type #7360

Open
PancakeFriday opened this issue Dec 17, 2024 · 3 comments · May be fixed by #7361
Open

Specification of cis:if match="all" for field type #7360

PancakeFriday opened this issue Dec 17, 2024 · 3 comments · May be fixed by #7361

Comments

@PancakeFriday
Copy link

I was using the american-physics-society style for my thesis with Hayagriva and I noticed that webpages wouldn't render properly.

It has the following else-if clause:

<else-if type="post-weblog interview manuscript pamphlet personal_communication post post-weblog speech webpage">

Now the CSL 1.0.2 specification gives the following:

The cs:if and cs:else-if elements may carry the match attribute to control the testing logic, with allowed values:

    “all” - (default), element only tests “true” when all conditions test “true” for all given test values
    “any” - element tests “true” when any condition tests “true” for any given test value
    “none” - element only tests “true” when none of the conditions test “true” for any given test value

According to this, type would have to match all types. I can see how with the BibTeX specification this is not possible, however it's not specifically stated that match="all" still only matches one style. Is that the case? Using the online code editor seems to verify that theory.

Also, for all other conditionals, the american-physics-society.csl does have the match="any" attribute, which adds to the confusion.

@POBrien333
Copy link
Contributor

POBrien333 commented Dec 17, 2024

So, the "all" we use for example when we test for a journal article that has no printed copy to then render the DOI. We'd test for "volume AND page" in such a case, not "volume ANY page" (the any is like an "or".

for the aps.csl that is just an error that it is missing and should be added. However, I see that despite that it not being in the style it's still working. Probably just because a given item can just have ONE item type and could never have 2 item types.

@adam3smith
Copy link
Member

just to be clear (because I think POBrien lost a word somewhere), what's missing in the APS style is match="any"
There should never be a list of item types without match="any"

@github-actions github-actions bot added the waiting-for-response-from-contributor The ticket/pull request is awaiting input from the contributor/depositor label Dec 17, 2024
POBrien333 added a commit to POBrien333/styles that referenced this issue Dec 17, 2024
@POBrien333 POBrien333 linked a pull request Dec 17, 2024 that will close this issue
@POBrien333
Copy link
Contributor

PR made.

@github-actions github-actions bot removed the waiting-for-response-from-contributor The ticket/pull request is awaiting input from the contributor/depositor label Dec 17, 2024
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 a pull request may close this issue.

3 participants