-
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?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<?xml-model href="geekodoc-v2-flat.rnc" type="application/relax-ng-compact-syntax"?> | ||
<article xmlns="http://docbook.org/ns/docbook" version="5.2"> | ||
<title>Bad names</title> | ||
<info> | ||
<author> | ||
<personname> | ||
<firstname>Tux</firstname> | ||
<givenname>Tix</givenname> | ||
<surname>Penguin</surname> | ||
</personname> | ||
</author> | ||
<author> | ||
<personname> | ||
<givenname>Geeko</givenname> | ||
<givenname>Gecko</givenname> | ||
<surname>Chamaeleon</surname> | ||
</personname> | ||
Comment on lines
+14
to
+18
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. Good catch. Actually one of the |
||
</author> | ||
</info> | ||
<para/> | ||
</article> |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<?xml-model href="geekodoc-v2-flat.rnc" type="application/relax-ng-compact-syntax"?> | ||
<article xmlns="http://docbook.org/ns/docbook" version="5.2"> | ||
<title>Good names</title> | ||
<info> | ||
<author> | ||
<personname> | ||
<firstname>Tux</firstname> | ||
<surname>Penguin</surname> | ||
</personname> | ||
</author> | ||
<author> | ||
<personname> | ||
<givenname>Geeko</givenname> | ||
<givenname>Gecko</givenname> | ||
<surname>Chamaeleon</surname> | ||
<lineage>Jr.</lineage> | ||
</personname> | ||
</author> | ||
</info> | ||
<para/> | ||
</article> |
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.)
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.
It's not from me, it's DocBook's content model for
personname
(minus thedb._text
pattern):Original content model for personname in DocBook 5
The reason for that was to use DocBook's own content model.
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. 🤷♂️
Technically, it does work. If you want to avoid an order, use the interleave pattern (
&
). The stylesheets picks the respective elements, seecommon/common.xsl
, named templateperson.name
.If you add a
@role
attribute topersonname
, it can even pick and arrange the elements to format the name (valid values arefamily-given
,last-first
, andfirst-last
). So the order of these elements are quite irrelevant.