Nettoyage de la présentation
authorPatrick PIERRE <patrick.pierre@prismallia.fr>
dim., 05 juin 2011 16:26:16 +0200
changeset 2 417bb62f2a77
parent 1 5f332cc7150a
child 3 59e42ac69f8f
Nettoyage de la présentation
Data/Sets/topic_set.xml
RelaxNG/publidoc.rnc
RelaxNG/publidoc.rng
RelaxNG/publiset.rnc
RelaxNG/publiset.rng
--- a/Data/Sets/topic_set.xml	dim. juin 05 12:02:50 2011 +0200
+++ b/Data/Sets/topic_set.xml	dim. juin 05 16:26:16 2011 +0200
@@ -12,8 +12,8 @@
         <metadata>
           <title>Les événements</title>
         </metadata>
-        <file name="../Topics/centre_pompidou.xml"/>
-        <file name="../Topics/chasseurs.xml"/>
+        <file>../Topics/centre_pompidou.xml"</file>
+        <file>../Topics/chasseurs.xml"</file>
       </division>
 
       <!-- =========================== Brèves ============================= -->
@@ -21,7 +21,7 @@
         <metadata>
           <title>Les brèves</title>
         </metadata>
-        <file name="../Topics/portugal_ue.xml"/>
+        <file>../Topics/portugal_ue.xml</file>
       </division>
       
       <!-- =========================== Photos ============================= -->
@@ -29,7 +29,7 @@
         <metadata>
           <title>Les photos légendées</title>
         </metadata>
-        <file name="../Topics/roi_belge.xml"/>
+        <file>../Topics/roi_belge.xml</file>
       </division>
       </division>
   </composition>
--- a/RelaxNG/publidoc.rnc	dim. juin 05 12:02:50 2011 +0200
+++ b/RelaxNG/publidoc.rnc	dim. juin 05 16:26:16 2011 +0200
@@ -8,13 +8,10 @@
    publidoc.content
 }
 
-# ~~~~~~ attributes
 publidoc.attributes =
    version.attribute
-
 version.attribute = attribute version { "1.0" }
 
-# ~~~~~~ content
 publidoc.content =
    document
  | top.topic
@@ -28,13 +25,10 @@
 
 document = element document { document.attributes, document.content }
 
-# ~~~~~~ attributes
 document.attributes =
    document.id.attribute
-
 document.id.attribute = attribute xml:id { xsd:ID }
 
-# ~~~~~~ content
 document.content =
    metadata?,
    (division+ | topic+)
@@ -65,19 +59,10 @@
  & abstract?
  & annotation*
 
-language = element language { language.attributes }
-language.attributes = lang.attribute
-lang.attribute = attribute xml:lang { xsd:language }
-
-place = element place { place.content }
-place.content = inlines
-
-abstract = element abstract { abstract.content }
-abstract.content = parag+
-
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ title, subtitle ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 title = element title { title.content }
+
 title.content = inlines
 
 subtitle = element subtitle { title.content }
