Ajout d'un type aux quiz
authorPatrick PIERRE
mar., 22 janv. 2013 19:58:28 +0100
changeset 158 4421865b3f33
parent 157 cad0deff68cd
child 159 28964e0c2c06
Ajout d'un type aux quiz
RelaxNG/publiquiz.rnc
Xxe/Css/publiquiz.css
--- a/RelaxNG/publiquiz.rnc	lun. janv. 21 22:04:59 2013 +0100
+++ b/RelaxNG/publiquiz.rnc	mar. janv. 22 19:58:28 2013 +0100
@@ -37,8 +37,10 @@
 
 top.quiz.attributes =
    quiz.id.attribute
+ & quiz.type.attribute?
  & lang.attribute?
 quiz.id.attribute = attribute id { xsd:NMTOKEN }
+quiz.type.attribute = attribute type { xsd:NCName }
 
 top.quiz.content =
    top.head?,
@@ -57,6 +59,7 @@
 
 quiz.attributes =
    (quiz.id.attribute | quiz.xmlid.attribute)?
+ & quiz.type.attribute?
  & lang.attribute?
 quiz.xmlid.attribute = attribute xml:id { xsd:ID }
 
--- a/Xxe/Css/publiquiz.css	lun. janv. 21 22:04:59 2013 +0100
+++ b/Xxe/Css/publiquiz.css	mar. janv. 22 19:58:28 2013 +0100
@@ -25,9 +25,21 @@
            " " add-attribute-button() " Quiz";
 }
 
-quiz[xml|id]:before {
-  content: collapser() " " insert-before-button() insert-after-button() " Quiz"
-           " – ID = " text-field(attribute, "xml:id", columns, 15, color, black);
+quiz[id]:before {
+  content: collapser() " " insert-before-button() insert-after-button()
+           " " add-attribute-button() " Quiz"
+           " – ID = " text-field(attribute, "id", columns, 15, color, black);
+}
+quiz[type]:before {
+  content: collapser() " " insert-before-button() insert-after-button()
+           " " add-attribute-button() " Quiz"
+           " – Type = " text-field(attribute, type, columns, 10, color, black);
+}
+quiz[id][type]:before {
+  content: collapser() " " insert-before-button() insert-after-button()
+           " Quiz"
+           " – ID = " text-field(attribute, "id", columns, 15, color, black)
+           " – Type = " text-field(attribute, type, columns, 10, color, black);
 }
 
 quiz {
@@ -71,10 +83,22 @@
   content: add-attribute-button() " Quiz"
            " – ID = " text-field(attribute, "id", columns, 15, color, white);
 }
+publiquiz > quiz[id][type]:before {
+  content: add-attribute-button() " Quiz"
+           " – ID = " text-field(attribute, "id", columns, 15, color, white)
+           " – Type = " text-field(attribute, type, columns, 10, color, white);
+}
 publiquiz > quiz[id][xml|lang]:before {
+  content: add-attribute-button() " Quiz"
+           " – ID = " text-field(attribute, "id", columns, 15, color, white)
+           " – Langue principale = " combo-box(attribute, "xml:lang", font-size, 75%,
+             values, "en\A fr\A es", color, white);
+}
+publiquiz > quiz[id][type][xml|lang]:before {
   content: "Quiz"
            " – ID = " text-field(attribute, "id", columns, 15, color, white)
-           " – Langue principale  = " combo-box(attribute, "xml:lang", font-size, 75%,
+           " – Type = " text-field(attribute, type, columns, 10, color, white)
+           " – Langue principale = " combo-box(attribute, "xml:lang", font-size, 75%,
              values, "en\A fr\A es", color, white);
 }