--- a/RelaxNG/publiset.rnc mer. avril 16 13:07:05 2014 +0200
+++ b/RelaxNG/publiset.rnc jeu. avril 24 20:36:03 2014 +0200
@@ -16,146 +16,6 @@
(composition | selection)+
-# =============================================================================
-# TOP LEVEL
-# =============================================================================
-
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ composition ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-# ~~~~~~ composition
-composition = element composition {
- composition.attributes,
- composition.content
-}
-
-composition.attributes =
- composition.id.attribute
- & path.attribute?
- & (xpath.attribute | xslt.attribute)?
- & remap.attributes
- & lang.attribute?
-composition.id.attribute = attribute id { xsd:NMTOKEN }
-path.attribute = attribute path { xsd:anyURI }
-xslt.attribute = attribute xslt { xsd:anyURI }
-xpath.attribute = attribute xpath { text }
-lang.attribute = attribute xml:lang { xsd:language }
-
-composition.content =
- composition.head?,
- (composition.division | composition.file)+
-
-# ~~~~~~ composition.head
-composition.head = element head {
- composition.head.attributes, composition.head.content }
-
-composition.head.attributes =
- remap.attributes
-
-composition.head.content =
- (title, shorttitle?, subtitle*)?
- & identifier*
- & copyright*
- & collection?
- & contributors?
- & date?
- & (source, source?)?
- & keywordset?
- & subjectset?
- & head.index*
- & abstract?
- & cover?
-
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ selection ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-# ~~~~~~ selection
-selection = element selection {
- selection.attributes,
- selection.content
-}
-
-selection.attributes =
- selection.id.attribute
- & path.attribute?
- & lang.attribute?
-selection.id.attribute = attribute id { xsd:NMTOKEN }
-
-selection.content =
- selection.head?,
- (selection.division | selection.file | link)+
-
-# ~~~~~~ selection.head
-selection.head = element head { composition.head.content }
-
-
-# =============================================================================
-# DIVISION LEVEL
-# =============================================================================
-
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ division ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-# ~~~~~~ division
-composition.division = element division {
- composition.division.attributes,
- composition.division.content
-}
-selection.division = element division {
- selection.division.attributes,
- selection.division.content
-}
-
-composition.division.attributes =
- path.attribute?
- & (xpath.attribute | xslt.attribute)?
- & remap.attributes
-selection.division.attributes =
- path.attribute?
-
-composition.division.content =
- composition.head?,
- (composition.division | composition.file)+
-selection.division.content =
- selection.head?,
- (selection.division | selection.file | link)+
-
-# ~~~~~~ division.head
-division.head = element head { division.head.content }
-
-division.head.content =
- (title, shorttitle?, subtitle*)?
- & head.index*
-
-
-# =============================================================================
-# FILE LEVEL
-# =============================================================================
-
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ file ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-composition.file = element file { composition.file.attributes, file.content }
-selection.file = element file { selection.file.attributes, file.content }
-
-composition.file.attributes =
- path.attribute?
- & (xpath.attribute | xslt.attribute)?
- & argument.attribute?
-selection.file.attributes =
- path.attribute?
-argument.attribute = attribute argument { text }
-
-file.content = xsd:anyURI
-
-
-# =============================================================================
-# BLOCK LEVEL
-# =============================================================================
-
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ p ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-p = element p { p.content }
-
-p.content =
- inlines
-
# =============================================================================
# HEAD LEVEL
@@ -324,6 +184,147 @@
# =============================================================================
+# TOP LEVEL
+# =============================================================================
+
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ composition ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# ~~~~~~ composition
+composition = element composition {
+ composition.attributes,
+ composition.content
+}
+
+composition.attributes =
+ composition.id.attribute
+ & path.attribute?
+ & (xpath.attribute | xslt.attribute)?
+ & remap.attributes
+ & lang.attribute?
+composition.id.attribute = attribute id { xsd:NMTOKEN }
+path.attribute = attribute path { xsd:anyURI }
+xslt.attribute = attribute xslt { xsd:anyURI }
+xpath.attribute = attribute xpath { text }
+lang.attribute = attribute xml:lang { xsd:language }
+
+composition.content =
+ composition.head?,
+ (composition.division | composition.file)+
+
+# ~~~~~~ composition.head
+composition.head = element head {
+ composition.head.attributes, composition.head.content }
+
+composition.head.attributes =
+ remap.attributes
+
+composition.head.content =
+ (title, shorttitle?, subtitle*)?
+ & identifier*
+ & copyright*
+ & collection?
+ & contributors?
+ & date?
+ & (source, source?)?
+ & keywordset?
+ & subjectset?
+ & head.index*
+ & abstract?
+ & cover?
+
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ selection ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# ~~~~~~ selection
+selection = element selection {
+ selection.attributes,
+ selection.content
+}
+
+selection.attributes =
+ selection.id.attribute
+ & path.attribute?
+ & lang.attribute?
+selection.id.attribute = attribute id { xsd:NMTOKEN }
+
+selection.content =
+ selection.head?,
+ (selection.division | selection.file | link)+
+
+# ~~~~~~ selection.head
+selection.head = element head { composition.head.content }
+
+
+# =============================================================================
+# DIVISION LEVEL
+# =============================================================================
+
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ division ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+# ~~~~~~ division
+composition.division = element division {
+ composition.division.attributes,
+ composition.division.content
+}
+selection.division = element division {
+ selection.division.attributes,
+ selection.division.content
+}
+
+composition.division.attributes =
+ path.attribute?
+ & (xpath.attribute | xslt.attribute)?
+ & remap.attributes
+selection.division.attributes =
+ path.attribute?
+
+composition.division.content =
+ composition.head?,
+ (composition.division | composition.file)+
+selection.division.content =
+ selection.head?,
+ (selection.division | selection.file | link)+
+
+# ~~~~~~ division.head
+division.head = element head { division.head.content }
+
+division.head.content =
+ (title, shorttitle?, subtitle*)?
+ & head.index*
+
+
+# =============================================================================
+# FILE LEVEL
+# =============================================================================
+
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ file ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+composition.file = element file { composition.file.attributes, file.content }
+selection.file = element file { selection.file.attributes, file.content }
+
+composition.file.attributes =
+ path.attribute?
+ & (xpath.attribute | xslt.attribute)?
+ & argument.attribute?
+selection.file.attributes =
+ path.attribute?
+argument.attribute = attribute argument { text }
+
+file.content = xsd:anyURI
+
+
+# =============================================================================
+# BLOCK LEVEL
+# =============================================================================
+
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ p ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+p = element p { p.content }
+
+p.content =
+ inlines
+
+
+# =============================================================================
# INLINE LEVEL
# =============================================================================