Abstract. We propose X-Fun, a core language for implementing various Xml standards in a uniform manner. X-Fun is a higher-order functional programming language for transforming data trees based on node selec-tion queries. It can support the Xml data model and XPath queries as a special case. We present a lean operational semantics of X-Fun based on a typed lambda calculus that enables its in-memory implementation on top of any chosen path query evaluator. We also discuss compilers from Xslt, XQuery and XProc into X-Fun which cover the many details of these standardized languages. As a result, we obtain in-memory im-plementations of all these Xml standards with large coverage and high efficiency in a uniform manner from Saxon’s XPath impleme...