• Keine Ergebnisse gefunden

XML and Programming Languages

N/A
N/A
Protected

Academic year: 2022

Aktie "XML and Programming Languages"

Copied!
1
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Third exercise sheet for the lecture

XML and Programming Languages

Dr. Janis Voigtl¨ander Summer Term 2009

Exercise 7

Give the unabbreviated versions of the following CoreXPath queries, and describe their semantics relative to a context node n:

1. ..[self::σ]

2. .//σ[ancestor-or-self::∗/δ]

3. .//σ/ancestor-or-self::∗ 3

Exercise 8

Discuss the semantic equivalence or inequivalence of the path expressions /descendant::test[q]

and

//test[q]

for arbitrary test and q, using the formal semantics. 3 Exercise 9

In XPath, it is possible to have several filter expressions in a single navigation step, i.e., “axis::test[q1]· · ·[qk]” instead of just “axis::test[q]”. The semantics is given by successive filtering in left-to-right order.

1. Why is this feature superfluous in CoreXPath, and thus has been omit- ted from our formalization?

2. What is the situation for full XPath? 3

Exercise 10

Assume we wanted to allow unions “∪” anywhere in path expressions, rather than just at top-level. What changes to the CoreXPath syntax and the semantic functions would be necessary? Would there be an expressivity

gain? 3

Referenzen

ÄHNLICHE DOKUMENTE

In fact, we can create equivalence classes of terms that differ only in the names of bound variables. When working with the lambda calculus, it is convenient to think about

In other words, if we dropped subsumption completely (after refining the application rule), we would still be able to give types to exactly the same set of terms — we just would not

This is not quite so easy, though there are a number of attempts to solve this problem: Visitor pattern, Object algebras, … (We’ll learn more about them in the course of

I Axiomatic semantics tries to give a meaning of a programming construct by giving proof rules. This means we have to put them into relation with each other, and show that

A regular expression is deterministic if the FSA built from it using the construction in the lecture has no two transitions (q, σ, q ′ ) and (q, σ, q ′′ ) with q ′ 6= q

Is it then possible to detect, among those only, the string representations of tree documents valid with respect to d.. Try to formalize a notion of weak validation capturing the

Discuss the general complexity, in terms of query size and data size, of query evaluation using the alternative CoreXPath semantics, under the assumption that operations like F axis ,

Check query containment for each combination of the following CoreXPath expressions: a/b/c, a/b[c]/∗, a/b[∗]/c, a/∗/c,