language-icon Old Web
English
Sign In

DDO-Free XQuery

2017 
XQuery has an order-sensitive semantics in the sense that it requires nodes to be sorted in document order without duplicates (or in Distinct Document Order , DDO for short). This paper shows that for a given XQuery expression and a nested-relational DTD, the input expression can be transformed into an expression that can be evaluated without---potentially costly---ordering operations even if the input query requires its result to be in DDO. To this end, we propose an XQuery transformation algorithm that consists of simple rewriting rules. The basic idea is inspired by a generate-and-test approach as commonly used for solving search problems. We apply this approach when constructing the transformed expression: first, a skeleton query is prepared for the generate phase. This skeleton query can be evaluated without DDO, but it has the ability to return all nodes in DDO for all XML documents that conform to the input DTD. Second, an output expression is generated by injecting conditions for the test phase, which are extracted from the input expression, into the skeleton query. The key to performing both the extraction and injection of conditions in a systematic way is to utilize XQuery transformations that preserve equivalence up to DDO .
    • Correction
    • Source
    • Cite
    • Save
    • Machine Reading By IdeaReader
    23
    References
    1
    Citations
    NaN
    KQI
    []