This paper describes an approach to the modular specification of XML processing tasks. The approach is language-oriented: it considers the programs that process a type of XML documents to be processors (e.g., compilers or interpreters) for the markup language used in these documents. In addition, it encourages the declarative specification of these processors through attribute grammars. In doing so, the syntax of the language must be characterized with a context-free grammar, which is equivalent to the schema of the markup language. In turn, the processing of documents must be characterized with semantic attributes and semantic equations added to this context-free grammar. To manage the difficulty of specifying complex tasks, it is possible to split the specification into several attribute grammars, each dealing with a specific aspect of the processing. In addition, each of these attribute grammars can have a different underlying context-free grammar, which conforms to a syntactic view specially tailored for the processing aspect addressed. To make these specifications executable, this paper proposes a processing engine based on GLR parsing and on a demand-driven attribute evaluation method. Also, examples are given of using this approach with a simple XML-based language for coding arithmetic formulas.