RelaxNG/publiset.rnc
changeset 30 c0f9e813c039
parent 29 0bd36d3b6a5a
child 34 c51d5097d065
--- a/RelaxNG/publiset.rnc	sam. juin 18 09:47:23 2011 +0200
+++ b/RelaxNG/publiset.rnc	sam. juin 18 15:40:14 2011 +0200
@@ -40,7 +40,7 @@
 
 composition.content =
    composition.head?,
-   (composition.file | composition.division)+
+   (composition.division | composition.file)+
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ selection ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
@@ -52,12 +52,11 @@
 selection.attributes =
    selection.id.attribute
  & path.attribute?
- & xpath.attribute?
 selection.id.attribute = attribute xml:id { xsd:ID }
 
 selection.content =
    selection.head?,
-   (selection.file | selection.division)+
+   (selection.division | selection.file | link)+
 
 
 # =============================================================================
@@ -168,14 +167,13 @@
  & remap.attributes
 selection.division.attributes =
    path.attribute?
- & xpath.attribute?
 
 composition.division.content =
    composition.head?,
    (composition.division | composition.file)+
 selection.division.content =
    selection.head?,
-   (selection.division | selection.file)+
+   (selection.division | selection.file | link)+
 
 
 # =============================================================================
@@ -184,18 +182,32 @@
 
 # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ file ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
-composition.file = element file { composition.file.attributes, file.content }
+composition.file = element file { composition.file.attributes }
 selection.file = element file { selection.file.attributes, file.content }
 
 composition.file.attributes =
-   xpath.attribute?
+   name.attribute
+ & xpath.attribute?
  & xslt.attribute?
  & remap.attributes
 selection.file.attributes =
-   xpath.attribute?
+   name.attribute
+ & uri.attribute?
+name.attribute = attribute name { xsd:anyURI }
+uri.attribute = attribute uri { xsd:anyURI }
 
-file.content = xsd:anyURI
-   
+file.content = inlines
+
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ link ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+link = element link { link.attributes, link.content }
+
+link.attributes =
+   uri.attribute
+
+link.content = inlines
+
+
 # =============================================================================
 #                                 INLINE LEVEL
 # =============================================================================