Issues related to updating data in native XML database systems are studied extensively nowadays. In this work we consider a problem of updating typed XML documents having their schema described by a Document Type Definition (DTD) without breaking their validity and with ensured transaction consistency. We present a way how to express constructs available in DTD by using a functional framework and propose algorithms for performing insert, replace and delete operations. This solution is an intermediate step we need for our ongoing research