@@ -94,8 +79,22 @@
 
 publisher.content = inlines
 
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Language ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+language = element language { language.attributes }
+
+language.attributes = lang.attribute
+lang.attribute = attribute xml:lang { xsd:language }
+
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ place ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+place = element place { place.content }
+
+place.content = inlines
+
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+# ~~~~~~ source
 source = element source {
    source.attributes,
    (  (attribute type { "book" }, source.content.book)
@@ -103,21 +102,19 @@
    source.content
 }
 
-# ~~~~~~ Attributes
 source.attributes =
    source.id.attribute
-
 source.id.attribute = attribute id { xsd:NMTOKEN }
 
-# ~~~~~~ Content
 source.content.book =
    title,
    pagenumber*
-
 source.content =
    annotation*
 
+# ~~~~~~ pagenumber
 pagenumber = element pagenumber { pagenumber.attributes }
+
 pagenumber.attributes =
    pagenumber.value.attribute
 pagenumber.value.attribute = attribute value { pagenumber.value.enumeration }
@@ -125,15 +122,25 @@
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ subject ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+# ~~~~~~ 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 =
+   parag+
+
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ annotation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 annotation = element annotation { annotation.content }
@@ -162,20 +169,15 @@
 
 topic = element topic { topic.attributes, topic.content }
 
-# ~~~~~~ attributes
 top.topic.attributes =
    topic.id.attribute
  & topic.type.attribute?
-
 topic.attributes =
    topic.id.attribute?
  & topic.type.attribute?
-
 topic.id.attribute = attribute xml:id { xsd:ID }
-
 topic.type.attribute = attribute type { xsd:NCName }
 
-# ~~~~~~ content
 topic.content =
    metadata?,
    section+
@@ -213,6 +215,7 @@
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ media ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+# ~~~~~~ media
 media = element media { media.content }
 
 media.content =
@@ -221,10 +224,13 @@
 
 media.id.attribute = attribute id { xsd:NMTOKEN }
 
+# ~~~~~~ caption
 media.caption = element caption { media.caption.content }
-media.caption.content = parag+
 
-# ~~~~~~ Image
+media.caption.content =
+   parag+
+
+# ~~~~~~ image
 image = element image { image.attributes, image.content }
 
 image.attributes =
@@ -233,6 +239,7 @@
 image.content =
    copyright?
 
+# ~~~~~~ copyright
 copyright = element copyright { copyright.content }
 copyright.content = inlines
 
@@ -269,33 +276,36 @@
 date = element date { date.attributes, date.content }
 
 date.attributes = date.of.attribute
-
 date.of.attribute = attribute of { date.of.enumeration }
 date.of.enumeration = "event" | "birth" | "death"
 
 date.content = xsd:date | xsd:gYearMonth | xsd:gYear
 
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 firstname = element firstname { inlines }
 
 lastname = element lastname { inlines }
 
 name = element name { name.attributes, name.content }
-name.attributes = name.of.attribute?
-name.content = inlines
+
+name.attributes =
+   name.of.attribute?
 name.of.attribute = attribute of { name.of.enumeration }
 name.of.enumeration = "person" | "company" | "book" | "newspaper" | "party"
 
+name.content = inlines
+
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ footnote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 footnote = element footnote { footnote.attributes, footnote.content }
 
-footnote.attributes = footnote.label.attribute?
-
+footnote.attributes =
+   footnote.label.attribute?
 footnote.label.attribute = attribute label { text }
 
-footnote.content = parag+
+footnote.content =
+   parag+
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ foreign ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
--- a/RelaxNG/publidoc.rng	dim. juin 05 12:02:50 2011 +0200
+++ b/RelaxNG/publidoc.rng	dim. juin 05 16:26:16 2011 +0200
@@ -10,7 +10,6 @@
       <ref name="publidoc.content"/>
     </element>
   </define>
-  <!-- ~~~~~~ attributes -->
   <define name="publidoc.attributes">
     <ref name="version.attribute"/>
   </define>
@@ -19,7 +18,6 @@
       <value>1.0</value>
     </attribute>
   </define>
-  <!-- ~~~~~~ content -->
   <define name="publidoc.content">
     <choice>
       <ref name="document"/>
@@ -38,7 +36,6 @@
       <ref name="document.content"/>
     </element>
   </define>
-  <!-- ~~~~~~ attributes -->
   <define name="document.attributes">
     <ref name="document.id.attribute"/>
   </define>
@@ -47,7 +44,6 @@
       <data type="ID"/>
     </attribute>
   </define>
-  <!-- ~~~~~~ content -->
   <define name="document.content">
     <optional>
       <ref name="metadata"/>
@@ -114,37 +110,6 @@
       </zeroOrMore>
     </interleave>
   </define>
-  <define name="language">
-    <element name="language">
-      <ref name="language.attributes"/>
-    </element>
-  </define>
-  <define name="language.attributes">
-    <ref name="lang.attribute"/>
-  </define>
-  <define name="lang.attribute">
-    <attribute name="xml:lang">
-      <data type="language"/>
-    </attribute>
-  </define>
-  <define name="place">
-    <element name="place">
-      <ref name="place.content"/>
-    </element>
-  </define>
-  <define name="place.content">
-    <ref name="inlines"/>
-  </define>
-  <define name="abstract">
-    <element name="abstract">
-      <ref name="abstract.content"/>
-    </element>
-  </define>
-  <define name="abstract.content">
-    <oneOrMore>
-      <ref name="parag"/>
-    </oneOrMore>
-  </define>
   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ title, subtitle ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
   <define name="title">
     <element name="title">
@@ -179,7 +144,31 @@
   <define name="publisher.content">
     <ref name="inlines"/>
   </define>
+  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Language ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+  <define name="language">
+    <element name="language">
+      <ref name="language.attributes"/>
+    </element>
+  </define>
+  <define name="language.attributes">
+    <ref name="lang.attribute"/>
+  </define>
+  <define name="lang.attribute">
+    <attribute name="xml:lang">
+      <data type="language"/>
+    </attribute>
+  </define>
+  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ place ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+  <define name="place">
+    <element name="place">
+      <ref name="place.content"/>
+    </element>
+  </define>
+  <define name="place.content">
+    <ref name="inlines"/>
+  </define>
   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+  <!-- ~~~~~~ source -->
   <define name="source">
     <element name="source">
       <ref name="source.attributes"/>
@@ -197,7 +186,6 @@
       <ref name="source.content"/>
     </element>
   </define>
-  <!-- ~~~~~~ Attributes -->
   <define name="source.attributes">
     <ref name="source.id.attribute"/>
   </define>
@@ -206,7 +194,6 @@
       <data type="NMTOKEN"/>
     </attribute>
   </define>
-  <!-- ~~~~~~ Content -->
   <define name="source.content.book">
     <ref name="title"/>
     <zeroOrMore>
@@ -218,6 +205,7 @@
       <ref name="annotation"/>
     </zeroOrMore>
   </define>
+  <!-- ~~~~~~ pagenumber -->
   <define name="pagenumber">
     <element name="pagenumber">
       <ref name="pagenumber.attributes"/>
@@ -235,6 +223,7 @@
     <data type="positiveInteger"/>
   </define>
   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ subject ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+  <!-- ~~~~~~ subjectset -->
   <define name="subjectset">
     <element name="subjectset">
       <ref name="subjectset.content"/>
@@ -245,6 +234,7 @@
       <ref name="subject"/>
     </oneOrMore>
   </define>
+  <!-- ~~~~~~ subject -->
   <define name="subject">
     <element name="subject">
       <ref name="subject.attributes"/>
@@ -258,6 +248,17 @@
       <data type="NMTOKEN"/>
     </attribute>
   </define>
+  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ abstract ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+  <define name="abstract">
+    <element name="abstract">
+      <ref name="abstract.content"/>
+    </element>
+  </define>
+  <define name="abstract.content">
+    <oneOrMore>
+      <ref name="parag"/>
+    </oneOrMore>
+  </define>
   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ annotation ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
   <define name="annotation">
     <element name="annotation">
@@ -303,7 +304,6 @@
       <ref name="topic.content"/>
     </element>
   </define>
-  <!-- ~~~~~~ attributes -->
   <define name="top.topic.attributes">
     <interleave>
       <ref name="topic.id.attribute"/>
@@ -332,7 +332,6 @@
       <data type="NCName"/>
     </attribute>
   </define>
-  <!-- ~~~~~~ content -->
   <define name="topic.content">
     <optional>
       <ref name="metadata"/>
@@ -399,6 +398,7 @@
     </interleave>
   </define>
   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ media ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+  <!-- ~~~~~~ media -->
   <define name="media">
     <element name="media">
       <ref name="media.content"/>
@@ -417,6 +417,7 @@
       <data type="NMTOKEN"/>
     </attribute>
   </define>
+  <!-- ~~~~~~ caption -->
   <define name="media.caption">
     <element name="caption">
       <ref name="media.caption.content"/>
@@ -427,7 +428,7 @@
       <ref name="parag"/>
     </oneOrMore>
   </define>
-  <!-- ~~~~~~ Image -->
+  <!-- ~~~~~~ image -->
   <define name="image">
     <element name="image">
       <ref name="image.attributes"/>
@@ -442,6 +443,7 @@
       <ref name="copyright"/>
     </optional>
   </define>
+  <!-- ~~~~~~ copyright -->
   <define name="copyright">
     <element name="copyright">
       <ref name="copyright.content"/>
@@ -534,7 +536,7 @@
       <data type="gYear"/>
     </choice>
   </define>
-  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+  <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
   <define name="firstname">
     <element name="firstname">
       <ref name="inlines"/>
@@ -556,9 +558,6 @@
       <ref name="name.of.attribute"/>
     </optional>
   </define>
-  <define name="name.content">
-    <ref name="inlines"/>
-  </define>
   <define name="name.of.attribute">
     <attribute name="of">
       <ref name="name.of.enumeration"/>
@@ -573,6 +572,9 @@
       <value>party</value>
     </choice>
   </define>
+  <define name="name.content">
+    <ref name="inlines"/>
+  </define>
   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ footnote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
   <define name="footnote">
     <element name="footnote">
--- a/RelaxNG/publiset.rnc	dim. juin 05 12:02:50 2011 +0200
+++ b/RelaxNG/publiset.rnc	dim. juin 05 16:26:16 2011 +0200
@@ -8,13 +8,10 @@
    publiset.content
 }
 
