# HG changeset patch # User Patrick PIERRE # Date 1311009028 -7200 # Node ID c70de8fae29df29adc9cf2d643126a4523e27e77 # Parent 057abb684d359935c7183d8a9b95a4513482037f Ajout d'un role pour les auteurs diff -r 057abb684d35 -r c70de8fae29d RelaxNG/publidoc.rnc --- a/RelaxNG/publidoc.rnc lun. juin 20 18:39:46 2011 +0200 +++ b/RelaxNG/publidoc.rnc lun. juil. 18 19:10:28 2011 +0200 @@ -105,9 +105,20 @@ # ~~~~~~ author author = element author { author.content } +author.attributes = + role.attribute? +role.attribute = attribute role { "author" | "illustrator" } + author.content = firstname?, - lastname + lastname, + role* + +role = element role { role.attributes } + +role.attributes = + role.of.attribute +role.of.attribute = attribute of { "author" | "illustrator" } # ~~~~~~ publisher publisher = element publisher { publisher.content } @@ -155,8 +166,7 @@ pagenumber.attributes = pagenumber.value.attribute -pagenumber.value.attribute = attribute value { pagenumber.value.enumeration } -pagenumber.value.enumeration = xsd:positiveInteger +pagenumber.value.attribute = attribute value { xsd:positiveInteger } # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ subject ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -443,8 +453,7 @@ date.value.attribute & date.of.attribute? date.value.attribute = attribute value { xsd:date | xsd:gYearMonth | xsd:gYear } -date.of.attribute = attribute of { date.of.enumeration } -date.of.enumeration = "birth" | "death" +date.of.attribute = attribute of { "birth" | "death" } date.content = mixed { sup* } @@ -454,8 +463,8 @@ name.attributes = name.of.attribute? -name.of.attribute = attribute of { name.of.enumeration } -name.of.enumeration = "person" | "company" | "book" | "newspaper" | "party" +name.of.attribute = attribute of + { "person" | "company" | "book" | "newspaper" | "party" } name.content = inlines diff -r 057abb684d35 -r c70de8fae29d RelaxNG/publidoc.rng --- a/RelaxNG/publidoc.rng lun. juin 20 18:39:46 2011 +0200 +++ b/RelaxNG/publidoc.rng lun. juil. 18 19:10:28 2011 +0200 @@ -252,11 +252,43 @@ + + + + + + + + + author + illustrator + + + + + + + + + + + + + + + + + + + author + illustrator + + @@ -343,12 +375,9 @@ - + - - - @@ -971,15 +1000,12 @@ - + + birth + death + - - - birth - death - - @@ -1001,18 +1027,15 @@ - + + person + company + book + newspaper + party + - - - person - company - book - newspaper - party - - diff -r 057abb684d35 -r c70de8fae29d Xml/Documents/torture_test.xml --- a/Xml/Documents/torture_test.xml lun. juin 20 18:39:46 2011 +0200 +++ b/Xml/Documents/torture_test.xml lun. juil. 18 19:10:28 2011 +0200 @@ -8,6 +8,10 @@ PatrickPIERRE + + Tien HaïNGUYEN + + Prismallia