# HG changeset patch # User Patrick PIERRE # Date 1365347134 -7200 # Node ID 951f1a25efc52da12b1af6fcc8d143fbe4c6ba0c # Parent b9fea8bd24122d6bcb1525fb7489550126f972c2 Ajout de la bibliographie diff -r b9fea8bd2412 -r 951f1a25efc5 RelaxNG/Examples/Documents/torture_test.xml --- a/RelaxNG/Examples/Documents/torture_test.xml sam. avril 06 14:17:18 2013 +0200 +++ b/RelaxNG/Examples/Documents/torture_test.xml dim. avril 07 17:05:34 2013 +0200 @@ -32,7 +32,7 @@ 9782843550362 L'art de mettre à l'épreuve - 312 + 312 hugo_miserables.xml @@ -154,6 +154,43 @@

Jeanson Henri (signature)

+ + + 9782877065073 + La gloire de mon père + + + Marcel + PAGNOL + author + + + + publisher + + + + 217 + + + 9782253096334 + Les Misérables + + + Victor + HUGO + author + + + + publisher + + + + 512 + Les classiques + + diff -r b9fea8bd2412 -r 951f1a25efc5 RelaxNG/Examples/Topics/portugal_ue.xml --- a/RelaxNG/Examples/Topics/portugal_ue.xml sam. avril 06 14:17:18 2013 +0200 +++ b/RelaxNG/Examples/Topics/portugal_ue.xml dim. avril 07 17:05:34 2013 +0200 @@ -10,7 +10,7 @@ 9782843550362 Chronique de l'année 2000 - 4 + 4 4z.tex diff -r b9fea8bd2412 -r 951f1a25efc5 RelaxNG/publidoc.rnc --- a/RelaxNG/publidoc.rnc sam. avril 06 14:17:18 2013 +0200 +++ b/RelaxNG/publidoc.rnc dim. avril 07 17:05:34 2013 +0200 @@ -72,6 +72,7 @@ top.head?, header?, section+, + bibliography?, footer? @@ -129,6 +130,7 @@ component.head?, header?, section+, + bibliography?, footer? @@ -170,6 +172,14 @@ & audio* & annotation* +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ bibliography ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# ~~~~~~ bibliography +bibliography = element bibliography { bibliography.content } + +bibliography.content = + bibliography.entry+ + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ footer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ footer = element footer { footer.content } @@ -304,18 +314,18 @@ & rowsep.attribute? row.content = - entry+ + table.entry+ -# ~~~~~~ entry -entry = element entry { entry.attributes, entry.content } +# ~~~~~~ table.entry +table.entry = element entry { table.entry.attributes, table.entry.content } -entry.attributes = +table.entry.attributes = align.attribute? & valign.attribute? & colsep.attribute? & rowsep.attribute? -entry.content = +table.entry.content = inlines | (p | media)+ @@ -398,6 +408,33 @@ x.attribute? & y.attribute? +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ bibliograpgy.entry ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +# ~~~~~~ bibliography.entry +bibliography.entry = element entry { bibliography.entry.content } + +bibliography.entry.content = + identifier.ean? + & title + & subtitle? + & copyright? + & collection? + & contributors? + & date? + & place? + & folio? + & pages? + +# ~~~~~~ folio +folio = element folio { folio.content } + +folio.content = xsd:positiveInteger | xsd:token {pattern = "[DLXVI]+"} + +# ~~~~~~ pages +pages = element pages { pages.content } + +pages.content = xsd:positiveInteger + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ scenario ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~ scenario @@ -507,28 +544,18 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -# ~~~~~~ source source = element source { - ( (attribute type { "book" }, source.content.book) + ( (attribute type { "book" }, bibliography.entry.content) | (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 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ keyword & subject ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~ keywordset keywordset = element keywordset { keywordset.content } diff -r b9fea8bd2412 -r 951f1a25efc5 RelaxNG/publiset.rnc --- a/RelaxNG/publiset.rnc sam. avril 06 14:17:18 2013 +0200 +++ b/RelaxNG/publiset.rnc dim. avril 07 17:05:34 2013 +0200 @@ -53,11 +53,13 @@ composition.head.content = (title, shorttitle?, subtitle?)? - & identifier* + & (identifier, identifier?)? & copyright* & collection? & contributors? + & date? & keywordset? + & subjectset? & abstract? & cover? @@ -224,7 +226,7 @@ role.content = "author" | "illustrator" | "publisher" | "packager" -# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ keyword ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ keyword & subject ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # ~~~~~~ keywordset keywordset = element keywordset { keywordset.content } @@ -236,6 +238,16 @@ keyword.content = mixed { sup*, sub* } +# ~~~~~~ subjectset +subjectset = element subjectset { subjectset.content } + +subjectset.content = subject+ + +# ~~~~~~ subject +subject = element subject { subject.content } + +subject.content = xsd:NMTOKEN + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ abstract ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ abstract = element abstract { abstract.content } @@ -266,8 +278,10 @@ inlines = mixed { sup* & sub* + & date* & name* & highlight* + & link* } # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sub, sup ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -276,6 +290,16 @@ sub = element sub { inlines } +# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ date ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +date = element date { date.attributes, date.content } + +date.attributes = + date.value.attribute +date.value.attribute = attribute value { xsd:date | xsd:gYearMonth | xsd:gYear } + +date.content = mixed { sup* } + # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ name = element name { name.attributes, name.content } @@ -283,7 +307,7 @@ name.attributes = name.of.attribute? name.of.attribute = attribute of - { "person" | "company" | "book" | "newspaper" | "party" } + { "person" | "company" | "book" | "newspaper" | "party" | "painting" } name.content = inlines