Help:COAP-3180/week7: Difference between revisions
Jump to navigation
Jump to search
m (→Task) |
m (→Task) |
||
Line 15: | Line 15: | ||
==== Task ==== | ==== Task ==== | ||
* Create three XQuery scripts that extract three different data from a single large XML File | * Create three XQuery scripts that extract three different data from a single large XML File. | ||
* You are expected to use at least simple FLWR expressions like the following one: | |||
<source lang="xml"> | |||
<result> | |||
{ for $t in | |||
fn:doc("http://tecfa.unige.ch/guides/xml/examples/shakespeare.1.10.xml/hamlet.xml")//ACT//SCENE/TITLE | |||
return $t } | |||
</result> | |||
</source> | |||
* You will get a better grade if you render in HTML, e.g. | |||
<source lang="xml"> | <source lang="xml"> | ||
xquery version "1.0"; | xquery version "1.0"; | ||
Line 36: | Line 45: | ||
</html> | </html> | ||
</source> | </source> | ||
... you will get an A if your are somewhat original and/or if you produce more complex queries. | |||
==== Submission Dates ==== | ==== Submission Dates ==== |
Revision as of 23:09, 21 February 2010
Week 7 - COAP 3180
Topics Covered
- Termproject - Getting it done with Wordpress
- XQuery (follow-up)
- Digital identities
Classroom activities
- Installing the cformsII plugin for Wordpress as explained in Using the CformsII plugin to collect and display data
Homework 6
Task
- Create three XQuery scripts that extract three different data from a single large XML File.
- You are expected to use at least simple FLWR expressions like the following one:
<result>
{ for $t in
fn:doc("http://tecfa.unige.ch/guides/xml/examples/shakespeare.1.10.xml/hamlet.xml")//ACT//SCENE/TITLE
return $t }
</result>
- You will get a better grade if you render in HTML, e.g.
xquery version "1.0";
let $source_doc := fn:doc("http://tecfa.unige.ch/guides/xml/examples/shakespeare.1.10.xml/hamlet.xml")
return
<html>
<head> <title>Questionnaire Items</title> </head>
<body>
Acts of Hamlet
<ol>
{ for $t in $source_doc//ACT//SCENE/TITLE
return
<li> {$t/text()} </li>
}
</ol>
</body>
</html>
... you will get an A if your are somewhat original and/or if you produce more complex queries.
Submission Dates
- This homework is due at start of Monday lesson, week 8.
- Students must provide three XQuery scripts plus a URL of the XML file.
- Each homework counts 10% in your global evaluation. The four best homeworks will be taken into account.
Evaluation
- Three working scripts
- Complexity of the query
- Rendering quality, e.g. you get a bonus if you render in a (X)HTML page.
Tips for the homework
- Read my handout first, you may need to find some extra reading.
- If you use the XQuery USE ME plugin, set the Output file ext. to html !
Links and teaching materials
- Online software
- XQuery USE ME (XqUSEme) Firefox plugin, which is based on the (serious) Saxon B engine.
- Teaching materials
- XPath tutorial - basics (exam topic, must know partly)
- XQuery tutorial - basics (exam topic, must know)
- Optional reading
- Darshan Singh, Essential XQuery - The XML Query Language (currently broken ?)
- XQuery (Wikipedia)
- XQuery: A Guided Tour - Download the free tutorial today. This is an 80-page tutorial from the XQuery from the Experts: A Guide to the W3C XML Query Language book by Howard Katz, Don Chamberlin, Denise Draper, Mary Fernandez, Michael Kay, Jonathan Robie, Michael Rys, Jerome Simeon, Jim Tivy, and Philip Wadler, (ISBN 0-321-18060-7), 2004.
- XQuery (Wikibooks, for the ambitious).