Modification de la balise <pagenumber>
authorPatrick PIERRE <patrick.pierre@prismallia.fr>
jeu., 22 mars 2012 11:34:25 +0100
changeset 90 d5067911c762
parent 89 208625c74410
child 91 2ed9fc840ce6
Modification de la balise <pagenumber>
RelaxNG/publidoc.rnc
Xml/Documents/torture_test.xml
Xml/Topics/centre_pompidou.xml
Xml/Topics/chasseurs.xml
Xml/Topics/portugal_ue.xml
Xml/Topics/prince_belge.xml
Xml/Topics/proba01.xml
Xxe/Css/publidoc.css
--- a/RelaxNG/publidoc.rnc	mar. mars 13 07:40:10 2012 +0100
+++ b/RelaxNG/publidoc.rnc	jeu. mars 22 11:34:25 2012 +0100
@@ -21,8 +21,27 @@
 #                                  TOP LEVEL
 # =============================================================================
 
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ top.head ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+top.head = element head { top.head.content }
+
+top.head.content =
+   (title, subtitle?)?
+ & identifier*
+ & copyright?
+ & contributors?
+ & date?
+ & place?
+ & source*
+ & keywordset?
+ & subjectset?
+ & abstract?
+ & cover?
+ & annotation*
+
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ document ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+# ~~~~~~ document
 document = element document { document.attributes, document.content }
 
 document.attributes =
@@ -52,208 +71,41 @@
 
 
 # =============================================================================
-#                                 HEAD LEVEL
-# =============================================================================
-
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ head ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-top.head = element head { top.head.content }
-division.head = element head { division.head.content }
-component.head = element head { component.head.content }
-section.head = element head { section.head.content }
-block.head = element head { block.head.content }
-
-top.head.content =
-   (title, subtitle?)?
- & identifier*
- & copyright?
- & contributors?
- & date?
- & place?
- & source*
- & keywordset?
- & subjectset?
- & abstract?
- & cover?
- & annotation*
-division.head.content =
-   (title, subtitle?)?
- & abstract?
- & annotation*
-component.head.content =
-   (title, subtitle?)?
- & contributors?
- & abstract?
- & annotation*
-section.head.content =
-   (title, subtitle?)?
- & abstract?
- & annotation*
-block.head.content =
-   (title, subtitle?)?
-
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ title, subtitle ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-title = element title { title.content }
-subtitle = element subtitle { title.content }
-
-title.content = inlines
-
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ identifier ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-identifier.uri = element identifier {
-   attribute type { "uri" }, xsd:anyURI
-}
-
-identifier.ean = element identifier {
-   attribute type { "ean" }, xsd:token {pattern = "\d{13}"}
-}
-
-identifier = identifier.uri | identifier.ean
-
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ copyright ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-copyright = element copyright { copyright.content }
-
-copyright.content = inlines
-
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ contributors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-# ~~~~~~ contributors
-contributors = element contributors { contributors.content }
-
-contributors.content =
-   contributor+
-
-# ~~~~~~ contributor
-contributor = element contributor { contributor.content }
-
-contributor.content =
-   (((firstname, secondname?)?, lastname) | label),
-   address?,
-   link?,
-   role*
-
-# ~~~~~~ firstname, secondname, lastname, label
-firstname = element firstname { firstname.content }
-secondname = element secondname { secondname.content }
-lastname = element lastname { lastname.content }
-label = element label { label.content }
-
-firstname.content = inlines
-secondname.content = inlines
-lastname.content = inlines
-label.content = inlines
-
-# ~~~~~~ address
-address = element address { address.content }
-
-address.content = inlines
-
-# ~~~~~~ role
-role = element role { role.content }
-
-role.content = "author" | "illustrator" | "publisher" | "packager"
-
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ place ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-place = element place { place.content }
-
-place.content = inlines
-
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-# ~~~~~~ source
-source = element source {
-   (  (attribute type { "book" }, source.content.book)
-    | (attribute type { "file" }, source.content.file)),
-   source.content
-}
-
-source.content.book =
-   identifier.ean,
-   title?,
-   pagenumber*
-source.content.file =
-   identifier.uri
-source.content =
-   annotation*
-
-# ~~~~~~ pagenumber
-pagenumber = element pagenumber { pagenumber.attributes }
-
-pagenumber.attributes =
-   pagenumber.value.attribute
-pagenumber.value.attribute = attribute value { xsd:positiveInteger }
-
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ keyword & subject ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-# ~~~~~~ keywordset
-keywordset = element keywordset { keywordset.content }
-
-keywordset.content = keyword+
-
-# ~~~~~~ keyword
-keyword = element keyword { keyword.content }
-
-keyword.content = mixed { sup*, sub* }
-
-# ~~~~~~ subjectset
-subjectset = element subjectset { subjectset.content }
-
-subjectset.content = subject+
-
-# ~~~~~~ subject
-subject = element subject { subject.attributes }
-
-subject.attributes =
-   subject.id.attribute
-subject.id.attribute = attribute id { xsd:NMTOKEN }
-
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ abstract ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-abstract = element abstract { abstract.content }
-
-abstract.content =
-   p+
-
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cover ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-cover = element cover { cover.content }
-
-cover.content =
-   cover.image
-
-cover.image = element image { cover.image.attributes }
-
-cover.image.attributes =
-   cover.image.id.attribute
-cover.image.id.attribute = attribute id { xsd:NMTOKEN }
-
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ annotation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-annotation = element annotation { annotation.content }
-
-annotation.content = inlines
-
-
-# =============================================================================
 #                                 DIVISION LEVEL
 # =============================================================================
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ division ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+# ~~~~~~ division
 division = element division { division.content }
 
 division.content =
    division.head?,
    (division | topic)+
 
