--- a/RelaxNG/publidoc.rnc sam. juin 18 09:47:23 2011 +0200
+++ b/RelaxNG/publidoc.rnc sam. juin 18 15:40:14 2011 +0200
@@ -281,7 +281,9 @@
# ~~~~~~ item
item = element item { item.content }
-item.content = block+
+item.content =
+ inlines
+ | block+
# ~~~~~~ glossary.item
glossary.item = element item { glossary.item.content }
--- a/RelaxNG/publidoc.rng sam. juin 18 09:47:23 2011 +0200
+++ b/RelaxNG/publidoc.rng sam. juin 18 15:40:14 2011 +0200
@@ -584,9 +584,12 @@
</element>
</define>
<define name="item.content">
- <oneOrMore>
- <ref name="block"/>
- </oneOrMore>
+ <choice>
+ <ref name="inlines"/>
+ <oneOrMore>
+ <ref name="block"/>
+ </oneOrMore>
+ </choice>
</define>
<!-- ~~~~~~ glossary.item -->
<define name="glossary.item">
--- 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
# =============================================================================
--- a/RelaxNG/publiset.rng sam. juin 18 09:47:23 2011 +0200
+++ b/RelaxNG/publiset.rng sam. juin 18 15:40:14 2011 +0200
@@ -77,8 +77,8 @@
</optional>
<oneOrMore>
<choice>
+ <ref name="composition.division"/>
<ref name="composition.file"/>
- <ref name="composition.division"/>
</choice>
</oneOrMore>
</define>
@@ -95,9 +95,6 @@
<optional>
<ref name="path.attribute"/>
</optional>
- <optional>
- <ref name="xpath.attribute"/>
- </optional>
</interleave>
</define>
<define name="selection.id.attribute">
@@ -111,8 +108,9 @@
</optional>
<oneOrMore>
<choice>
+ <ref name="selection.division"/>
<ref name="selection.file"/>
- <ref name="selection.division"/>
+ <ref name="link"/>
</choice>
</oneOrMore>
</define>
@@ -332,14 +330,9 @@
</interleave>
</define>
<define name="selection.division.attributes">
- <interleave>
- <optional>
- <ref name="path.attribute"/>
- </optional>
- <optional>
- <ref name="xpath.attribute"/>
- </optional>
- </interleave>
+ <optional>
+ <ref name="path.attribute"/>
+ </optional>
</define>
<define name="composition.division.content">
<optional>
@@ -360,6 +353,7 @@
<choice>
<ref name="selection.division"/>
<ref name="selection.file"/>
+ <ref name="link"/>
</choice>
</oneOrMore>
</define>
@@ -372,7 +366,6 @@
<define name="composition.file">
<element name="file">
<ref name="composition.file.attributes"/>
- <ref name="file.content"/>
</element>
</define>
<define name="selection.file">
@@ -383,6 +376,7 @@
</define>
<define name="composition.file.attributes">
<interleave>
+ <ref name="name.attribute"/>
<optional>
<ref name="xpath.attribute"/>
</optional>
@@ -393,12 +387,38 @@
</interleave>
</define>
<define name="selection.file.attributes">
- <optional>
- <ref name="xpath.attribute"/>
- </optional>
+ <interleave>
+ <ref name="name.attribute"/>
+ <optional>
+ <ref name="uri.attribute"/>
+ </optional>
+ </interleave>
+ </define>
+ <define name="name.attribute">
+ <attribute name="name">
+ <data type="anyURI"/>
+ </attribute>
+ </define>
+ <define name="uri.attribute">
+ <attribute name="uri">
+ <data type="anyURI"/>
+ </attribute>
</define>
<define name="file.content">
- <data type="anyURI"/>
+ <ref name="inlines"/>
+ </define>
+ <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ link ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <define name="link">
+ <element name="link">
+ <ref name="link.attributes"/>
+ <ref name="link.content"/>
+ </element>
+ </define>
+ <define name="link.attributes">
+ <ref name="uri.attribute"/>
+ </define>
+ <define name="link.content">
+ <ref name="inlines"/>
</define>
<!--
=============================================================================