30.08.2014 Views

url - Universität zu Lübeck

url - Universität zu Lübeck

url - Universität zu Lübeck

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

3.2. A MODEL FOR PATH EXPRESSIONS 47<br />

has the following representation in the model:<br />

n 0 = (0, element, ”item” , λ, λ, {n 1 , n 3 })<br />

n 1 = (1, element, ”name” , λ, n 0 , {n 2 })<br />

n 2 = (2, text, λ, ”SinusMP 3P layer” , n 1 , ∅)<br />

n 3 = (3, element, ”location” , λ, n 0 , {n 4 })<br />

n 4 = (4, text, λ, ”Luebeck, Germany” , n 3 , ∅)<br />

The node n o is the root node of the tree model; it is the only node with λ as parent<br />

node.<br />

<br />

Definition 3 (Function t.nodes)<br />

The function t.node : T → P(N) is called on an XML data t ∈ T and returns all<br />

nodes of t. The function is defined as follows:<br />

t.nodes ::= {n ∈ N|n is a node of t}<br />

<br />

Definition 4 (Function t.root)<br />

For an XML data t ∈ T the function t.root : T → N returns the root node of the<br />

tree model of t. The function is defined as follows:<br />

t.root ::= n with n ∈ t.nodes is the root node<br />

<br />

Based on this simple model for XML data we define a model for path expressions<br />

as follows:<br />

3.2 A Model for Path Expressions<br />

XPath is an essential fundamental of this thesis that is used at various places, especially<br />

for defining indexes and database operations. In order to analyze theoretical<br />

properties of XPath and to implement the index system we need an abstract<br />

and formal model of XPath that is more precise than the semantic description<br />

given in [126].<br />

Because not all features of XPath are required in this thesis, a restricted subset of<br />

XPath is defined formally. This is done to keep the model and the implementation<br />

simple and manageable without loosing most of XPath’s expressiveness.<br />

The restrictions of the XPath fragment are as follows<br />

• The attribute-axis is omitted because attributes are not supported by the<br />

underlying XML model. This is also done because attributes do not significantly<br />

increase the expressiveness of XML (see 2.1.2).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!