Flavour inclusive, udsc and b fragmentation functions in unbiased jets, and flavour inclusive, udsc, b and gluon fragmentation functions in biased jets are measured in e(+)e(-) annihilations from data collected at centre-of-mass energies of 91.2, and 183-209 GeV with the OPAL detector at LEP. The unbiased jets are defined by hemispheres of inclusive hadronic events, while the biased jet measurements are based on three-jet events selected with jet algorithms. Several methods are employed to extract the fragmentation functions over a wide range of scales. Possible biases are studied in the results obtained. The fragmentation functions are compared to results from lower energy e(+)e(-) experiments and with earlier LEP measurements and are found to be consistent. Scaling violations are observed and are found to be stronger for the fragmentation functions of gluon jets than for those of quarks. The measured fragmentation functions are compared to three recent theoretical next-to-leading order calculations and to the predictions of three Monte Carlo event generators. While the Monte Carlo models are in good agreement with the data, the theoretical predictions fail to describe the full set of results, in particular the b and gluon jet measurements.