This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch site-model-rework
in repository https://gitbox.apache.org/repos/asf/maven-doxia-sitetools.git

commit 451e94c7e82e58c0f5e711ded74ae5276aab287a
Author: Michael Osipov <[email protected]>
AuthorDate: Sun Jun 25 00:46:36 2023 +0200

    first shot
---
 .../src/main/resources/default-site.xml            |   6 +-
 doxia-site-model/src/main/mdo/site.mdo             | 251 ++++++---------------
 2 files changed, 75 insertions(+), 182 deletions(-)

diff --git a/doxia-integration-tools/src/main/resources/default-site.xml 
b/doxia-integration-tools/src/main/resources/default-site.xml
index 7f7052f..fb841a8 100644
--- a/doxia-integration-tools/src/main/resources/default-site.xml
+++ b/doxia-integration-tools/src/main/resources/default-site.xml
@@ -18,7 +18,9 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-<project name="${project.name}">
+<site xmlns="http://maven.apache.org/SITE/2.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+  xsi:schemaLocation="http://maven.apache.org/SITE/2.0.0 
https://maven.apache.org/xsd/site-2.0.0.xsd";
+  name="${project.name}">
   <bannerLeft>
     <name>${project.name}</name>
   </bannerLeft>
@@ -35,4 +37,4 @@ under the License.
     <menu ref="modules" />
     <menu ref="reports" />
   </body>
-</project>
+</site>
diff --git a/doxia-site-model/src/main/mdo/site.mdo 
b/doxia-site-model/src/main/mdo/site.mdo
index 531a7e9..3edae0b 100644
--- a/doxia-site-model/src/main/mdo/site.mdo
+++ b/doxia-site-model/src/main/mdo/site.mdo
@@ -21,7 +21,7 @@ under the License.
 
 <model xmlns="http://codehaus-plexus.github.io/MODELLO/2.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:schemaLocation="http://codehaus-plexus.github.io/MODELLO/2.0.0 
https://codehaus-plexus.github.io/modello/xsd/modello-2.0.0.xsd";
   xml.namespace="http://maven.apache.org/SITE/${version}";
