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

Style syntax for related variables #375

Open
wants to merge 13 commits into
base: v1.1
Choose a base branch
from
Open

Style syntax for related variables #375

wants to merge 13 commits into from

Conversation

denismaier
Copy link
Member

Description

This adds syntax for calling related variables.
Overall, I think this should be a simple change. The only shortcoming I see is that it won't be possible to call name variables on different levels from a single cs:names element. (Don't know if that's a real problem.)

Closes #357

Type of change

  • New feature (non-breaking change which adds functionality)
  • This change requires a documentation update

Checklist

  • I have installed the repo pre-commit hook; if not, and I have modified any of the schema files, I have run trang and/or prettier on the files, per CONTRIBUTING
  • I have performed a self-review of my own code
  • [] I have included suggested corresponding changes to the documentation (if relevant)

@denismaier denismaier added this to the CSL 1.1 milestone Sep 5, 2020
@bwiernik
Copy link
Member

bwiernik commented Sep 6, 2020

I don't think that's a real problem. Rendering both standard and related names just requires a group in that case, and allowing otherwise would be messy with the multiple="combine" attribute.

@denismaier
Copy link
Member Author

Another problem: if we keep
original-title, what happens if you call text variable="original-title" related="original".
Probably related to my question on testing syntax.

@bwiernik
Copy link
Member

bwiernik commented Sep 6, 2020

I think that would just be empty---I don't think anyone would write that and processors don't need to design any special case around that.

@denismaier
Copy link
Member Author

denismaier commented Sep 6, 2020

We could disallow it on styles. But that would be complicated. But maybe it's not necessary.
What would you think about another syntax: text original-variable="title"' instead of @related? (That wouldn't work on cs:group though...)

@bwiernik
Copy link
Member

bwiernik commented Sep 6, 2020

@related is much more extensible for the future.

@denismaier
Copy link
Member Author

So, you say better leave it as is?

@bwiernik
Copy link
Member

bwiernik commented Sep 7, 2020

Yes.

@denismaier
Copy link
Member Author

I've now also added test syntax.

Also, I've changed the wording from @related to @relation. Ok with that?

schemas/styles/csl.rnc Show resolved Hide resolved
@bwiernik bwiernik self-requested a review September 7, 2020 21:45
@bdarcus
Copy link
Member

bdarcus commented Mar 6, 2021

Sorry I've been MIA. At some point (hopefully soon) I'll get back to these.

I note this has conflicts that need resolving, though.

@bdarcus
Copy link
Member

bdarcus commented Oct 16, 2021

Just bumping this. Where does it stand?

I am assuming, @denismaier, the conflicts will need to be resolved by rebasing this branch on v1.1. See what happens if you do this from the branch dir:

git rebase v1.1
git push --force-with-lease

@bdarcus
Copy link
Member

bdarcus commented Jun 1, 2022

If and when we do get back this, see note above, and a couple of example fragments would be helpful in the main post.

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 this pull request may close these issues.

Add tests for related variables Style syntax for @related variables
3 participants