The Euler-Lagrange equation is the equation $$\frac{d}{dx}\frac{\partial L}{\partial y'}-\frac{\partial L}{\partial y}=0.$$ I find something ambiguous about this equation. Strictly speaking, $y$ and $y'$ are functions, but we seem to regard them as variables that controls the value of $L$, so that we can differentiate $L$ with respect to $y$ and $y'$. Also, the notation gives me the feeling of "this variable depends on that variable, which depends on yet another variable", which is quite confusing. I would like to restate the Euler-Lagrange equation so that it is easier for me to understand. Here is my attempt.
For a given twice continuously differentiable function $y:[x_1,x_2]\to \Bbb R$, define another function $f_y:[x_1,x_2]\to \Bbb R^3$ by $$f_y(x):=(x,y(x),y'(x)).$$ We also have a function $L:\Bbb R^3\to \Bbb R$ that satisfies some smoothness conditions.
The functional to be minimised would be $$S(y):=\int_{x_1}^{x_2}L\circ f_y.$$
Let $e_2=(0,1,0)$ and $e_3=(0,0,1)$, both being elements in $\Bbb R^3$. Finding directional derivatives of $L$ gives new functions, namely $$\partial_{e_2}L:\Bbb R^3\to \Bbb R$$ and $$\partial_{e_3}L:\Bbb R^3\to \Bbb R.$$
The Euler-Lagrange equation would be written as $$\forall x\in [x_1,x_2],(\partial_{e_3}L\circ f_y)'(x)-(\partial_{e_2}L\circ f_y)(x)=0.$$ Here, the function $$(\partial_{e_3}L\circ f_y)':\Bbb R\to \Bbb R$$ corresponds to $$\frac{d}{dx}\frac{\partial L}{\partial y'},$$ while the function $$\partial_{e_2}L\circ f_y:\Bbb R\to \Bbb R$$ corresponds to $$\frac{\partial L}{\partial y}.$$ This way, the domain and codomain become more explicitly stated.
Is there anything wrong with my interpretation of the Euler-Lagrange equation?
Edit: I would like to explain why I put the extra function $f_y$ there. I am required to total differentiate $\frac{\partial L}{\partial y'}$ with respect to $x$, but $\frac{\partial L}{\partial y'}$ is supposed to be a function with domain being $\Bbb R^3$. I think the three variables depend on $x$, with the rule being $f_y$. The composition $\partial_{e_3}L\circ f_y$ explicitly depends on $x$ and its derivative with respect to $x$ is obvious.