-  xml.schemaLocation="http://maven.apache.org/xsd/site-${version}.xsd";>
+  xml.schemaLocation="https://maven.apache.org/xsd/site-${version}.xsd";>
   <id>site</id>
   <name>Site</name>
   <description><![CDATA[
@@ -42,10 +42,10 @@ under the License.
   </defaults>
 
   <classes>
-    <class rootElement="true" xml.tagName="project" java.clone="deep">
+    <class rootElement="true" xml.tagName="site" java.clone="deep">
       <name>SiteModel</name>
       <description><![CDATA[
-         The <code>&lt;project&gt;</code> element is the root of the site 
decoration descriptor.
+         The <code>&lt;site&gt;</code> element is the root of the site 
decoration descriptor.
       ]]></description>
       <version>1.0.0+</version>
       <fields>
@@ -312,65 +312,7 @@ under the License.
       <name>Banner</name>
       <description>Banner logo on the masthead of the site.</description>
       <version>1.0.0+</version>
-      <fields>
-        <!-- Ideally we want attributes DOXIA-335 -->
-        <field>
-          <name>name</name>
-          <version>1.0.0+</version>
-          <description>The name of the banner.</description>
-          <type>String</type>
-          <identifier>true</identifier>
-        </field>
-        <field>
-          <name>src</name>
-          <version>1.0.0+</version>
-          <description>The source location of an image for the 
banner.</description>
-          <type>String</type>
-          <identifier>true</identifier>
-        </field>
-        <field>
-          <name>alt</name>
-          <version>1.0.0+</version>
-          <description>The alt description for the banner image.</description>
-          <type>String</type>
-          <identifier>true</identifier>
-        </field>
-        <field>
-          <name>href</name>
-          <version>1.0.0+</version>
-          <description>The href of a link to be used for the banner 
image.</description>
-          <type>String</type>
-          <identifier>true</identifier>
-        </field>
-        <field>
-          <name>border</name>
-          <description>The border to use for the banner image.</description>
-          <version>1.0.1+</version>
-          <type>String</type>
-          <identifier>true</identifier>
-        </field>
-        <field>
-          <name>width</name>
-          <description>The width to use for the banner image.</description>
-          <version>1.0.1+</version>
-          <type>String</type>
-          <identifier>true</identifier>
-        </field>
-        <field>
-          <name>height</name>
-          <description>The height to use for the banner image.</description>
-          <version>1.0.1+</version>
-          <type>String</type>
-          <identifier>true</identifier>
-        </field>
-        <field>
-          <name>title</name>
-          <version>1.3.0+</version>
-          <description>The title for the banner image.</description>
-          <type>String</type>
-          <identifier>true</identifier>
-        </field>
-      </fields>
+      <superClass>LinkItem</superClass>
     </class>
 
     <class java.clone="deep">
@@ -438,13 +380,6 @@ under the License.
       <description>The main content.</description>
       <version>1.0.0+</version>
       <fields>
-        <field>
-          <name>head</name>
-          <description>Additional content (like JavaScript) to include in the 
HEAD block of the generated pages.</description>
-          <version>1.0.0/1.6.0</version>
-          <type>DOM</type>
-          <identifier>true</identifier>
-        </field>
         <field>
           <name>head</name>
           <description>Additional content (like JavaScript) to include in the 
HEAD block of the generated pages.</description>
@@ -489,13 +424,6 @@ under the License.
           <type>String</type>
           <identifier>true</identifier>
         </field>
-        <field>
-          <name>footer</name>
-          <description>If present, the contained text will be used instead of 
the generated copyright text.</description>
-          <version>1.1.0/1.6.0</version>
-          <type>DOM</type>
-          <identifier>true</identifier>
-        </field>
       </fields>
     </class>
 
@@ -518,49 +446,6 @@ under the License.
           <type>String</type>
           <identifier>true</identifier>
         </field>
-        <field xml.attribute="true">
-          <name>img</name>
-          <description>The source location of an image.</description>
-          <version>1.0.0+</version>
-          <type>String</type>
-          <identifier>true</identifier>
-        </field>
-        <field xml.attribute="true">
-          <name>position</name>
-          <description>Where to place the image regarding the displayed name 
(left or right).</description>
-          <version>1.0.1+</version>
-          <type>String</type>
-          <identifier>true</identifier>
-          <defaultValue>left</defaultValue>
-        </field>
-        <field xml.attribute="true">
-          <name>alt</name>
-          <description>The alt to use for the image.</description>
-          <version>1.0.1+</version>
-          <type>String</type>
-          <identifier>true</identifier>
-        </field>
-        <field xml.attribute="true">
-          <name>border</name>
-          <description>The border to use for the image.</description>
-          <version>1.0.1+</version>
-          <type>String</type>
-          <identifier>true</identifier>
-        </field>
-        <field xml.attribute="true">
-          <name>width</name>
-          <description>The width to use for the image.</description>
-          <version>1.0.1+</version>
-          <type>String</type>
-          <identifier>true</identifier>
-        </field>
-        <field xml.attribute="true">
-          <name>height</name>
-          <description>The height to use for the image.</description>
-          <version>1.0.1+</version>
-          <type>String</type>
-          <identifier>true</identifier>
-        </field>
         <field xml.attribute="true">
           <name>target</name>
           <description>Where the new document will be displayed when the user 
follows a link, i.e. _blank opens the new document in a new 
window.</description>
@@ -568,11 +453,13 @@ under the License.
           <type>String</type>
           <identifier>true</identifier>
         </field>
-        <field xml.attribute="true">
-          <name>title</name>
-          <description>The title to use for the image.</description>
-          <version>1.3.0+</version>
-          <type>String</type>
+        <field>
+          <name>image</name>
+          <version>2.0.0+</version>
+          <description>The image for the link.</description>
+          <association>
+            <type>Image</type>
+          </association>
           <identifier>true</identifier>
         </field>
       </fields>
@@ -603,7 +490,7 @@ under the License.
           <name>inheritAsRef</name>
           <description><![CDATA[
             If this is a reference, setting to <code>true</code> means that it 
will be populated
-            in the project, whereas if it is <code>false</code>, it is 
populated in the parent and then inherited.
+            in the site, whereas if it is <code>false</code>, it is populated 
in the parent and then inherited.
           ]]></description>
           <version>1.0.0+</version>
           <type>boolean</type>
@@ -618,54 +505,13 @@ under the License.
           <type>String</type>
           <identifier>true</identifier>
         </field>
-        <field xml.attribute="true">
-          <name>img</name>
-          <description>The source location of an menu image.</description>
-          <version>1.0.0+</version>
-          <type>String</type>
-          <identifier>true</identifier>
-        </field>
-        <field xml.attribute="true">
-          <name>alt</name>
-          <version>1.0.1+</version>
-          <description>The alt description for the image.</description>
-          <type>String</type>
-          <identifier>true</identifier>
-        </field>
-        <field xml.attribute="true">
-          <name>position</name>
-          <description>Where to place the image regarding the displayed name 
(left or right).</description>
-          <version>1.0.1+</version>
-          <type>String</type>
-          <identifier>true</identifier>
-          <defaultValue>left</defaultValue>
-        </field>
-        <field xml.attribute="true">
-          <name>border</name>
-          <description>The border to use for the menu image.</description>
-          <version>1.0.1+</version>
-          <type>String</type>
-          <identifier>true</identifier>
-        </field>
-        <field xml.attribute="true">
-          <name>width</name>
-          <description>The width to use for the menu image.</description>
-          <version>1.0.1+</version>
-          <type>String</type>
-          <identifier>true</identifier>
-        </field>
-        <field xml.attribute="true">
-          <name>height</name>
-          <description>The height to use for the menu image.</description>
-          <version>1.0.1+</version>
-          <type>String</type>
-          <identifier>true</identifier>
-        </field>
-        <field xml.attribute="true">
-          <name>title</name>
-          <version>1.3.0+</version>
-          <description>The title for the image.</description>
-          <type>String</type>
+        <field>
+          <name>image</name>
+          <version>2.0.0+</version>
+          <description>The image for the menu.</description>
+          <association>
+            <type>Image</type>
+          </association>
           <identifier>true</identifier>
         </field>
         <field>
@@ -687,13 +533,6 @@ under the License.
       <version>1.0.0+</version>
       <superClass>LinkItem</superClass>
       <fields>
-        <field>
-          <name>description</name>
-          <description>A description of the menu item. This is used on any 
summary pages for a menu.</description>
-          <version>1.0.0+</version>
-          <type>String</type>
-          <identifier>true</identifier>
-        </field>
         <field xml.attribute="true">
           <name>collapse</name>
           <description>Whether to collapse children elements of an item menu 
(by default).</description>
@@ -722,6 +561,58 @@ under the License.
       </fields>
     </class>
 
+    <class java.clone="deep">
+      <name>Image</name>
+      <description>An image.</description>
+      <version>2.0.0+</version>
+      <fields>
+        <field xml.attribute="true">
+          <name>src</name>
+          <description>The source location.</description>
+          <version>2.0.0+</version>
+          <type>String</type>
+          <required>true</required>
+          <identifier>true</identifier>
+        </field>
+        <field xml.attribute="true">
+          <name>position</name>
+          <description>Where to place the image relative to the displayed name 
(left or right).</description>
+          <version>2.0.0+</version>
+          <type>String</type>
+          <identifier>true</identifier>
+          <defaultValue>left</defaultValue>
+        </field>
+        <field xml.attribute="true">
+          <name>alt</name>
+          <description>The alternative text to use.</description>
+          <version>2.0.0+</version>
+          <type>String</type>
+          <identifier>true</identifier>
+        </field>
+        <field xml.attribute="true">
+          <name>width</name>
+          <description>The width to use.</description>
+          <version>2.0.0+</version>
+          <type>String</type>
+          <identifier>true</identifier>
+        </field>
+        <field xml.attribute="true">
+          <name>height</name>
+          <description>The height to use.</description>
+          <version>2.0.0+</version>
+          <type>String</type>
+          <identifier>true</identifier>
+        </field>
+        <field xml.attribute="true">
+          <name>style</name>
+          <description>The style to use.</description>
+          <version>2.0.0+</version>
+          <type>String</type>
+          <identifier>true</identifier>
+        </field>
+      </fields>
+    </class>
+
     <class java.clone="deep">
       <name>Skin</name>
       <description>A skin artifact declaration.</description>

Reply via email to