Recently, plenty of methods dealing with automatic inference of XML schema have been developed; however, most of them utilize XML documents as their only input. In this paper, we focus on extending inference by incorporating XML operations, in particular XQuery queries.
We discuss how can XQuery queries help in improving the inference process and we propose an algorithm based on chosen improvements, extending an existing method of a key discovery. Experimental results are a part of the paper.