+# ~~~~~~ division.head
+division.head = element head { division.head.content }
+
+division.head.content =
+   (title, subtitle?)?
+ & abstract?
+ & annotation*
+
 
 # =============================================================================
-#                               COMPONENT LEVEL
+#                                COMPONENT LEVEL
 # =============================================================================
 
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ component.head ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+component.head = element head { component.head.content }
+
+component.head.content =
+   (title, subtitle?)?
+ & contributors?
+ & abstract?
+ & annotation*
+
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ topic ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 topic = element topic { topic.attributes, topic.content }
@@ -274,6 +126,7 @@
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ section ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+# ~~~~~~ section
 section = element section { section.attributes, section.content }
 
 section.attributes =
@@ -285,6 +138,14 @@
    section.head?,
    (section+ | block+)
 
+# ~~~~~~ section.head
+section.head = element head { section.head.content }
+
+section.head.content =
+   (title, subtitle?)?
+ & abstract?
+ & annotation*
+
 
 # =============================================================================
 #                                 BLOCK LEVEL
@@ -292,8 +153,15 @@
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ block ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+# ~~~~~~ block
 block = (p | speech | \list | blockquote | table | media)
 
+# ~~~~~~ block.head
+block.head = element head { block.head.content }
+
+block.head.content =
+   (title, subtitle?)?
+
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ p ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 p = element p { p.content }
@@ -462,6 +330,153 @@
 
 
 # =============================================================================
