2022/10/17 15:40 Upload Assignment: 60411-Cwk4-S-Coursework 4 – COMP60411…
Haihang Hong
Blackboard My Manchester
COMP60411 Modelling Data on the Web 2022-23 1st Semester Course Content Week 4 Upload Assignment: 60411-Cwk4-S-Coursework 4
Copyright By PowCoder代写 加微信 powcoder
Upload Assignment: 60411-Cwk4-S-Coursework 4
ASSIGNMENT INFORMATION
An arithmetic exam grader and reporter in XQuery
We will continue our running example of exams/quizzes for people learning arithmetic, this time in XQuery. We have extended our XML- based format for arithmetic expressions to one for exams with simple questions about arithmetic. In this coursework, you are asked to writes an ‘exam marker’ in XQuery:
an XQuery examGrader.xquery that takes an exam (in our new, XML-based format) and returns an HTML document that shows rst the exam details: a results table for the students who took the exam including their raw and percentage marks and whether they passed or failed the exam.
You can think about how to further extend this to add some statistics about the exam and about the questions.
The core XQuery function that you will need to code is one that takes an arithmetic expression (from the questions) and evaluates it. Then you take the resulting value and compare it with those given by the students according to the answer book.
We have provided you with a stub that contains an example exam in
exam.xml, an XSD schema in 3 .xsd files, and a stub for the XQuery queries that you flesh out. You will only touch the XQuery – not the schema files. You will need to configure a ‘transformation scenario’ – see below and also the screenshots provided in the stub.
Speci cation
Flesh out the given XQuery examGrader.xquery so that it
1. generates a html report as indicated in exampleOutput.html
Monday, 24 October 2022
Points Possible
https://online.manchester.ac.uk/webapps/assignment/uploadAssignment?content_id=_13880832_1&course_id=_72801_1&group_id=&mode=view 1/3
2022/10/17 15:40 Upload Assignment: 60411-Cwk4-S-Coursework 4 – COMP60411…
2. works on all XML documents that are valid w.r.t. the XSD schema examSchema.xsd provided and where each AnswerBook contains answers to all questions (the latter constraint is not caught by the examSchema.xsd but you won’t need to deal with inputs that violate it).
Submit your XQuery examGrader.xquery as a zipped file. Tips
We strongly recommend, as usual, to start by investigating the format (this time XML-based) that your (XQuery) code needs to be able to handle; in this case, this includes
making suitable test cases: you can start with the exam.xml le provided in the stub, and use Oxygen to validate it and your variations of it against the XSD schema we also provide in the stub.
reading and understanding the XSD schema we provide in the stub to con rm/understand what kind of ‘problematic’ inputs are caught by this schema (and the fact that we validate inputs against it in the XQuery query) and which ones your code will need to deal with.
reading and understanding the comments in the stub. In particular, we suggest you rst aim at getting the general code working while assuming that the correct answer to all questions is 1. Once you have this working, you can then start to implement that part of your query that computes the correct answer for the expression in the question.
You can declare additional XQuery functions in
examGrader.xquery.
To work on this XQuery, in Oxygen,
create and con gure a transformation scenario for the XQuery le
use the tool’ button to the right of the red ‘play’ button make sure you ll it in as in the 3 screenshots provided with the stub
cw4stub.zip
ASSIGNMENT SUBMISSION
Text Submission
Write Submission
Attach Files
https://online.manchester.ac.uk/webapps/assignment/uploadAssignment?content_id=_13880832_1&course_id=_72801_1&group_id=&mode=view 2/3
2022/10/17 15:40 Upload Assignment: 60411-Cwk4-S-Coursework 4 – COMP60411…
Browse Local Files
Browse Cloud Service
Browse Content Collection
ADD COMMENTS
For the toolbar, press ALT+F10 (PC) or ALT+FN+F10 (Mac).
P 0 WORDS POWERED BY TINY
When finished, make sure that you click Submit.
Optionally, click Save as Draft to save changes and continue working later or click Cancel to quit without saving changes.
Save Draft
https://online.manchester.ac.uk/webapps/assignment/uploadAssignment?content_id=_13880832_1&course_id=_72801_1&group_id=&mode=view 3/3
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com