-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
Add label
attribute to names schema
#337
base: v1.1
Are you sure you want to change the base?
Conversation
Used to override the default label rendered for a role. Following the discussion at citation-style-language#293 and https://forums.zotero.org/discussion/84042/tromso-recommendations-for-citation-of-research-data-in-linguistics this lets a user enter a more specific role label without requiring such things to have their own variable types. For example, a linguist might cite the person whose speech they are studying as an `author` with `label: "speaker"`.
That looks really useful, and I'm absolutely in favor of adding this. How will that look like in practice? Will you be able to enter "verb" forms of a label? |
That is a good point. |
This here could work:
But, of course, this will only allow one or the other. Don't know if both are needed... |
@@ -256,6 +256,10 @@ | |||
"description": "E.g. rendered as 'Smith, J. [@JSmith]'", | |||
"type": "string" | |||
}, | |||
"label": { | |||
"title": "Non-default label to use when rendering name", | |||
"description": "Overrides the default label for the role. e.g. to indicate a subtype of a role or specific MARC or CRediT roles." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, don't we need a "type": "string"
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, not sure how this happened (seemed to happen with the last merge I did), but there are multiples places where the $ref syntax got screwed up. We need to add to the python test code to catch these problems in the future.
You can fix by find-replace #definition
-> #/definition
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes this being locale-specific may be an issue. But I assume @bwiernik has already an idea how this could play nicely with #240
He mentions this in this comment, which I missed earlier.
How does this PR relate to the idea in that comment @bwiernik?
Is this really an uncontrolled term name?
Notwithstanding the question of whether to add an enum of controlled values, should probably have a regex pattern to constrain it to a token?
Edit - here's the full MARC list as linked RDF data.
http://id.loc.gov/vocabulary/relators.html
Example:
http://id.loc.gov/vocabulary/relators/abr.html
SKOS RDF:
<rdf:RDF xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/1999/02/22-rdf-schema#" xmlns:cs="http://purl.org/vocab/changeset/schema#" xmlns:skosxl="http://www.w3.org/2008/05/skos-xl#">
<rdf:Description rdf:about="http://id.loc.gov/vocabulary/relators/abr">
<rdf:type rdf:resource="http://www.w3.org/2004/02/skos/core#Concept"/>
<skos:prefLabel>Abridger</skos:prefLabel>
<skos:definition xml:lang="en">A person, family, or organization contributing to a resource by shortening or condensing the original work but leaving the nature and content of the original work substantially unchanged. For substantial modifications that result in the creation of a new work, see author</skos:definition>
<skos:notation>abr</skos:notation>
<skos:inScheme rdf:resource="http://id.loc.gov/vocabulary/relators"/>
</rdf:Description>
</rdf:RDF>
Does anyone have any concerns about this being locale-specific?
We earlier discussed possiblity of a role or type attribute, with a
controlled list, that I imagine would be quite long (say based on the MARC
list).
|
I mean, keep in mind CSL JSON is already being used as an exchange format,
which I expect will increase in the future.
|
I think we perhaps defer this to 1.2? |
Where do we stand on this now? Seems there's some uncertainty. |
Well, we've deferred this to 1.2 |
Seems like maybe we should close this then without merging, given we don't have a target branch, or an idea of what 1.2 would be? Alternately, we need a target branch, but I worry that gets a little complicated. |
I'm happy to add it to 1.1 if you think that's reasonable. |
Before considering that, can you address this concern I raised? |
I suspect this would be used in 2 ways:
|
Right now, the PR only applies to the JSON, with a new property that is just a string, without any examples. Don't we need a more comprehensive solution before actually merging it? I support the basic idea, but seems there are details to sort out? cc @cormacrelf |
The basic detail is, when a name object contains a |
That's simple and clear enough. But isn't it inconsistent with how we handle this sort of thing everywhere else? E.g. it's a completely uncontrolled string, that can't be localized. Or does that not matter in your view? PS - Except I'm unclear how the "term:x" thing fits. That seems another detail. |
@@ -256,6 +256,10 @@ | |||
"description": "E.g. rendered as 'Smith, J. [@JSmith]'", | |||
"type": "string" | |||
}, | |||
"label": { | |||
"title": "Non-default label to use when rendering name", | |||
"description": "Overrides the default label for the role. e.g. to indicate a subtype of a role or specific MARC or CRediT roles." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do think you should add "examples" here, as you see elsewhere in the schema.
Just chiming in in order to support this PR. In German law discipline, we often cite established collected works by their founding editor. For this, labelling the I was directed here from this forum post. |
Used to override the default label rendered for a role.
Following the discussion at #293 and https://forums.zotero.org/discussion/84042/tromso-recommendations-for-citation-of-research-data-in-linguistics this lets a user enter a more specific role label without requiring such things to have their own variable types. For example, a linguist might cite the person whose speech they are studying as an
author
withlabel: "speaker"
.Type of change