+#                                 HEAD LEVEL
+# =============================================================================
+
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ title, subtitle ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+title = element title { title.content }
+subtitle = element subtitle { title.content }
+
+title.content = inlines
+
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ identifier ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+identifier.uri = element identifier {
+   attribute type { "uri" }, xsd:anyURI
+}
+
+identifier.ean = element identifier {
+   attribute type { "ean" }, xsd:token {pattern = "\d{13}"}
+}
+
+identifier = identifier.uri | identifier.ean
+
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ copyright ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+copyright = element copyright { copyright.content }
+
+copyright.content = inlines
+
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ contributors ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# ~~~~~~ contributors
+contributors = element contributors { contributors.content }
+
+contributors.content =
+   contributor+
+
+# ~~~~~~ contributor
+contributor = element contributor { contributor.content }
+
+contributor.content =
+   (((firstname, secondname?)?, lastname) | label),
+   address?,
+   link?,
+   role*
+
+# ~~~~~~ firstname, secondname, lastname, label
+firstname = element firstname { firstname.content }
+secondname = element secondname { secondname.content }
+lastname = element lastname { lastname.content }
+label = element label { label.content }
+
+firstname.content = inlines
+secondname.content = inlines
+lastname.content = inlines
+label.content = inlines
+
+# ~~~~~~ address
+address = element address { address.content }
+
+address.content = inlines
+
+# ~~~~~~ role
+role = element role { role.content }
+
+role.content = "author" | "illustrator" | "publisher" | "packager"
+
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ place ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+place = element place { place.content }
+
+place.content = inlines
+
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# ~~~~~~ source
+source = element source {
+   (  (attribute type { "book" }, source.content.book)
+    | (attribute type { "file" }, source.content.file)),
+   source.content
+}
+
+source.content.book =
+   identifier.ean,
+   title?,
+   pagenumber*
+source.content.file =
+   identifier.uri
+source.content =
+   annotation*
+
+# ~~~~~~ pagenumber
+pagenumber = element pagenumber { pagenumber.content }
+
+pagenumber.content = xsd:positiveInteger
+
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ keyword & subject ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# ~~~~~~ keywordset
+keywordset = element keywordset { keywordset.content }
+
+keywordset.content = keyword+
+
+# ~~~~~~ keyword
+keyword = element keyword { keyword.content }
+
+keyword.content = mixed { sup*, sub* }
+
+# ~~~~~~ subjectset
+subjectset = element subjectset { subjectset.content }
+
+subjectset.content = subject+
+
+# ~~~~~~ subject
+subject = element subject { subject.attributes }
+
+subject.attributes =
+   subject.id.attribute
+subject.id.attribute = attribute id { xsd:NMTOKEN }
+
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ abstract ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+abstract = element abstract { abstract.content }
+
+abstract.content =
+   p+
+
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ cover ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+cover = element cover { cover.content }
+
+cover.content =
+   cover.image
+
+cover.image = element image { cover.image.attributes }
+
+cover.image.attributes =
+   cover.image.id.attribute
+cover.image.id.attribute = attribute id { xsd:NMTOKEN }
+
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ annotation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+annotation = element annotation { annotation.content }
+
+annotation.content = inlines
+
+
+# =============================================================================
 #                                 INLINE LEVEL
 # =============================================================================
 
