I understand that a transaction confirms two other transactions (branch + trunk).
Is there a special semantic or rule for branch and trunk or are this just two words chosen to denote the two referenced transactions?
For most purposes (e.g. determining confirmation status or propagation of transactions) it does not matter which transaction is where.
Inside a bundle, however, it is at some places clearly mandated which transaction has to be the
trunk transaction and the
branch transaction (e.g. when signatures are split between multiple transactions, they have to be chained via the
trunk transaction and not the
branch transaction). This restriction makes it faster for nodes to validate transactions and bundles for formal correctness.