I just saw from the Wikipedia's entry on Maximum likelihood, http://en.wikipedia.org/wiki/Maximum_likelihood , the formula
$\mathcal{L}(\theta\,|\,x_1,\ldots,x_n) = f(x_1,x_2,\ldots,x_n\;|\;\theta) = \prod_{i=1}^n f(x_i|\theta).$
Could someone explain if this is formally correct? I mean, I haven't seen the definition of vertical bar in the function parameters and I feel that the mapping $f$ suddenly changes from $\mathbb{R}^n\to \mathbb{R}$ (or maybe $\mathbb{R}^{n+1}\to \mathbb{R}$) to $\mathbb{R}\to\mathbb{R}$ or $\mathbb{R}^2\to\mathbb{R}$.
It is just notation meaning that whatever comes after the vertical bar is treated as fixed. If $X_1,\ldots,X_n$ are random variables whose joint density (or pdf) depends on a parameter, say $\theta$, living in some region $\Theta$, then we can define a function $$ \Theta\times\mathbb{R}^n\ni(\theta,x_1,\ldots,x_n)\mapsto f_\theta(x_1,\ldots,x_n) $$ that for each parameter value $\theta$ and each set of observations $x_1,\ldots,x_n$ returns the density (or pdf) corresponding to $\theta$ evaluated at $(x_1,\ldots,x_n)$.
Note that for fixed $\theta\in\Theta$, the function $$ \mathbb{R}^n\ni(x_1,\ldots,x_n)\mapsto f_\theta(x_1,\ldots,x_n) $$ is the joint density of $(X_1,\ldots,X_n)$ corresponding to that particular value of $\theta$. This is what is often denoted as $(x_1,\ldots,x_n)\mapsto f(x_1,\ldots,x_n\mid \theta)$ since $\theta$ is held fixed.
Now, if $x_1,\ldots,x_n$ are observations of the random variables $X_1,\ldots,X_n$, then the likelihood function is the function $$ \Theta\ni\theta\mapsto f_\theta(x_1,\ldots,x_n) $$ which is often denoted by $\mathcal{L}(\theta\mid x_1,\ldots,x_n)$ since we are varying $\theta$ for a fixed set of observations.