@@ -494,6 +509,20 @@
 
 var = element var { text }
 
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ number ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+number = element number {
+   ( attribute type {"roman"}, number.attributes, number.roman.content )
+ | ( number.attributes, number.content)
+}
+
+number.attributes =
+   number.value.attribute?
+number.value.attribute = attribute value { xsd:integer | xsd:decimal }
+
+number.content = mixed { sup* }
+number.roman.content = xsd:token {pattern = "[dlxvi]+"}
+
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ math ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 math = element math {
@@ -508,20 +537,6 @@
 math.content = mixed { sup* & sub* & var* }
 math.tex.content = text
 
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ number ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-number = element number {
-   ( attribute type {"roman"}, number.attributes, number.roman.content )
- | ( number.attributes, number.content)
-}
-
-number.attributes =
-   number.value.attribute?
-number.value.attribute = attribute value { xsd:integer | xsd:decimal }
-
-number.content = mixed { sup* }
-number.roman.content = xsd:token {pattern = "[dlxvi]+"}
-
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ date ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 date = element date { date.attributes, date.content }
--- a/Xml/Documents/torture_test.xml	mar. mars 13 07:40:10 2012 +0100
+++ b/Xml/Documents/torture_test.xml	jeu. mars 22 11:34:25 2012 +0100
@@ -28,7 +28,7 @@
       <source type="book">
         <identifier type="ean">9782843550362</identifier>
         <title>L'art de mettre à l'épreuve</title>
-        <pagenumber value="312"/>
+        <pagenumber>312</pagenumber>
       </source>
       <source type="file">
         <identifier type="uri">hugo_miserables.xml</identifier>
--- a/Xml/Topics/centre_pompidou.xml	mar. mars 13 07:40:10 2012 +0100
+++ b/Xml/Topics/centre_pompidou.xml	jeu. mars 22 11:34:25 2012 +0100
@@ -7,14 +7,6 @@
       <subtitle>Paris, samedi 1<sup>er</sup></subtitle>
       <date value="2000-01-01"/>
       <place>Paris</place>
-      <source type="book">
-        <identifier type="ean">9782843550362</identifier>
-        <title>Chronique de l'année 2000</title>
-        <pagenumber value="4"/>
-      </source>
-      <source type="file">
-        <identifier type="uri">4a.tex</identifier>
-      </source>
       <keywordset>
         <keyword>France</keyword>
         <keyword>Architecture</keyword>
--- a/Xml/Topics/chasseurs.xml	mar. mars 13 07:40:10 2012 +0100
+++ b/Xml/Topics/chasseurs.xml	jeu. mars 22 11:34:25 2012 +0100
@@ -7,14 +7,6 @@
       <subtitle>Baie de Somme, mardi 1<sup>er</sup></subtitle>
       <date value="2000-02-01"/>
       <place>Baie de Somme</place>
-      <source type="book">
-        <identifier type="ean">9782843550362</identifier>
-        <title>Chronique de l'année 2000</title>
-        <pagenumber value="12"/>
-      </source>
-      <source type="file">
-        <identifier type="uri">12a.tex</identifier>
-      </source>
     </head>
 
     <section>
--- a/Xml/Topics/portugal_ue.xml	mar. mars 13 07:40:10 2012 +0100
+++ b/Xml/Topics/portugal_ue.xml	jeu. mars 22 11:34:25 2012 +0100
@@ -10,7 +10,7 @@
       <source type="book">
         <identifier type="ean">9782843550362</identifier>
         <title>Chronique de l'année 2000</title>
-        <pagenumber value="4"/>
+        <pagenumber>4</pagenumber>
       </source>
       <source type="file">
         <identifier type="uri">4z.tex</identifier>
--- a/Xml/Topics/prince_belge.xml	mar. mars 13 07:40:10 2012 +0100
+++ b/Xml/Topics/prince_belge.xml	jeu. mars 22 11:34:25 2012 +0100
@@ -5,14 +5,6 @@
     <head>
       <title>Janvier 2000</title>
       <date value="2000-01"/>
-      <source type="book">
-        <identifier type="ean">9782843550362</identifier>
-        <title>Chronique de l'année 2000</title>
-        <pagenumber value="8"/>
-      </source>
-      <source type="file">
-        <identifier type="uri">e8.tex</identifier>
-      </source>
     </head>
 
     <section>
--- a/Xml/Topics/proba01.xml	mar. mars 13 07:40:10 2012 +0100
+++ b/Xml/Topics/proba01.xml	jeu. mars 22 11:34:25 2012 +0100
@@ -4,6 +4,10 @@
   <topic xml:id="proba01" xml:lang="fr">
     <head>
       <title>Qu'est-ce qu'une probabilité ?</title>
+      <keywordset>
+        <keyword>mathématiques</keyword>
+        <keyword>probabilité</keyword>
+      </keywordset>
     </head>
 
     <section>
--- a/Xxe/Css/publidoc.css	mar. mars 13 07:40:10 2012 +0100
+++ b/Xxe/Css/publidoc.css	jeu. mars 22 11:34:25 2012 +0100
@@ -466,6 +466,10 @@
 note:after { font-size: 75%; content: ")"; }
 note p { display:inline; }
 
+/* foreign ~~~~~~~~~~~~~~~~~~~~~~~~~ */
+
+foreign { font-family: sans-serif; font-style: italic; }
+
 /* highlight ~~~~~~~~~~~~~~~~~~~~~~~ */
 
 highlight { font-weight: bold; }