UpTransformation icon indicating copy to clipboard operation
UpTransformation copied to clipboard

Errata:

Open ebeshero opened this issue 3 years ago • 0 comments

Errata to correct on GitHub syllabus

Tuesday: XPath and XQuery

===========================

  • [x] #### XPath and XQuery in eXist-db
G. Introducing variables (10 minutes; 11:30 a.m.–11:40 a.m.)
d. The value after as specifies the data type. It is optional, but strongly recommended.

i. Other common values include xs:string or xs:integer().

That should read: xs:integer.

======================================

  • [x] #### XQuery flow control (1:30 p.m.–4:00 p.m.)
Writing XQuery in stages (30 minutes; 1:30 p.m.–2:00 p.m.)

2.a XQuery flow control, declare variable $si as document-node() := doc('https://raw.githubusercontent.com/ebeshero/UpTransformation/master/data/Charles1.xml');

The second variable is misnamed and should be declare variable $Chas as document-node() := doc('https://raw.githubusercontent.com/ebeshero/UpTransformation/master/data/Charles1.xml');

======================================

  • [x] #### XQuery flow control (1:30 p.m.–4:00 p.m.)
Review XPath for loops; sequence and range variables
  1. b. Find all persons listed as born in Scotland in two ways: with a for loop and as a one-line XPath path expression. for $i in //person[contains(birth, "Scotland")] return $i or //person[contains(birth, "Scotland")]. You should return 30 elements.

The returned value should (now) be 45 and not 30.

ebeshero avatar Jun 08 '22 23:06 ebeshero