The fragmentation functions $D(z)$ describe properties of partons and are therefore the same, no matter how the partons are produced. Consider the inclusive leptoproduction cross section $\sigma(\mathrm{ep} \rightarrow \mathrm{hX})$ and show that
$$
\frac{1}{\sigma} \frac{d \sigma}{d z}(\mathrm{ep} \rightarrow \mathrm{hX})=\frac{\sum_{q} e_{q}^{2} f_{q}(x) D_{q}^{h}(z)}{\sum_{q} e_{q}^{2} f_{q}(x)}
$$
where $f_{q}(x)$ are the proton structure functions of Chapter 9, see Fig. 11.6. The sum runs over the quarks and antiquarks that can be a parent of $h$.