# HG changeset patch # User Patrick PIERRE <patrick.pierre@prismallia.fr> # Date 1360486752 -3600 # Node ID ea989bffd98714b0c837d03d19b83f5939f5e895 # Parent 4e4c9b47f2a1fc77f7ef96344e01200aa4ce9eef Nouvelle structure de la balise <file> diff -r 4e4c9b47f2a1 -r ea989bffd987 RelaxNG/Examples/Sets/composition.xml --- a/RelaxNG/Examples/Sets/composition.xml lun. févr. 04 22:48:10 2013 +0100 +++ b/RelaxNG/Examples/Sets/composition.xml dim. févr. 10 09:59:12 2013 +0100 @@ -6,7 +6,8 @@ <head transform="composition.xsl"> <title>Exemple d'assemblage de sujets</title> <identifier type="ean">9781449328030</identifier> - <copyright>Prismallia, Paris, 2012</copyright> + <copyright>Prismallia, Paris, 2013</copyright> + <collection>Les chroniques</collection> <contributors> <contributor> <firstname>Patrick</firstname><lastname>PIERRE</lastname> @@ -37,8 +38,8 @@ <head> <title>Les événements</title> </head> - <file name="centre_pompidou.xml"/> - <file name="chasseurs.xml" xpath="*"/> + <file>centre_pompidou.xml</file> + <file xpath="*">chasseurs.xml</file> </division> <!-- =========================== Brèves ============================= --> @@ -46,7 +47,7 @@ <head> <title>Les brèves</title> </head> - <file name="../Topics/portugal_ue.xml" xslt="composition.xsl"/> + <file xslt="composition.xsl">../Topics/portugal_ue.xml</file> </division> <!-- =========================== Photos ============================= --> @@ -55,7 +56,7 @@ <title>Les photos avec légende</title> </head> <division as="topic" path="../Topics"> - <file name="prince_belge.xml" xpath="topic/section"/> + <file xpath="topic/section">prince_belge.xml</file> </division> </division> </division> diff -r 4e4c9b47f2a1 -r ea989bffd987 RelaxNG/Examples/Sets/proba.xml --- a/RelaxNG/Examples/Sets/proba.xml lun. févr. 04 22:48:10 2013 +0100 +++ b/RelaxNG/Examples/Sets/proba.xml dim. févr. 10 09:59:12 2013 +0100 @@ -16,7 +16,7 @@ <head> <title>Le cours</title> </head> - <file name="proba01.xml"/> + <file>proba01.xml</file> </division> <!-- ========================== Exercices =========================== --> @@ -24,7 +24,7 @@ <head> <title>Les exercices</title> </head> - <file name="choices-radio.xml"/> + <file>choices-radio.xml</file> </division> </division> </composition> diff -r 4e4c9b47f2a1 -r ea989bffd987 RelaxNG/Examples/Sets/selection.xml --- a/RelaxNG/Examples/Sets/selection.xml lun. févr. 04 22:48:10 2013 +0100 +++ b/RelaxNG/Examples/Sets/selection.xml dim. févr. 10 09:59:12 2013 +0100 @@ -4,32 +4,35 @@ <!-- ============================ SÉLECTION 1 =========================== --> <selection id="selection1" xml:lang="fr"> <head> - <title>Première sélection</title> + <title>Sélection de textes</title> </head> <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~ Événements ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <division path="../Topics"> <head> <title>Les événements</title> </head> - <file name="centre_pompidou.xml">Un nouveau Centre Pompidou</file> - <file name="chasseurs.xml">Les chasseurs contestent la loi</file> + <file>centre_pompidou.xml</file> + <file>chasseurs.xml</file> + <link uri="centre_pompidou.html">Un nouveau Centre Pompidou</link> + <link uri="chasseurs.html">Les chasseurs contestent la loi</link> </division> <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Brèves ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --> <division path="../Topics"> <head> <title>Les brèves</title> </head> - <file name="portugal_ue.xml">Lisbonne, samedi 1<sup>er</sup></file> + <file>portugal_ue.xml</file> + <link uri="portugal_ue.html">Lisbonne, samedi 1<sup>er</sup></link> </division> </selection> <!-- ============================ SÉLECTION 2 =========================== --> <selection id="selection2" xml:lang="fr"> <head> - <title>Deuxième sélection</title> + <title>Sélection de textes et de pages Web</title> </head> - <file name="../Topics/prince_belge.xml" - uri="../PrinceBelge/prince_belge.html">Prince Philippe</file> - <link uri="../TortureTest/torture_test.html">Torture test</link> + <file path="../Topics">prince_belge.xml</file> + <link uri="prince_belge.html">Prince Philippe</link> + <link uri="http://www.prismallia.fr">Prismallia</link> </selection> </publiset> diff -r 4e4c9b47f2a1 -r ea989bffd987 RelaxNG/publiset.rnc --- a/RelaxNG/publiset.rnc lun. févr. 04 22:48:10 2013 +0100 +++ b/RelaxNG/publiset.rnc dim. févr. 10 09:59:12 2013 +0100 @@ -126,19 +126,16 @@ # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ file ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -composition.file = element file { composition.file.attributes } +composition.file = element file { composition.file.attributes, file.content } selection.file = element file { selection.file.attributes, file.content } composition.file.attributes = - name.attribute - & path.attribute? + path.attribute? & (xpath.attribute | xslt.attribute)? selection.file.attributes = - name.attribute - & uri.attribute? -name.attribute = attribute name { xsd:anyURI } + path.attribute? -file.content = inlines +file.content = xsd:anyURI # =============================================================================