Ubiquitous Web systems have to deal with varying context information in order to support context awareness. Accomplishing this requirement necessitates gathering, processing and representing that information, so that it can be used for adapting Web applications. In this paper we propose a mechanism for modeling dynamically changing context information like user’s device capabilities and location. Furthermore we show how this modeling mechanism can be integrated into context-aware system architectures. With the aid of this approach we are able to perform a device- and location-aware online document generation of Web documents for mobile appliances. Categories and Subject Descriptors H.5.4 [Hypertext/Hypermedia]: Architectures. H.3.4 [Systems and Software]: User profiles and alert services. General Terms Management, Measurement, Design. Keywords Context modeling, context-awareness, device independence, ubiquitous computing, location-based services