E-Commerce Tech Homework for CSC 513: XML & XPath/XQuery Metaphors - Prof. Singh, Assignments of Computer Science

A homework assignment for the csc 513 e-commerce technologies course, focusing on metaphors for handling xml and statements about xpath and xquery. The assignment includes three problems, with a total of 36 points. Problem 1 asks for four metaphors for handling xml, while problem 2 requires identifying true statements about xpath and problem 3 about xquery.

Typology: Assignments

Pre 2010

Uploaded on 03/10/2009

koofers-user-vq8
koofers-user-vq8 🇺🇸

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CSC 513
E-Commerce Technologies
H2
1/10/2007 (Write your name above)
Problem 1 2 3 Total
Points: 4 12 20 36
Score:
This homework assignment has 3 problems, for a total of 36 points.
1. (4 points) List four of the metaphors for handling XML (one word each).
2. (12 points) Of the following statements, identify all that hold about XPath.
A. XPath borrows the basic primitives of common filesystems, specifically, parent, child, and symbolic
link
B. We can simulate the effect of the preceding-sibling axis via a combination of the preceding,parent, and
child axes (and no other axis)
C. The Effective Boolean Value of a node set that contains the empty string is true
D. For any expression that yields a node set of up to one member, appending [1] is a noop
E. The smallest value possible for last() is zero
F. Given an arbitrary XPath expression, Eand positive integers iand jwhere ij, we always have
E[j][i] = E[i]
3. (20 points) Of the following statements, identify all that hold about XQuery. (Below, Set and Pred are functions
and $x and $v are variables.)
A. XQuery forces us to hardcode the names of the elements to be output in the result of a query
B. The XQuery syntax doesn’t limit how many for and let clauses we have in one FLWOR expression, as
long as we have at least one
C. The snippet let $x := $x[1] is acceptable; it shows how the value of $x may be modified
D. In XQuery, attribute can occur within element
E. In XQuery, element can occur within element
F. In XQuery, text can occur within attribute
G. If every $x in Set($v) satisfies Pred($x,$v) and Set($v) is not empty, then some $x in Set($v) satisfies
Pred($x,$v)
H. If some $x in Set($v) satisfies Pred($x,$v) then every $x in Set($v) satisfies Pred($x,$v)
I. It is possible that some $x in Set($v) satisfies Pred($x,$v) is false and every $x in Set($v) satisfies
Pred($x,$v) is true
J. XQuery can produce non-XML results as output
Page 1 of 1

Partial preview of the text

Download E-Commerce Tech Homework for CSC 513: XML & XPath/XQuery Metaphors - Prof. Singh and more Assignments Computer Science in PDF only on Docsity!

CSC 513

E-Commerce Technologies

H

1/10/2007 (Write your name above)

Problem 1 2 3 Total Points: 4 12 20 36 Score:

This homework assignment has 3 problems, for a total of 36 points.

  1. (4 points) List four of the metaphors for handling XML (one word each).
  2. (12 points) Of the following statements, identify all that hold about XPath. A. XPath borrows the basic primitives of common filesystems, specifically, parent, child, and symbolic link B. We can simulate the effect of the preceding-sibling axis via a combination of the preceding, parent, and child axes (and no other axis) C. The Effective Boolean Value of a node set that contains the empty string is true D. For any expression that yields a node set of up to one member, appending [1] is a noop E. The smallest value possible for last() is zero F. Given an arbitrary XPath expression, E and positive integers i and j where i ≤ j, we always have E[j][i] = E[i]
  3. (20 points) Of the following statements, identify all that hold about XQuery. (Below, Set and Pred are functions and $x and $v are variables.) A. XQuery forces us to hardcode the names of the elements to be output in the result of a query B. The XQuery syntax doesn’t limit how many for and let clauses we have in one FLWOR expression, as long as we have at least one C. The snippet let $x := $x[1] is acceptable; it shows how the value of $x may be modified D. In XQuery, attribute can occur within element E. In XQuery, element can occur within element F. In XQuery, text can occur within attribute G. If every $x in Set($v) satisfies Pred($x,$v) and Set($v) is not empty, then some $x in Set($v) satisfies Pred($x,$v) H. If some $x in Set($v) satisfies Pred($x,$v) then every $x in Set($v) satisfies Pred($x,$v) I. It is possible that some $x in Set($v) satisfies Pred($x,$v) is false and every $x in Set($v) satisfies Pred($x,$v) is true J. XQuery can produce non-XML results as output

Page 1 of 1