<?xml version="1.0" encoding="UTF-8"?> <!-- ============================================================================================= WileyML 3G A model for the content of John Wiley & Sons. This file conforms to ISO/IEC 19757-2:2003 AMENDMENT 1 (RELAX NG Compact Syntax). The collection of these files normatively defines the XML grammar for WileyNG instances. Copyright (c) 2011 John Wiley & Sons Inc. All rights reserved worldwide. $Id: Wileyml3g-questions.rnc,v 1.33 2011/07/24 8:48:41 johnp Exp $ ============================================================================================= --> <!-- Dec 2015 1. <exercise>: added optional <source> --> <!-- Aug 2011 1. <exercise>: added optional @onlineAnswerPlace and removed @solutionPlace 2. <exercise>: replaced @difficulty with @difficultyMarkers 3. <workedSolution>: added optional @place, @onlinePlace 4. <hint>: added optional @onlinePlace 5. <blank>: added optional @width 6. <match>: added optional @thirdRef and @cms:thirdRef 7. <matchCandidates>: added optional third <list> to model --> <!-- Aug 2010 1. <exercise>: added new elements exerciseSetup, exerciseBody 2. <workedSolution>: added optional @xml:id 3. <exercise>: allowed <workedSolution> to repeat 4. <exerciseSection>: added @numbered 5. <exercise>: added @solutionPlace; removed studentSolutionsManual from values allowed for @answerPlace 6. <exercise>: put <label> before title(Group) 7. <exercise>: removed <linkGroup> 8. <exerciseInstruction>: changed model to (p | figure |...|)+ 9. <exerciseParts>: added figure | tabular | feature | block parallel to p --> <!-- Mar 2010 1. Added studentSolutionsManual to values for exercise/@answerPlace --> <!-- Version 1.0.1 (August 2009) 1. hint: added title | titleGroup; changed text model 2. workedSolution: added title | titleGroup; changed text model --> <grammar xmlns:cms="http://cms.wiley.com" xmlns:wng="http://www.wiley.com/namespaces/wiley" xmlns:aux="http://www.wiley.com/namespaces/wiley/aux" xmlns="http://relaxng.org/ns/structure/1.0"> <!-- ============================================================================================= answer ============================================================================================= --> <define name="wng.answer.attlist"> <ref name="pattern.global.attributes"/> </define> <define name="wng.answer"> <element name="wng:answer"> <aux:desc aux:cat="quiz">An answer to a <xref xmlns="" linkend="wng_question"/> +++.</aux:desc> <ref name="wng.answer.attlist"/> <choice> <oneOrMore> <ref name="wng.p"/> </oneOrMore> <oneOrMore> <ref name="wng.match"/> </oneOrMore> </choice> </element> </define> <!-- ============================================================================================= blank ============================================================================================= --> <define name="wng.blank.attlist"> <interleave> <ref name="pattern.global.attributes"/> <optional> <ref name="pattern.id.attribute"/> </optional> <optional> <ref name="pattern.type.attribute"/> </optional> <optional> <attribute name="significantDigits"> <aux:desc>significant digits</aux:desc> </attribute> </optional> <optional> <attribute name="tolerance"> <aux:desc>tolerance</aux:desc> </attribute> </optional> <optional> <attribute name="width"> <aux:desc>width of the line, as a percentage of the page width, given as a number 0 - 100</aux:desc> </attribute> </optional> </interleave> </define> <define name="wng.blank"> <element name="wng:blank"> <aux:desc aux:cat="quiz">In a fill-in-the-blanks <xref xmlns="" linkend="wng_question"/> +++, a blank to be filled in.</aux:desc> <ref name="wng.blank.attlist"/> <choice> <oneOrMore> <ref name="wng.choice"/> </oneOrMore> <optional> <ref name="wng.answer"/> <optional> <ref name="wng.explanation"/> <optional> <ref name="wng.explanation"/> </optional> </optional> </optional> </choice> </element> </define> <!-- ============================================================================================= choice ============================================================================================= --> <define name="wng.choice.attlist"> <interleave> <ref name="pattern.global.attributes"/> <optional> <ref name="pattern.id.attribute"/> </optional> <optional> <attribute name="isCorrect"> <aux:desc>whether the choice represents a correct answer</aux:desc> <ref name="pattern.boolean.tokens"/> </attribute> </optional> </interleave> </define> <define name="wng.choice"> <element name="wng:choice"> <aux:desc aux:cat="quiz">A choice in a multiple choice, multiple response, true-false, or fill-in-the-blank question.</aux:desc> <ref name="wng.choice.attlist"/> <optional> <ref name="wng.label"/> </optional> <ref name="wng.p"/> <optional> <ref name="wng.explanation"/> <optional> <ref name="wng.explanation"/> </optional> </optional> </element> </define> <!-- ============================================================================================= choiceGroup ============================================================================================= --> <define name="wng.choiceGroup.attlist"> <interleave> <ref name="pattern.global.attributes"/> <optional> <attribute name="choiceStyle"> <aux:desc>style with which to render choices (default value is a)</aux:desc> <choice> <value>hotspot</value> <value>1</value> <value>I</value> <value>i</value> <value>A</value> <value>a</value> <value>plain</value> <value>bulleted</value> <value>custom</value> </choice> </attribute> </optional> <optional> <attribute name="multipleResponse"> <aux:desc>whether there may be multiple correct answers among the contained choices (default value is no)</aux:desc> <ref name="pattern.boolean.tokens"/> </attribute> </optional> </interleave> </define> <define name="wng.choiceGroup"> <element name="wng:choiceGroup"> <aux:desc aux:cat="quiz">A wrapper for <xref xmlns="" linkend="wng_choice"/> +++s.</aux:desc> <ref name="wng.choiceGroup.attlist"/> <oneOrMore> <ref name="wng.choice"/> </oneOrMore> </element> </define> <!-- ============================================================================================= exercise ============================================================================================= --> <define name="wng.exercise.attlist"> <interleave> <ref name="pattern.global.attributes"/> <optional> <ref name="pattern.id.attribute"/> </optional> <optional> <ref name="pattern.type.attribute"/> </optional> <optional> <attribute name="wileyPlusType"> <aux:desc>classification of the question in WileyPLUS</aux:desc> </attribute> </optional> <optional> <attribute name="altRef"> <aux:desc>presence of this attribute indicates that the exercise is not accessible and its value points to an alternative that is accessible</aux:desc> </attribute> </optional> <optional> <attribute name="cms:altRef"> <aux:desc>!suppress!</aux:desc> </attribute> </optional> <optional> <attribute name="instructionRef"> <aux:desc>points to instructions for this exercise</aux:desc> </attribute> </optional> <optional> <attribute name="cms:instructionRef"> <aux:desc>!suppress!</aux:desc> </attribute> </optional> <optional> <attribute name="numbered"> <aux:desc>whether this item is to be counted in the numbering scheme (default value is yes)</aux:desc> <ref name="pattern.boolean.tokens"/> </attribute> </optional> <optional> <ref name="pattern.autonumber.attribute"/> </optional> <optional> <attribute name="answerPlace"> <aux:desc>placement hint for answer (not worked solution) and any explanation, in print (default value is here)</aux:desc> <choice> <value>here</value> <value>margin</value> <value>chapter</value> <value>back</value> <value>instructorManual</value> </choice> </attribute> </optional> <optional> <attribute name="onlineAnswerPlace"> <aux:desc>placement hint for answer (not worked solution) and any explanation, in online presentation (default value is here)</aux:desc> <choice> <value>here</value> <value>button</value> </choice> </attribute> </optional> <optional> <attribute name="difficultyMarkers"> <aux:desc>number of difficulty indicators (default 0)</aux:desc> <choice> <value>0</value> <value>1</value> <value>2</value> <value>3</value> <value>4</value> <value>5</value> <value>6</value> <value>7</value> <value>8</value> <value>9</value> </choice> </attribute> </optional> </interleave> </define> <define name="wng.exercise"> <element name="wng:exercise"> <aux:desc aux:cat="quiz">An exercise (<xref xmlns="" linkend="wng_question"/> and optionally <xref linkend="wng_answer"/> +++, <xref linkend="wng_workedSolution"/> +++, and <xref linkend="wng_explanation"/> +++).</aux:desc> <ref name="wng.exercise.attlist"/> <optional> <ref name="wng.label"/> </optional> <optional> <ref name="pattern.model.fragment.titling"/> </optional> <choice> <ref name="wng.mediaResource"/> <ref name="wng.mediaResourceGroup"/> <ref name="wng.exerciseParts"/> <group> <ref name="wng.question"/> <optional> <ref name="wng.answer"/> </optional> <optional> <ref name="wng.explanation"/> </optional> <zeroOrMore> <ref name="wng.workedSolution"/> </zeroOrMore> </group> <group> <optional> <ref name="wng.exerciseSetup"/> </optional> <ref name="wng.exerciseBody"/> </group> </choice> <optional> <ref name="wng.source"/> </optional> </element> </define> <!-- ============================================================================================= exerciseBody ============================================================================================= --> <define name="wng.exerciseBody.attlist"> <ref name="pattern.global.attributes"/> </define> <define name="wng.exerciseBody"> <element name="wng:exerciseBody"> <aux:desc aux:cat="quiz">A titled part of the question description for an exercise.</aux:desc> <ref name="wng.exerciseBody.attlist"/> <ref name="pattern.model.fragment.titling"/> <choice> <group> <ref name="wng.question"/> <optional> <ref name="wng.answer"/> </optional> <optional> <ref name="wng.explanation"/> </optional> <zeroOrMore> <ref name="wng.workedSolution"/> </zeroOrMore> </group> <ref name="wng.exerciseParts"/> </choice> </element> </define> <!-- ============================================================================================= exerciseSetup ============================================================================================= --> <define name="wng.exerciseSetup.attlist"> <ref name="pattern.global.attributes"/> </define> <define name="wng.exerciseSetup"> <element name="wng:exerciseSetup"> <aux:desc aux:cat="quiz">The initial part of the description for an exercise question.</aux:desc> <ref name="wng.exerciseSetup.attlist"/> <optional> <ref name="pattern.model.fragment.titling"/> </optional> <oneOrMore> <choice> <ref name="wng.p"/> <ref name="wng.figure"/> <ref name="wng.feature"/> <ref name="wng.tabular"/> <ref name="wng.block"/> </choice> </oneOrMore> </element> </define> <!-- ============================================================================================= exerciseInstruction ============================================================================================= --> <define name="wng.exerciseInstruction.attlist"> <interleave> <ref name="pattern.global.attributes"/> <ref name="pattern.id.attribute"/> <optional> <ref name="pattern.type.attribute"/> </optional> </interleave> </define> <define name="wng.exerciseInstruction"> <element> <name>wng:exerciseInstruction</name> <aux:desc aux:cat="quiz">An instruction applying to a set of exercises.</aux:desc> <ref name="wng.exerciseInstruction.attlist"/> <oneOrMore> <choice> <ref name="wng.p"/> <ref name="wng.figure"/> <ref name="wng.tabular"/> <ref name="wng.feature"/> <ref name="wng.block"/> </choice> </oneOrMore> </element> </define> <!-- ============================================================================================= exerciseParts ============================================================================================= --> <define name="wng.exerciseParts.attlist"> <ref name="pattern.global.attributes"/> </define> <define name="wng.exerciseParts"> <element name="wng:exerciseParts"> <aux:desc aux:cat="quiz">An exercise with parts.</aux:desc> <ref name="wng.exerciseParts.attlist"/> <zeroOrMore> <choice> <ref name="wng.p"/> <ref name="wng.figure"/> <ref name="wng.tabular"/> <ref name="wng.feature"/> <ref name="wng.block"/> </choice> </zeroOrMore> <oneOrMore> <ref name="wng.exercise"/> </oneOrMore> <optional> <ref name="wng.explanation"/> </optional> <optional> <ref name="wng.workedSolution"/> </optional> </element> </define> <!-- ============================================================================================= exerciseSection ============================================================================================= --> <define name="wng.exerciseSection.attlist"> <interleave> <ref name="pattern.global.attributes"/> <ref name="pattern.id.attribute"/> <optional> <ref name="pattern.type.attribute"/> </optional> <optional> <ref name="pattern.lang.attribute"/> </optional> <optional> <ref name="pattern.autonumber.attribute"/> </optional> <optional> <attribute name="numbered"> <aux:desc>whether this item is numbered (default value is yes)</aux:desc> <ref name="pattern.boolean.tokens"/> </attribute> </optional> <optional> <attribute name="extraLabel"> <aux:desc>string to be prepended to the label/number of each <exercise> within this <exerciseSection> </aux:desc> </attribute> </optional> </interleave> </define> <define name="wng.exerciseSection"> <element> <name>wng:exerciseSection</name> <aux:desc aux:cat="quiz">A section of questions or other <xref xmlns="" linkend="wng_exercise"/> +++s.</aux:desc> <ref name="wng.exerciseSection.attlist"/> <optional> <ref name="wng.label"/> </optional> <optional> <ref name="pattern.model.fragment.titling"/> </optional> <zeroOrMore> <ref name="wng.p"/> </zeroOrMore> <zeroOrMore> <choice> <ref name="wng.exerciseInstruction"/> <ref name="wng.exercise"/> </choice> </zeroOrMore> <zeroOrMore> <ref name="wng.exerciseSection"/> </zeroOrMore> </element> </define> <!-- ============================================================================================= explanation ============================================================================================= --> <define name="wng.explanation.attlist"> <interleave> <ref name="pattern.global.attributes"/> <optional> <attribute name="condition"> <aux:desc>under what condition (user is right or wrong) to display this explanation</aux:desc> <choice> <value>ifRight</value> <value>ifWrong</value> </choice> </attribute> </optional> </interleave> </define> <define name="wng.explanation"> <element name="wng:explanation"> <aux:desc aux:cat="quiz">Explanation about an <xref xmlns="" linkend="wng_answer"/> +++'s correctness.</aux:desc> <ref name="wng.explanation.attlist"/> <ref name="pattern.para.or.paras"/> </element> </define> <!-- ============================================================================================= hint ============================================================================================= --> <define name="wng.hint.attlist"> <interleave> <ref name="pattern.global.attributes"/> <optional> <attribute name="place"> <aux:desc>placement hint for print (default value is here)</aux:desc> <choice> <value>here</value> <value>margin</value> <value>chapter</value> <value>back</value> <value>instructorManual</value> </choice> </attribute> </optional> <optional> <attribute name="onlinePlace"> <aux:desc>placement hint for online presentation (default value is here)</aux:desc> <choice> <value>here</value> <value>button</value> </choice> </attribute> </optional> </interleave> </define> <define name="wng.hint"> <element name="wng:hint"> <aux:desc aux:cat="quiz">A hint about how to answer a <xref xmlns="" linkend="wng_question"/> +++.</aux:desc> <ref name="wng.hint.attlist"/> <optional> <choice> <ref name="wng.title"/> <ref name="wng.titleGroup"/> </choice> </optional> <zeroOrMore> <choice> <ref name="wng.p"/> <ref name="wng.figure"/> <ref name="wng.tabular"/> <ref name="wng.feature"/> <ref name="wng.block"/> </choice> </zeroOrMore> </element> </define> <!-- ============================================================================================= match ============================================================================================= --> <define name="wng.match.attlist"> <interleave> <ref name="pattern.global.attributes"/> <attribute name="firstRef"> <aux:desc>points to part of a matching pair (or triple)</aux:desc> </attribute> <optional> <attribute name="cms:firstRef"> <aux:desc>!suppress!</aux:desc> </attribute> </optional> <attribute name="secondRef"> <aux:desc>points to part of a matching pair (or triple)</aux:desc> </attribute> <optional> <attribute name="cms:secondRef"> <aux:desc>!suppress!</aux:desc> </attribute> </optional> <optional> <attribute name="thirdRef"> <aux:desc>points to part of a matching triple</aux:desc> </attribute> </optional> <optional> <attribute name="cms:thirdRef"> <aux:desc>!suppress!</aux:desc> </attribute> </optional> </interleave> </define> <define name="wng.match"> <element name="wng:match"> <aux:desc aux:cat="quiz">A match between items giving part of the <xref xmlns="" linkend="wng_answer"/> in a matching <xref linkend="wng_exercise"/> +++.</aux:desc> <ref name="wng.match.attlist"/> <optional> <ref name="wng.explanation"/> <optional> <ref name="wng.explanation"/> </optional> </optional> </element> </define> <!-- ============================================================================================= matchCandidates ============================================================================================= --> <define name="wng.matchCandidates.attlist"> <ref name="pattern.global.attributes"/> </define> <define name="wng.matchCandidates"> <element name="wng:matchCandidates"> <aux:desc aux:cat="quiz">Lists of potential matches in a matching exercise.</aux:desc> <ref name="wng.matchCandidates.attlist"/> <ref name="wng.list"/> <ref name="wng.list"/> <optional> <ref name="wng.list"/> </optional> </element> </define> <!-- ============================================================================================= question ============================================================================================= --> <define name="wng.question.attlist"> <ref name="pattern.global.attributes"/> </define> <define name="wng.question"> <element name="wng:question"> <aux:desc aux:cat="quiz">A question.</aux:desc> <ref name="wng.question.attlist"/> <zeroOrMore> <choice> <ref name="wng.p"/> <ref name="wng.figure"/> <ref name="wng.tabular"/> <ref name="wng.feature"/> <ref name="wng.block"/> </choice> </zeroOrMore> <optional> <choice> <ref name="wng.choiceGroup"/> <ref name="wng.matchCandidates"/> </choice> </optional> <optional> <ref name="wng.hint"/> </optional> </element> </define> <!-- ============================================================================================= workedSolution ============================================================================================= --> <define name="wng.workedSolution.attlist"> <interleave> <ref name="pattern.global.attributes"/> <optional> <ref name="pattern.id.attribute"/> </optional> <optional> <attribute name="place"> <aux:desc>placement hint for worked solution in print (default value is here)</aux:desc> <choice> <value>here</value> <value>margin</value> <value>chapter</value> <value>back</value> <value>instructorManual</value> <value>studentSolutionsManual</value> </choice> </attribute> </optional> <optional> <attribute name="onlinePlace"> <aux:desc>placement hint for worked solution in online presentation (default value is here)</aux:desc> <choice> <value>here</value> <value>button</value> </choice> </attribute> </optional> </interleave> </define> <define name="wng.workedSolution"> <element name="wng:workedSolution"> <aux:desc aux:cat="quiz">A step-by-step solution for an answer in an <xref xmlns="" linkend="wng_exercise"/> +++.</aux:desc> <ref name="wng.workedSolution.attlist"/> <optional> <choice> <ref name="wng.title"/> <ref name="wng.titleGroup"/> </choice> </optional> <oneOrMore> <choice> <ref name="wng.p"/> <ref name="wng.figure"/> <ref name="wng.tabular"/> <ref name="wng.feature"/> <ref name="wng.block"/> </choice> </oneOrMore> </element> </define> </grammar>