#### [SOLVED] How is the "normalisation" of non-normalizable states chosen?

This question is about non-normalisable states in quantum mechanics, e.g. the eigenstates of the position operator $|x\rangle$ which are defined by the eigenvalue equation

$$\tag{1} \hat{X}|x\rangle = x|x\rangle.$$

Since the spectrum of the operator is continuous, the states are not square normalisable. Instead one has an equation such as

$$\tag{2} \langle x'|x\rangle = \delta(x-x')$$

which gives the overlap meaning as a distribution. However it is clear that there is still at least an ambiguity in choosing a constant, i.e. why no have

$$\langle x'|x\rangle = a \times \delta(x-x')$$

where $a$ is $a \in \mathbb{R}$.

So I went to see how Equation (2) is derived. In Schleich's textbook on quantum optics in phase space I found the following, very short and in my opinion not clear/complete derivation.

From Equation (1) which can be taken to be the definition of the position operator and the assumption that the operator is hermitian which is a fundamental postulate of quantum mechanics one obtains:

$$\tag{3} \left( x - x' \right) \langle x'|x\rangle = 0.$$

That was easy so far, but then Schleich jumps immediately to equation (2). But the solutions for $\langle x'|x\rangle$ of (3) are all functions/generalised functions that are non-zero everywhere except at $x=x'$. So my question is: Why is (2) the unique solution? Where does the additional information come from?

My suspicion is that we impose another requirement, which is probably the completeness of the states, which would make (2) clear since it is the identity element in the position representation.