-# ~~~~~~ attributes
 publiset.attributes =
    version.attribute
-
 version.attribute = attribute version { "1.0" }
 
-# ~~~~~~ content
 publiset.content =
    (composition | selection)+
 
@@ -30,16 +27,13 @@
    composition.content
 }
 
-# ~~~~~~ attributes
 composition.attributes =
    composition.id.attribute
  & base.attribute?
  & remap.attributes
-
 composition.id.attribute = attribute xml:id { xsd:ID }
 base.attribute = attribute xml:base { xsd:anyURI }
 
-# ~~~~~~ content
 composition.content =
    composition.metadata?,
    (composition.file | composition.division)+
@@ -51,13 +45,10 @@
    selection.content
 }
 
-# ~~~~~~ attributes
 selection.attributes =
    base.attribute?
-
 selection.id.attribute = attribute xml:id { xsd:ID }
 
-# ~~~~~~ content
 selection.content =
    selection.metadata?,
    (selection.file | selection.division)+
@@ -73,14 +64,11 @@
    metadata.attributes,
    metadata.content
 }
-
 selection.metadata = element metadata { metadata.content }
 
-# ~~~~~~ attributes
 metadata.attributes =
    remap.attributes
 
-# ~~~~~~ content
 metadata.content =
    title?,
    subtitle?,
