A knowledge-based framework for e-learning in heterogeneous pervasive environments