-
Notifications
You must be signed in to change notification settings - Fork 5
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
Allow personname related elements #91
base: main
Are you sure you want to change the base?
Conversation
e158b0b
to
4758dd5
Compare
In regards to personname: * Allow givenname, othername, honorifc, and linage * Restore content model of personname to not mix firstname with givenname
4758dd5
to
a285380
Compare
( (db.honorific | ||
| db.firstname | ||
| db.surname | ||
| db.lineage | ||
| db.othername)+ | ||
| (db.honorific | ||
| db.givenname | ||
| db.surname | ||
| db.lineage | ||
| db.othername)+ | ||
) |
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.
Is it helpful to have +
at the end? I guess the question is whether e.g. if your last name is something Spanish, would you write <surname>Garcia</surname><surname>Lopez</surname>
or <surname>Garcia Lopez</surname>
? I guess it would be the latter, because that's not just less markup but also preempts unwanted name reordering.
Do you think this might work? (It's a bit of an issue that this codifies an order, but I don't know if that can be avoided.)
( (db.honorific | |
| db.firstname | |
| db.surname | |
| db.lineage | |
| db.othername)+ | |
| (db.honorific | |
| db.givenname | |
| db.surname | |
| db.lineage | |
| db.othername)+ | |
) | |
( db.honorific?, | |
db.givenname?, | |
db.othername?, | |
db.surname, | |
db.lineage?) | |
) |
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.
Is it helpful to have + at the end?
It's not from me, it's DocBook's content model for personname
(minus the db._text
pattern):
Original content model for personname in DocBook 5
db.personname =
## The personal name of an individual
element personname {
db.personname.attlist,
(db._text
| (db.honorific
| db.firstname
| db.surname
| db.lineage
| db.othername)+
| (db.honorific
| db.givenname
| db.surname
| db.lineage
| db.othername)+)
}
The reason for that was to use DocBook's own content model.
I guess the question is whether e.g. if your last name is something Spanish, would you write
<surname>Garcia</surname><surname>Lopez</surname>
or<surname>Garcia Lopez</surname>
?
Names are complicated. DocBook's markup is useful for maybe ~80-90% of all names. Not all names can be appropriately marked up. For example, some Gaelic names are even more difficult for DocBook.
Back to your question: I'm not familiar with Spanish names. It probably depends a bit on how the last name (or surname) is perceived. Are both parts independent from each other? Or are they an integral part and can't be separated? I don't know. 🤷♂️
Do you think this might work? (It's a bit of an issue that this codifies an order, but I don't know if that can be avoided.)
Technically, it does work. If you want to avoid an order, use the interleave pattern (&
). The stylesheets picks the respective elements, see common/common.xsl
, named template person.name
.
If you add a @role
attribute to personname
, it can even pick and arrange the elements to format the name (valid values are family-given
, last-first
, and first-last
). So the order of these elements are quite irrelevant.
<personname> | ||
<givenname>Geeko</givenname> | ||
<givenname>Gecko</givenname> | ||
<surname>Chamaeleon</surname> | ||
</personname> |
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 don't understand this -- "Geeko Gecko Chamaeleon" (given/given/sur) is a test case for a bad name, but "Geeko Gecko Chamaeleon jr." (given/given/sur/lineage) is a test case for a good name. Sound dodgy. :)
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.
Good catch. Actually one of the givenname
should be firstname
.
This PR fixes #83.
In regards to
personname
:othername
,honorifc
,linage
personname
to not mixfirstname
withgivenname
It's of low priority for now.