@@ -89,31 +77,32 @@
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ title, subtitle ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
 title = element title { title.content }
+
 title.content = inlines
 
 subtitle = element subtitle { title.content }
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+# ~~~~~~ source
 source = element source {
    source.attributes,
    (  (attribute type { "book" }, source.content.book)
     | (attribute type { "file" }))
 }
 
-# ~~~~~~ Attributes
 source.attributes =
    source.id.attribute?
  & remap.attributes
-
 source.id.attribute = attribute id { xsd:NMTOKEN }
 
-# ~~~~~~ Content
 source.content.book =
    title?,
    pagenumber?
 
+# ~~~~~~ pagenumber
 pagenumber = element pagenumber { pagenumber.attributes }
+
 pagenumber.attributes =
    pagenumber.value.attribute
 pagenumber.value.attribute = attribute value { pagenumber.value.enumeration }
@@ -128,25 +117,20 @@
    composition.division.attributes,
    composition.division.content
 }
-
 selection.division = element division {
    selection.division.attributes,
    selection.division.content
 }
 
-# ~~~~~~ attributes
 composition.division.attributes =
    base.attribute?
  & remap.attributes
-
 selection.division.attributes =
    base.attribute?
 
-# ~~~~~~ content
 composition.division.content =
    composition.metadata?,
    (composition.file | composition.division)+
-
 selection.division.content =
    selection.metadata?,
    (selection.file | selection.division)+
@@ -158,24 +142,18 @@
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 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 }
 
-selection.file = element file { selection.file.attributes }
-
-# ~~~~~~ attributes
 composition.file.attributes =
-   name.attribute
- & xpath.attribute?
+   xpath.attribute?
  & remap.attributes
-
 selection.file.attributes =
-   name.attribute
- & xpath.attribute?
-
-name.attribute = attribute name { text }
+   xpath.attribute?
 xpath.attribute = attribute xpath { text }
 
-
+file.content = xsd:anyURI
+   
 # =============================================================================
 #                                 Inline level
 # =============================================================================
@@ -201,7 +179,6 @@
 remap.attributes =
    as.attribute?
  & attributes.attribute?
-
 as.attribute = attribute as { xsd:QName }
 attributes.attribute =
    attribute attributes {list { (xsd:token {pattern = "\c+=\S+"})+ }}
--- a/RelaxNG/publiset.rng	dim. juin 05 12:02:50 2011 +0200
+++ b/RelaxNG/publiset.rng	dim. juin 05 16:26:16 2011 +0200
@@ -10,7 +10,6 @@
       <ref name="publiset.content"/>
     </element>
   </define>
