Skip to content

Commit

Permalink
Fix #36, allow affiliation inside author
Browse files Browse the repository at this point in the history
* allow jobtitle and orgname in affiliation

Further investigation reveals that some parts need
also changes:

* restrict personname's content model; allow
  affiliation and contrib as optional
* allow text only in contrib
  • Loading branch information
tomschr committed Jan 29, 2018
1 parent 2e5a3be commit 3acc846
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 18 deletions.
45 changes: 30 additions & 15 deletions geekodoc/rng/geekodoc5-flat.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -2546,6 +2546,10 @@ div {
db.jobtitle.role.attribute?
& db.common.attributes
& db.common.linking.attributes
db.jobtitle =

## The title of an individual in an organization
element jobtitle { db.jobtitle.attlist, db._text }
}
div {
db.orgname.class.enumeration =
Expand Down Expand Up @@ -2585,6 +2589,10 @@ div {
& db.common.attributes
& db.common.linking.attributes
& db.orgname.class.attribute?
db.orgname =

## The name of an organization
element orgname { db.orgname.attlist, db._text }
}
div {
db.orgdiv.role.attribute = attribute role { text }
Expand All @@ -2607,14 +2615,6 @@ div {
& db.common.attributes
& db.common.linking.attributes
}
db.person.author.contentmodel =
db.personname,
(db.personblurb
| db.affiliation
| db.email
| db.uri
| db.address
| db.contrib)*
db.org.author.contentmodel =
db.orgname,
(db.orgdiv
Expand Down Expand Up @@ -3092,10 +3092,6 @@ div {
db.contrib.role.attribute?
& db.common.attributes
& db.common.linking.attributes
db.contrib =

## A summary of the contributions made to a document by a credited source
element contrib { db.contrib.attlist, db.all.inlines* }
}
div {
db.honorific.role.attribute = attribute role { text }
Expand Down Expand Up @@ -9758,7 +9754,7 @@ div {
db.acknowledgements = notAllowed
db.acronym = notAllowed
db.address = notAllowed
db.affiliation = notAllowed
# db.affiliation = notAllowed
# db.alt = notAllowed
db.anchor = notAllowed
# db.annotation = notAllowed
Expand Down Expand Up @@ -9904,7 +9900,7 @@ div {
db.issuenum = notAllowed
# db.itemizedlist = notAllowed
db.itermset = notAllowed
db.jobtitle = notAllowed
# db.jobtitle = notAllowed
# db.keycap = notAllowed
db.keycode = notAllowed
# db.keycombo = notAllowed
Expand Down Expand Up @@ -9955,7 +9951,7 @@ div {
# db.orderedlist = notAllowed
db.org = notAllowed
db.orgdiv = notAllowed
db.orgname = notAllowed
# db.orgname = notAllowed
db.otheraddr = notAllowed
# db.othercredit = notAllowed
db.othername = notAllowed
Expand Down Expand Up @@ -10516,6 +10512,23 @@ div {
| db.tip
| db.warning
}
# affiliation
div {
db.affiliation =

## The institutional affiliation of an individual
element affiliation {
db.affiliation.attlist,
(db.jobtitle | db.orgname | (db.jobtitle & db.orgname))
}
}
# contrib
div {
db.contrib =

## A summary of the contributions made to a document by a credited source
element contrib { db.contrib.attlist, text }
}
# entry
# div {
# # Disallow admonitions in table <entry>s
Expand Down Expand Up @@ -10731,6 +10744,8 @@ div {
| db.lineage
| db.othername)+
}
db.person.author.contentmodel =
db.personname, (db.email? & db.affiliation? & db.contrib?)
}
# qandaentry
div {
Expand Down
28 changes: 25 additions & 3 deletions geekodoc/rng/geekodoc5.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ include "docbookxi.rnc"
db.acknowledgements = notAllowed
db.acronym = notAllowed
db.address = notAllowed
db.affiliation = notAllowed
# db.affiliation = notAllowed
# db.alt = notAllowed
db.anchor = notAllowed
# db.annotation = notAllowed
Expand Down Expand Up @@ -329,7 +329,7 @@ include "docbookxi.rnc"
db.issuenum = notAllowed
# db.itemizedlist = notAllowed
db.itermset = notAllowed
db.jobtitle = notAllowed
# db.jobtitle = notAllowed
# db.keycap = notAllowed
db.keycode = notAllowed
# db.keycombo = notAllowed
Expand Down Expand Up @@ -380,7 +380,7 @@ include "docbookxi.rnc"
# db.orderedlist = notAllowed
db.org = notAllowed
db.orgdiv = notAllowed
db.orgname = notAllowed
# db.orgname = notAllowed
db.otheraddr = notAllowed
# db.othercredit = notAllowed
db.othername = notAllowed
Expand Down Expand Up @@ -1063,6 +1063,23 @@ include "docbookxi.rnc"
db.important | db.note | db.tip | db.warning
}

# affiliation
div {
db.affiliation =
## The institutional affiliation of an individual
element affiliation {
db.affiliation.attlist,
(db.jobtitle | db.orgname | (db.jobtitle & db.orgname))
}
}

# contrib
div {
db.contrib =
## A summary of the contributions made to a document by a credited source
element contrib { db.contrib.attlist, text }
}

# entry
#div {
# # Disallow admonitions in table <entry>s
Expand Down Expand Up @@ -1266,6 +1283,11 @@ include "docbookxi.rnc"
| db.lineage
| db.othername)+
}
db.person.author.contentmodel =
db.personname,
(db.email?
& db.affiliation?
& db.contrib?)
}

# qandaentry
Expand Down

0 comments on commit 3acc846

Please sign in to comment.