1. A method for exporting at least a portion of a relational database to an XML document, comprising the steps of: obtaining an initial view query that defines an XML view on said relational database and an XSLT stylesheet specifying at least one transformation; modifying said initial view query to account for an effect of said at least one transformation specified in said XSLT stylesheet; applying said modified view query that accounts for said effect of said at least one transformation specified in said XSLT stylesheet to said relational database to obtain said XML document; generating a first graph representing processing done by said XSLT stylesheet; and combining said first graph with a second graph to produce a combined graph, wherein said second graph represents said initial view query by matching pairs of nodes from the first and second graphs and wherein said combined graph is a context transition graph for an XSLT stylesheet executed on said initial view query.