Integral to obtain the current $I$ from the surface current density $\mathbf{K}$, Griffiths' Intro to Electrodynamics I am reading the 4th Edition of Griffiths' "Introduction to Electrodynamics".
It is not clear to me how to obtain the current $I$ from the surface current density $\mathbf{K}$.
Griffiths presents us the surface current density by considering "a ribbon of infinitesimal width ${\rm d}l_{\perp}$, running parallel to the flow", and defining
$$\mathbf{K} = \frac{{\rm d}\mathbf{I}}{{\rm d}l_{\perp}}$$
as the current per unit width, or - in one of the older versions - "the current per unit width-perpendicular-to-flow" (see the screenshot from an older version from this old post).
That is: let us slice the plane in the direction perpendicular to the flow (${\rm d}l_{\perp}$) and then we will sum (integrate) together all the current infinitesimal $d\mathbf{I}= \mathbf{K} {\rm d}l_{\perp}$ when the moment comes.

Same goes for the volume current density - I am introducing it because it's the only one for which an expression to obtain the current $I$ is given. Let us consider "a tube of infinitesimal cross section ${\rm d}a_{\perp}$ running parallel to the flow". The volume current density is defined as
$$\mathbf{J} = \frac{{\rm d}\mathbf{I}}{{\rm d}a_{\perp}}$$
That is: let us slice the cylinder in this rods of squared base ${\rm d}a_{\perp}$ and then, when the moment comes we will sum (integrate) together all the current infinitesimal $d\mathbf{I}= \mathbf{J} {\rm d}a_{\perp}$.

Now, as I said, an expression with a surface integral is given to obtain the current $I$ flowing through a surface $\mathcal{S}$ from the volume current density
$$I = \int_{\mathcal{S}} J {\rm d}a_{\perp} = \int_{\mathcal{S}} \mathbf{J} \cdot {\rm d}\mathbf{a}$$
where "the dot product serves neatly to pick out the appropriate component of ${\rm d}\mathbf{a}$", that is the dot product selects the infinitesimal areas whose normal is parallel to the flow, i.e. the infinitesimal areas orthogonal to the flow.
But then it is not explained how to obtain the current $I$ from the surface current density $\mathbf{K}$! For consistency with the volume case, where we used a surface integral, one would be tempted to use a line integral in this case
$$ I = \int_{l_{\perp}} \mathbf{K} \cdot {\rm d}\mathbf{l}.$$
Where I am integrating on the side of the plane orthogonal to the flow, $l_{\perp}$.
But I believe this would be $0$, as the scalar product will pick-up the component of $\mathbf{K}$ parallel to ${\rm d}\mathbf{l}$, which is null in this case, since we selected - to begin with - an infinitesimal of length perpendicular to the flow ${\rm d}l_{\perp}$.
So what is a formal, elegant, expression to obtain $I$ from $\mathbf{K}$ with a line integral and why is not provided?
 A: In finding the flux of current through a 2D surface using the 3D current density, the area vector is defined as being perpendicular to the surface.  To use a dot product to find the current crossing a line (or curve), on a 2D surface you would need to define the the dL vector as being perpendicular to the corresponding line segment.  (This is not a standard line integral.)
A: I also cannot find a sufficient explanation for this. The way I have been getting around this is to use the magnitude of equation 5.22 in 4th Edition of Griffiths' "Introduction to Electrodynamics".
Equation 5.22:
$$\mathbf{K} = \frac{{\rm d}\mathbf{I}}{{\rm d}l_{\perp}}$$
Now, the magnitude of $\mathbf{K}$ is:
$$\mathbf{|K|}=\frac{{\rm |d}\mathbf{I|}}{{\rm d}l_{\perp}}$$
or
$$\mathit{K}=\frac{{d}\mathit{I}}{{\rm d}l_{\perp}}$$
Now,
$$\mathit{K}{{\rm d}l_{\perp}} = {dI}$$
so that,
$$I = \int K {\rm d}l_{\perp} $$
By taking the magnitude, you essentially "remove" the dot product from the process because, in this situation, $\mathit{K}$ is perpendicular the $\mathit{l}$ which as you stated, would result in a dot product of zero.
This seems to be what Griffiths does in Example 5.8 considering the amperian loop he has drawn is perpendicular to $\mathit{K}$.
I still think my interpretation of this is incorrect somehow, but this way works for solving examples and problems involving surface currents in this textbook. If someone else has a better explanation please let us know!
