Small schematron validation and XSLT transformation job

Small schematron validation and XSLT transformation job

Cancelled

Job Description

Consider the following (attached) documents:

- topics.xml : A list of subjects, with topics and sub-topics.
- question.xml : An example exam question.
- paper.docbook.xml : A docbook document providing the style for an exam paper.

Topics conforms to the topics.xsd schema.
Questions conform to the question.xsd schema.
Paper is a docbook v5 document.

The job spec is as follows:

1) Validation:
- Add schematron rules to question.xsd to validate that the <question> attributes “subject”, “topic” and “subtopic” are valid combinations, as defined by the topics.xml file.
- Non valid combinations (e.g <question subject=“maths” topic=“knitting” subtopic=“wool”>) should throw a schematron assertion message.
- Valid combinations should pass the schematron tests.
- Please provide me with a unix shell script (or commands) that will validate a question file against the question XSD, and then against the embedded schematron rules.

2) Exam paper document generation

- Given a number of questions wrapped with a <questions> element: (i.e. <questionset><question>…</question>…<question>…</question></questionset>, produce an XSLT stylesheet which transforms the questions using the template defined by paper.docbook.xml.

Required features:
- Each question will need to be assigned a question number in the output, starting with 1. (The template currently shows questions 1-4; if the <questionset/> contains 6 questions, then the questions would be labelled 1-6 in the output XML file.
- Each choice of answer is to be rendered as an entry in the ordered list.
- The image ref will be rendered in the imagedata fileref file verbatim.

Expected outputs:
- Modified questions.xsd file including embedded schematron rules.
- Shell script, or equivalent instructions, documenting how to validation an given question document against the question.xsd schema, and check against the embedded schematron rules.
- An XSL file, defining a possible XSLT transformation of a <questionset> file into a docbook file conforming to the attached template.

Open Attachment