-
-
Notifications
You must be signed in to change notification settings - Fork 59
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 #357
Comments
Isn't it just a related attribute on the appropriate rendering nodes? |
That's not in the schema currently |
Basically, that should just be a new atttibute |
That's all the rendering elements except choose, right? |
We might consider allowing it on |
So, to have |
Yeah, thinking of something like:
versus requiring |
That would also make it clear what should happen when this appears: |
Good idea. |
What if the macro definition has a related attribute and the macro call as well? |
The general inheritance rules are that a lower-level specification overrides an inherited value from higher-up. I think that's fine here. If that shouldn't happen, the style should be written accordingly. |
How would you call a variable with the standard relationship? |
Is that necessary? |
I'm not sure that's really necessary, but that could be accomplished by not setting |
You are probably correct. Another thing I'm thinking of: if we indeed do this, we could change container- and volume- variables to relationships. Because most variables are called by macros anyway, and your suggestion would make having related attributes everywhere obsolete. |
Let's leave that discussion for another day 😏 |
Again: What should happen if you define a macro like so:
And then you call it like that:
I don't think that would make much sense. There maybe should be two variants:
And, of course, definition and call without I fear allowing Is that correct? If yes, is there a way to specify this? Probably not in rnc, but what about schematron? @bdarcus @bwiernik |
I don't think you could do it in RNC. Should be easy in schematron. |
Ok. At least. And what do you think about the overall issue? |
First thoughts (subject to change):
What am I missing? |
The idea is 1. to make macros usable with different relations (e.g. a macro "title" with reviewed and original relations), and 2. to make macro definitions easier (no need to repeat |
I meant only on the macro node; not on sub-elements within it. Is the second worth the cost? |
Sorry, I wasn't clear about the first use case.
Later you call it with:
|
So @bdarcus @bwiernik what do you think? Should we add |
I don't have a strong preference one way or the other on |
I think, Allowing it on Allowing it on An other point that I haven’t seen in this discussion: what about nested relationships? Say, a macro contains a |
I don't know what you mean here. If the macro only contains one element, then it can just be rendered as a single rendering element (but then why is it a macro anyway?).
My thinking was that there would be no nested relationships. We should probably explicitly disallow them in the data schema. |
I agree, but it's not possible or convenient to do this formally, in the JSON schema, at least. Would need to be communicated via documentation. |
What I was thinking of: within a <group delimiter=", ">
<text macro="title"/>
<text macro="issued"/>
<text macro="title" related="original"/>
<text macro="accessed"/>
</group> |
This is why I think we probably shouldn't allow that. The style author should write two macros, or a single macro with whatever conditional logic. |
I’m sorry, I’m missing the reason for not allowing it. |
Concern about complexity, debugging, etc..
I'm not 100% certain on this yet though, so could be convinced otherwise.
|
Is this about nested relations or about |
I think we want to avoid any situation where a block is applied to two different "items" (e.g., the base item, original, reviewed). If that's possible, it's going to be highly prone to incorrect output. |
I see no reason to allow it on With respect to |
How should the processor handle a case of nested groups that contain two
different `@related`s? Or could that be prohibited by the schema?
Brenton M. Wiernik <notifications@github.com> schrieb am Mo., 17. Aug.
2020, 04:12:
… I see no reason to allow it on cs:macro---just put it on a ca:group
inside if needed.
With respect to ***@***.***, I agree that I see too many cases of
ambiguous expectations, that I it would be best to prohibit inheritance of
@related on it.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#357 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABUH4W5OWJZWLJCEWAMD2TSBCGZLANCNFSM4P4WHRUA>
.
|
|
Sorry for my igrnorance: will xml-validators detect that in nested macro calls? |
Oh, you mean in styles, not in data. In styles, this would follow normal inheritance rules--a specified attribute overrides an inherited attribute. |
Ok, coming back to this now. I think I can start a PR in the not so distant future. I propose we add |
That sounds good. At least for CSL 1.1, we should keep the deprecated plain related variables around, with the understanding that |
On keeping these around, see my comment in the PR. |
We need to write the style syntax for calling related items.
The text was updated successfully, but these errors were encountered: