Database Reference
In-Depth Information
COMPRESSIONTYPE , and FILEPATH are Strings, and SEQ is a sequence of Strings.
The terminal symbol ';' represents a carriage return.
XMLTREE ::= '<' NAME '>'; XML* '</' NAME '>'
XML ::= XMLTREE; | FLR;
FLR ::= '{'; (DEFINITION;)* OUTPUT; '}'
DEFINITION ::= FOR | LET
FOR ::= 'for $' NAME 'in' EXPRESSION
LET ::= 'let $' NAME ':=' EXPRESSION
EXPRESSION ::= DOC '/' XPATH | '$' VARIABLE '/' XPATH | SEQ
DOC ::= 'doc(“' FILEPATH '“,”' COMPRESSIONTYPE '“)'
OUTPUT ::= 'return'; XMLRET
XMLRET ::= XMLRETTREE; | '{$' VARIABLE '}';
XMLRETTREE ::= '<' NAME '>'; XMLRET* '</' NAME '>'
1.4 Example Being Used in This Paper
In this paper, we use a short example for illustrating the ideas. Fig. 1 (a) shows the
source document of our example that contains a list of countries and rivers for a con-
tinent and that contains a list of cities for each country. Fig. 1 (b) shows the target
document in which the root element is the element mainland (corresponding to the
element continent of Fig. 1 (a)). Furthermore, the country is renamed to nation and the
rivers are removed. Fig. 1 (c) shows the transformation instruction that allows trans-
forming the source document into the target document.
(1) <cont>
(2) <country>
(3) <city>C1</city>
(4) <city>C2</city>
(5) </country>
(6) <river>
(7) <name>R1</name>
(8) </river>
(9) <country>
(10) <city>C3</city>
(11) </country>
(12) </cont>
(1) <mainland>
(2) <nation>
(3) <city>C1</city>
(4) <city>C2</city>
(5) </nation>
(1) <mainland>
(2) {
(3) for $country in
(4) doc(„file“)/cont/country
(5) let $city := $country/city
(6) return
(7) <nation>
(8) { $city }
(9) </nation>
(10) }
(11) </mainland>
(6) <nation>
(7) <city>C3</city>
(8) </nation>
(9) </mainland>
(a)
(b)
(c)
Fig. 1. (a) source document, (b) target document, (c) transformation instructions
1.5 Paper Organization
This paper is organized as follows: Section 2 summarizes the basic idea and the fun-
damental concepts underlying our approach to transform compressed XML docu-
ments followed by a detailed discussion of the operations needed and how they can be
performed on compressed and on uncompressed XML. The third section outlines
some of the experiments that compare our approach with the existing XQuery evalua-
tor Zorba. Section 4 gives an overview of related work and is followed by the Sum-
mary and Conclusions.
Search WWH ::




Custom Search