--- a/RelaxNG/publiset.rnc dim. juin 12 14:28:07 2011 +0200
+++ b/RelaxNG/publiset.rnc dim. juin 12 15:21:35 2011 +0200
@@ -17,7 +17,7 @@
# =============================================================================
-# Top level
+# TOP LEVEL
# =============================================================================
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ composition ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -35,7 +35,7 @@
base.attribute = attribute xml:base { xsd:anyURI }
composition.content =
- composition.metadata?,
+ composition.head?,
(composition.file | composition.division)+
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ selection ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -50,31 +50,33 @@
selection.id.attribute = attribute xml:id { xsd:ID }
selection.content =
- selection.metadata?,
+ selection.head?,
(selection.file | selection.division)+
# =============================================================================
-# Metadata level
+# HEAD LEVEL
# =============================================================================
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ metadata ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ head ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-composition.metadata = element metadata {
- metadata.attributes,
- metadata.content
-}
-selection.metadata = element metadata { metadata.content }
+composition.head = element head { head.attributes, top.head.content }
+selection.head = element head { top.head.content }
+division.head = element head { division.head.content }
-metadata.attributes =
+head.attributes =
remap.attributes
-metadata.content =
+top.head.content =
(title, subtitle?)?
& language?
& author*
& publisher?
& source?
+division.head.content =
+ (title, subtitle?)?
+ & language?
+ & annotation*
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ title, subtitle ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -142,7 +144,7 @@
# =============================================================================
-# Division level
+# DIVISION LEVEL
# =============================================================================
composition.division = element division {
@@ -161,15 +163,15 @@
base.attribute?
composition.division.content =
- composition.metadata?,
- (composition.file | composition.division)+
+ composition.head?,
+ (composition.division | composition.file)+
selection.division.content =
- selection.metadata?,
- (selection.file | selection.division)+
+ selection.head?,
+ (selection.division | selection.file)+
# =============================================================================
-# File level
+# FILE LEVEL
# =============================================================================
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ file ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -179,15 +181,19 @@
composition.file.attributes =
xpath.attribute?
+ & transform.attribute?
& remap.attributes
selection.file.attributes =
xpath.attribute?
+ & transform.attribute?
xpath.attribute = attribute xpath { text }
+transform.attribute =
+ attribute transform {list { (xsd:token {pattern = "(xsl|regex):\S+"})+ }}
file.content = xsd:anyURI
# =============================================================================
-# Inline level
+# INLINE LEVEL
# =============================================================================
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ inlines ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -205,7 +211,7 @@
# =============================================================================
-# Remap attributes
+# REMAP ATTRIBUTES
# =============================================================================
remap.attributes =