This question is about a probable confusion of definitions that I may have somewhere. Also my math knowledge is not too big so I'll try not to get too abstract.
Let's say I have a vector space made of objects called Kets (${|\psi\rangle}$), the ones used in Quantum Mechanics. They have an inner product ${\langle\phi|\psi\rangle}$, and they have continuous (uncountable) dimension. Take an Orthonormal Basis of the space, for example, the eigen-kets of the position operator, ${|x_j\rangle}$, where ${x_j}$ sweeps all the real numbers (as they are all the possible positions).
-Orthonormal means (I think) that the kets satisfy:
${\langle x_a|x_b\rangle=0}$ if a ${\neq}$ b and ${\langle x_a|x_b\rangle=1}$ if a = b.
-Basis means that every ket ${|\psi\rangle}$ can be written as a linear combination of the basis kets. I'm going to take a shot and say that this can be expressed as
$${|\psi\rangle=\int_{-\infty}^\infty dx_i.C(x_i)|x_i\rangle}$$
However, if I turn that into the following expression
$${\langle x_a|\psi\rangle=\int_{-\infty}^\infty dx_i.C(x_i) \langle x_a|x_i\rangle}$$
and then use the Orthonormality condition, I am left with something akin to
$${\langle x_a|\psi\rangle=\int_{x_a}^{x_a} dx_i.C(x_i).1 }$$
which I am pretty sure yields ${\langle x_a|\psi\rangle\neq C(x_a)}$ -in fact it probably yields ${\langle x_a|\psi\rangle=0}$ since the area under a single point of finite height is zero-. This seems totally wrong for the orthonormal basis of a vector space, which makes me think that I there is something wrong somwhere.
-A possible solution to this would be to redefine the concept of orthonormality for such an uncountable vector basis, so that Orthonormal means:
${\langle x_a|x_b\rangle=0}$ if a ${\neq}$ b and ${\langle x_a|x_b\rangle=\infty}$ if a = b, where said ${\infty}$ makes sense inside an integral and yields 1 when integrated. This would indeed then return ${\langle x_a|\psi\rangle= C(x_a)}$.
However, redifining orthonormality also seems kind of iffy. Plus it would imply that ${\langle x_a|x_a\rangle=\infty}$ which is not very encouraging.
So could you tell me how do I make these statements work?
==============
Bonus: A third option could be to say that the expression is not an integral, but a summation of the form
$${|\psi\rangle=\sum_{x_j=-\infty}^\infty C(x_j)|x_j\rangle}$$
where ${x_j}$ sweeps all the real numbers.
Yet I'm sure that such an expression is not correct either.