There's no easy way to do this, because PlantUML doesn't give a syntax that allows to relate lines. The best you could achieve is this:
You can achieve this by association two elements and creating a pair of the same elements, e.g. (Account, Person)
.This creates a composite element with two line segments related by the dot. You can then relate both pairs with ...
to get a dotted line, and name this relation by adding a trailing : {xor}
:
@startuml
skinparam style strictuml
class Account
class Person
class Corporation
Account -- Person
Account -- Corporation
(Account,Person) ... (Corporation,Account) : {xor}
@enduml
Another alternative is to use a comment box to include the constraint. This is by the way the usual notation when attaching a constraint to an element. You can then combine the pairing techniques with a note attached to each of the pairs (source: this tutorial in French):
@startuml
skinparam style strictuml
class Account
class Person
class Corporation
Account -- Person
Account -- Corporation
note "{xor}" as N #white
(Account,Person) .. N
N .. (Account,Corporation)
@enduml
In reality such constraints should be minimized as much as possible, because they often only hide a missing abstraction. I would therefore not use the {xor} and rather consider :
By the way, the grouping of multiple inheritance relations is also achieved with pairing, as explained here.