Skip to content

Commit

Permalink
Fix #83: Allow personname related elements
Browse files Browse the repository at this point in the history
In regards to personname:

* Allow othername, honorifc, linage
* Restore content model of personname to not
  mix firstname with givenname
  • Loading branch information
tomschr committed Sep 3, 2021
1 parent 8ab378f commit 4758dd5
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 8 deletions.
20 changes: 13 additions & 7 deletions geekodoc/rng/2_5.2/geekodoc-v2.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ include "db52itsxi.rnc"
db.guisubmenu = notAllowed
db.hardware = notAllowed
# db.holder = notAllowed
db.honorific = notAllowed
# db.honorific = notAllowed
# db.imagedata = notAllowed
# db.imageobject = notAllowed
db.imageobjectco = notAllowed
Expand Down Expand Up @@ -349,7 +349,7 @@ include "db52itsxi.rnc"
db.label = notAllowed
# db.legalnotice = notAllowed
db.lhs = notAllowed
db.lineage = notAllowed
# db.lineage = notAllowed
db.lineannotation = notAllowed
# db.link = notAllowed
# db.listitem = notAllowed
Expand Down Expand Up @@ -1448,11 +1448,17 @@ include "db52itsxi.rnc"
## The personal name of an individual
element personname {
db.personname.attlist,
(db.honorific
| db.firstname
| db.surname
| db.lineage
| db.othername)+
( (db.honorific
| db.firstname
| db.surname
| db.lineage
| db.othername)+
| (db.honorific
| db.givenname
| db.surname
| db.lineage
| db.othername)+
)
}
db.person.author.contentmodel =
db.personname,
Expand Down
22 changes: 22 additions & 0 deletions tests/v2/bad/personname-with-givenname.xml
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>
</author>
</info>
<para/>
</article>
1 change: 0 additions & 1 deletion tests/v2/good/geekodoc-v2-flat.rnc

This file was deleted.

22 changes: 22 additions & 0 deletions tests/v2/good/personname-with-givenname.xml
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>

0 comments on commit 4758dd5

Please sign in to comment.