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

Allow personname related elements #91

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

tomschr
Copy link
Contributor

@tomschr tomschr commented Sep 3, 2021

This PR fixes #83.

In regards to personname:

  • Allow othername, honorifc, linage
  • Restore content model of personname to not mix firstname with givenname
  • Add two test cases

It's of low priority for now.

@tomschr tomschr self-assigned this Sep 3, 2021
@tomschr tomschr marked this pull request as ready for review September 3, 2021 13:58
@tomschr tomschr requested a review from a user September 3, 2021 13:58
@tomschr tomschr added enhancement New feature or request geekodoc Version independent general GeekoDoc issues prio:low geekodoc 2️⃣ For GeekoDoc version2 only labels Sep 3, 2021
@tomschr tomschr added this to In progress in GeekoDoc v2.0.0 via automation Sep 6, 2021
In regards to personname:

* Allow givenname, othername, honorifc, and linage
* Restore content model of personname to not
  mix firstname with givenname
Comment on lines +1452 to +1462
( (db.honorific
| db.firstname
| db.surname
| db.lineage
| db.othername)+
| (db.honorific
| db.givenname
| db.surname
| db.lineage
| db.othername)+
)
Copy link

@ghost ghost Sep 6, 2021

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

Suggested change
( (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?)
)

Copy link
Contributor Author

@tomschr tomschr Sep 6, 2021

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.

Comment on lines +14 to +18
<personname>
<givenname>Geeko</givenname>
<givenname>Gecko</givenname>
<surname>Chamaeleon</surname>
</personname>
Copy link

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

Copy link
Contributor Author

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.

@tomschr tomschr removed this from In progress in GeekoDoc v2.0.0 Sep 17, 2021
@tomschr tomschr added this to To do in GeekoDoc v2.1.0 Sep 17, 2021
@tomschr tomschr removed this from To do in GeekoDoc v2.1.0 Sep 17, 2021
@ghost ghost mentioned this pull request Oct 21, 2021
@tomschr tomschr removed the geekodoc Version independent general GeekoDoc issues label Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request geekodoc 2️⃣ For GeekoDoc version2 only prio:low
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow othername & lineage
1 participant