-  <!-- ~~~~~~ attributes -->
   <define name="publiset.attributes">
     <ref name="version.attribute"/>
   </define>
@@ -19,7 +18,6 @@
       <value>1.0</value>
     </attribute>
   </define>
-  <!-- ~~~~~~ content -->
   <define name="publiset.content">
     <oneOrMore>
       <choice>
@@ -40,7 +38,6 @@
       <ref name="composition.content"/>
     </element>
   </define>
-  <!-- ~~~~~~ attributes -->
   <define name="composition.attributes">
     <interleave>
       <ref name="composition.id.attribute"/>
@@ -60,7 +57,6 @@
       <data type="anyURI"/>
     </attribute>
   </define>
-  <!-- ~~~~~~ content -->
   <define name="composition.content">
     <optional>
       <ref name="composition.metadata"/>
@@ -79,7 +75,6 @@
       <ref name="selection.content"/>
     </element>
   </define>
-  <!-- ~~~~~~ attributes -->
   <define name="selection.attributes">
     <optional>
       <ref name="base.attribute"/>
@@ -90,7 +85,6 @@
       <data type="ID"/>
     </attribute>
   </define>
-  <!-- ~~~~~~ content -->
   <define name="selection.content">
     <optional>
       <ref name="selection.metadata"/>
@@ -119,11 +113,9 @@
       <ref name="metadata.content"/>
     </element>
   </define>
-  <!-- ~~~~~~ attributes -->
   <define name="metadata.attributes">
     <ref name="remap.attributes"/>
   </define>
-  <!-- ~~~~~~ content -->
   <define name="metadata.content">
     <optional>
       <ref name="title"/>
@@ -150,6 +142,7 @@
     </element>
   </define>
   <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+  <!-- ~~~~~~ source -->
   <define name="source">
     <element name="source">
       <ref name="source.attributes"/>
@@ -166,7 +159,6 @@
       </choice>
     </element>
   </define>
-  <!-- ~~~~~~ Attributes -->
   <define name="source.attributes">
     <interleave>
       <optional>
@@ -180,7 +172,6 @@
       <data type="NMTOKEN"/>
     </attribute>
   </define>
-  <!-- ~~~~~~ Content -->
   <define name="source.content.book">
     <optional>
       <ref name="title"/>
@@ -189,6 +180,7 @@
       <ref name="pagenumber"/>
     </optional>
   </define>
+  <!-- ~~~~~~ pagenumber -->
   <define name="pagenumber">
     <element name="pagenumber">
       <ref name="pagenumber.attributes"/>
@@ -222,7 +214,6 @@
       <ref name="selection.division.content"/>
     </element>
   </define>
-  <!-- ~~~~~~ attributes -->
   <define name="composition.division.attributes">
     <interleave>
       <optional>
@@ -236,7 +227,6 @@
       <ref name="base.attribute"/>
     </optional>
   </define>
-  <!-- ~~~~~~ content -->
   <define name="composition.division.content">
     <optional>
       <ref name="composition.metadata"/>
@@ -268,17 +258,17 @@
   <define name="composition.file">
     <element name="file">
       <ref name="composition.file.attributes"/>
+      <ref name="file.content"/>
     </element>
   </define>
   <define name="selection.file">
     <element name="file">
       <ref name="selection.file.attributes"/>
+      <ref name="file.content"/>
     </element>
   </define>
-  <!-- ~~~~~~ attributes -->
   <define name="composition.file.attributes">
     <interleave>
-      <ref name="name.attribute"/>
       <optional>
         <ref name="xpath.attribute"/>
       </optional>
@@ -286,19 +276,16 @@
     </interleave>
   </define>
   <define name="selection.file.attributes">
-    <interleave>
-      <ref name="name.attribute"/>
-      <optional>
-        <ref name="xpath.attribute"/>
-      </optional>
-    </interleave>
-  </define>
-  <define name="name.attribute">
-    <attribute name="name"/>
+    <optional>
+      <ref name="xpath.attribute"/>
+    </optional>
   </define>
   <define name="xpath.attribute">
     <attribute name="xpath"/>
   </define>
+  <define name="file.content">
+    <data type="anyURI"/>
+  </define>
   <!--
     =============================================================================
                                     Inline level