2013 Volume 30 Issue 4 Pages 4_67-4_81
We have designed and implemented a generator for an XQuery processor using compiler technique. It generates the processor for a valid XML document in lex, yacc source programs from a DTD file and a query. Because it knows which nodes of a document tree are actually accessed before processing an XML document, it can avoid making nodes which are never accessed. We classify join operations into two types, comparison of equality and numerical order. We use a hash method for the former, and a binary search method for the latter. We demonstrated effectiveness of a compiler-type XQuery processor; it runs faster with less memory than an interpreter-type processor.