The Extensible Markup Language (XML) has widely become the de facto method for the encoding of stored and shared computer data. For this reason there is an obvious necessity to ensure that information that is deemed sensitive is protected with a method of security or access control. In this book we investigate and present such a method with the introduction of a formal language that can provide an authoritative framework for XML documents. In conjunction with the highly regarded and recognised Role-based Access Control (RBAC) model, we designed a formal language of authorisation for XML documents based on the highly expressive and non-monotonic Answer Set Programming paradigm. With the inherent features of the RBAC model (such as subject and role based structuring, authorisation delegation and propagation, conflict resolution, separation of duty), we developed a formal language capable of specifying a queryable security policy base. Beyond this, we also furthered its expressive nature and capabilities by also incorporating Temporal Logic.