diff -r b748affd5db2 -r 13939fb7824a RelaxNG/publiquiz.rnc --- a/RelaxNG/publiquiz.rnc mer. avril 16 13:07:05 2014 +0200 +++ b/RelaxNG/publiquiz.rnc jeu. avril 24 20:36:03 2014 +0200 @@ -31,7 +31,7 @@ # TOP LEVEL # ============================================================================= -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ quiz ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ top.quiz ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ top.quiz = element quiz { top.quiz.attributes, top.quiz.content } @@ -49,8 +49,9 @@ help?, answer? + # ============================================================================= -# COMPONENT LEVEL +# COMPONENT LEVEL # ============================================================================= # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ quiz ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -58,10 +59,9 @@ quiz = element quiz { quiz.attributes, quiz.content } quiz.attributes = - (quiz.id.attribute | quiz.xmlid.attribute)? + (quiz.id.attribute | xmlid.attribute)? & quiz.type.attribute? & lang.attribute? -quiz.xmlid.attribute = attribute xml:id { xsd:ID } quiz.content = component.head?, @@ -189,12 +189,20 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ categories ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# ~~~~~~ category.head +category.head = element head { category.head.content } + +category.head.content = + title, + shorttitle?, + subtitle* + # ~~~~~~ categories categories = element categories { categories.attributes, categories.content } categories.attributes = multiple.attribute? - + categories.content = category.item*, category, @@ -206,14 +214,6 @@ category.content = category.head, category.item* - -# ~~~~~~ category.head -category.head = element head { category.head.content } - -category.head.content = - title, - shorttitle?, - subtitle* # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ pip ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -236,7 +236,7 @@ composite.attributes = multipage.attribute? -multipage.attribute = attribute multipage { xsd:boolean } +multipage.attribute = attribute multipage { xsd:boolean } composite.content = subquiz, @@ -390,7 +390,7 @@ blanks.dropzone.attributes = x.attribute - & y.attribute + & y.attribute pip.dropzone.attributes = x.attribute & y.attribute