schema icon indicating copy to clipboard operation
schema copied to clipboard

Style syntax for related variables

Open denismaier opened this issue 5 years ago • 11 comments

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

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

Checklist

  • [X] 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
  • [X] I have performed a self-review of my own code
  • [] I have included suggested corresponding changes to the documentation (if relevant)

denismaier avatar Sep 05 '20 21:09 denismaier

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.

bwiernik avatar Sep 06 '20 00:09 bwiernik

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.

denismaier avatar Sep 06 '20 07:09 denismaier

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.

bwiernik avatar Sep 06 '20 09:09 bwiernik

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...)

denismaier avatar Sep 06 '20 10:09 denismaier

@related is much more extensible for the future.

bwiernik avatar Sep 06 '20 11:09 bwiernik

So, you say better leave it as is?

denismaier avatar Sep 07 '20 07:09 denismaier

Yes.

bwiernik avatar Sep 07 '20 07:09 bwiernik

I've now also added test syntax.

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

denismaier avatar Sep 07 '20 14:09 denismaier

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 avatar Mar 06 '21 22:03 bdarcus

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 avatar Oct 16 '21 16:10 bdarcus

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

bdarcus avatar Jun 01 '22 13:06 bdarcus