--- a/RelaxNG/publidoc.rnc mar. juil. 19 11:01:54 2011 +0200
+++ b/RelaxNG/publidoc.rnc mar. juil. 19 13:25:35 2011 +0200
@@ -132,7 +132,7 @@
publisher.content =
label,
- url?
+ link?
# ~~~~~~ firstname
firstname = element firstname { firstname.content }
@@ -156,11 +156,6 @@
role.of.attribute
role.of.attribute = attribute of { "author" | "illustrator" }
-# ~~~~~~ url
-url = element url { url.content }
-
-url.content = xsd:anyURI
-
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ place ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
place = element place { place.content }
@@ -420,7 +415,7 @@
block.head?,
image+,
caption?,
- url?
+ link?
# ~~~~~~ image
image = element image { image.attributes, image.content }
@@ -480,7 +475,7 @@
number.content = mixed { sup* }
number.roman.content = xsd:token {pattern = "[dlxvi]+"}
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ date ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ date ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
date = element date { date.attributes, date.content }
@@ -492,7 +487,7 @@
date.content = mixed { sup* }
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
name = element name { name.attributes, name.content }
@@ -503,7 +498,7 @@
name.content = inlines
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ note ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ note ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note = element note { note.attributes, note.content }
@@ -515,7 +510,7 @@
inlines
| p+
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ foreign ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ foreign ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
foreign = element foreign { foreign.attributes, foreign.content }
@@ -524,42 +519,43 @@
foreign.content = inlines
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ highlight ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ highlight ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
highlight = element highlight { highlight.content }
highlight.content = inlines
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mentioned ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mentioned ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mentioned = element mentioned { mentioned.content }
mentioned.content = inlines
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ quote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ quote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
quote = element quote { quote.content }
quote.content = inlines
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ acronym ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ acronym ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
acronym = element acronym { acronym.content }
acronym.content = inlines
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ term ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ term ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
term = element term { term.content }
term.content = inlines
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ link ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ link ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
link = element link { link.attributes, link.content }
link.attributes =
- (uri.attribute | idref.attribute)?
+ uri.attribute
+ | idref.attribute
uri.attribute = attribute uri { xsd:anyURI }
idref.attribute = attribute idref { xsd:IDREF }
--- a/RelaxNG/publidoc.rng mar. juil. 19 11:01:54 2011 +0200
+++ b/RelaxNG/publidoc.rng mar. juil. 19 13:25:35 2011 +0200
@@ -313,7 +313,7 @@
<define name="publisher.content">
<ref name="label"/>
<optional>
- <ref name="url"/>
+ <ref name="link"/>
</optional>
</define>
<!-- ~~~~~~ firstname -->
@@ -360,15 +360,6 @@
</choice>
</attribute>
</define>
- <!-- ~~~~~~ url -->
- <define name="url">
- <element name="url">
- <ref name="url.content"/>
- </element>
- </define>
- <define name="url.content">
- <data type="anyURI"/>
- </define>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ place ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<define name="place">
<element name="place">
@@ -905,7 +896,7 @@
<ref name="caption"/>
</optional>
<optional>
- <ref name="url"/>
+ <ref name="link"/>
</optional>
</define>
<!-- ~~~~~~ image -->
@@ -1042,7 +1033,7 @@
<param name="pattern">[dlxvi]+</param>
</data>
</define>
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ date ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ date ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<define name="date">
<element name="date">
<ref name="date.attributes"/>
@@ -1081,7 +1072,7 @@
</zeroOrMore>
</mixed>
</define>
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<define name="name">
<element name="name">
<ref name="name.attributes"/>
@@ -1107,7 +1098,7 @@
<define name="name.content">
<ref name="inlines"/>
</define>
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ note ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ note ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<define name="note">
<element name="note">
<ref name="note.attributes"/>
@@ -1130,7 +1121,7 @@
</oneOrMore>
</choice>
</define>
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ foreign ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ foreign ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<define name="foreign">
<element name="foreign">
<ref name="foreign.attributes"/>
@@ -1145,7 +1136,7 @@
<define name="foreign.content">
<ref name="inlines"/>
</define>
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ highlight ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ highlight ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<define name="highlight">
<element name="highlight">
<ref name="highlight.content"/>
@@ -1154,7 +1145,7 @@
<define name="highlight.content">
<ref name="inlines"/>
</define>
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mentioned ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ mentioned ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<define name="mentioned">
<element name="mentioned">
<ref name="mentioned.content"/>
@@ -1163,7 +1154,7 @@
<define name="mentioned.content">
<ref name="inlines"/>
</define>
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ quote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ quote ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<define name="quote">
<element name="quote">
<ref name="quote.content"/>
@@ -1172,7 +1163,7 @@
<define name="quote.content">
<ref name="inlines"/>
</define>
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ acronym ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ acronym ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<define name="acronym">
<element name="acronym">
<ref name="acronym.content"/>
@@ -1181,7 +1172,7 @@
<define name="acronym.content">
<ref name="inlines"/>
</define>
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ term ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ term ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<define name="term">
<element name="term">
<ref name="term.content"/>
@@ -1190,7 +1181,7 @@
<define name="term.content">
<ref name="inlines"/>
</define>
- <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ link ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
+ <!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ link ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<define name="link">
<element name="link">
<ref name="link.attributes"/>
@@ -1198,12 +1189,10 @@
</element>
</define>
<define name="link.attributes">
- <optional>
- <choice>
- <ref name="uri.attribute"/>
- <ref name="idref.attribute"/>
- </choice>
- </optional>
+ <choice>
+ <ref name="uri.attribute"/>
+ <ref name="idref.attribute"/>
+ </choice>
</define>
<define name="uri.attribute">
<attribute name="uri">
--- a/RelaxNG/publiset.rnc mar. juil. 19 11:01:54 2011 +0200
+++ b/RelaxNG/publiset.rnc mar. juil. 19 13:25:35 2011 +0200
@@ -127,7 +127,7 @@
publisher.content =
label,
- url?
+ link?
# ~~~~~~ firstname
firstname = element firstname { firstname.content }
@@ -151,11 +151,6 @@
role.of.attribute
role.of.attribute = attribute of { "author" | "illustrator" }
-# ~~~~~~ url
-url = element url { url.content }
-
-url.content = xsd:anyURI
-
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# ~~~~~~ source
@@ -243,19 +238,9 @@
name.attribute
& uri.attribute?
name.attribute = attribute name { xsd:anyURI }
-uri.attribute = attribute uri { xsd:anyURI }
file.content = inlines
-# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ link ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-link = element link { link.attributes, link.content }
-
-link.attributes =
- uri.attribute
-
-link.content = inlines
-
# =============================================================================
# INLINE LEVEL
@@ -274,6 +259,16 @@
sub = element sub { inlines }
+# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ link ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+link = element link { link.attributes, link.content }
+
+link.attributes =
+ uri.attribute
+uri.attribute = attribute uri { xsd:anyURI }
+
+link.content = inlines
+
# =============================================================================
# REMAP ATTRIBUTES
--- a/RelaxNG/publiset.rng mar. juil. 19 11:01:54 2011 +0200
+++ b/RelaxNG/publiset.rng mar. juil. 19 13:25:35 2011 +0200
@@ -270,7 +270,7 @@
<define name="publisher.content">
<ref name="label"/>
<optional>
- <ref name="url"/>
+ <ref name="link"/>
</optional>
</define>
<!-- ~~~~~~ firstname -->
@@ -317,15 +317,6 @@
</choice>
</attribute>
</define>
- <!-- ~~~~~~ url -->
- <define name="url">
- <element name="url">
- <ref name="url.content"/>
- </element>
- </define>
- <define name="url.content">
- <data type="anyURI"/>
- </define>
<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ source ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
<!-- ~~~~~~ source -->
<define name="source">
@@ -505,27 +496,9 @@
<data type="anyURI"/>
</attribute>
</define>
- <define name="uri.attribute">
- <attribute name="uri">
- <data type="anyURI"/>
- </attribute>
- </define>
<define name="file.content">
<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>
<!--
=============================================================================
INLINE LEVEL
@@ -555,6 +528,24 @@
<ref name="inlines"/>
</element>
</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="uri.attribute">
+ <attribute name="uri">
+ <data type="anyURI"/>
+ </attribute>
+ </define>
+ <define name="link.content">
+ <ref name="inlines"/>
+ </define>
<!--
=============================================================================
REMAP ATTRIBUTES
--- a/Xml/Documents/torture_test.xml mar. juil. 19 11:01:54 2011 +0200
+++ b/Xml/Documents/torture_test.xml mar. juil. 19 13:25:35 2011 +0200
@@ -17,7 +17,7 @@
</author>
<publisher>
<label>Prismallia</label>
- <url>http://www.prismallia.fr</url>
+ <link uri="http://www.prismallia.fr"/>
</publisher>
<date value="2001-06"/>
<place>Paris</place>
@@ -252,6 +252,7 @@
<caption>
<p>Le logo de <name>Prismallia</name></p>
</caption>
+ <link uri="http://www.prismallia.fr"/>
</media>
</section>
</topic>
--- a/Xml/Sets/composition.xml mar. juil. 19 11:01:54 2011 +0200
+++ b/Xml/Sets/composition.xml mar. juil. 19 13:25:35 2011 +0200
@@ -12,7 +12,7 @@
</author>
<publisher>
<label>Prismallia</label>
- <url>http://www.prismallia.fr</url>
+ <link uri="http://www.prismallia.fr">Prismallia</link>
</publisher>
<cover><image id="composition"/></cover>
</head>