You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by mi...@apache.org on 2022/10/16 21:05:21 UTC

[maven-doxia-sitetools] branch DOXIASITETOOLS-267 created (now 81f99a8)

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

michaelo pushed a change to branch DOXIASITETOOLS-267
in repository https://gitbox.apache.org/repos/asf/maven-doxia-sitetools.git


      at 81f99a8  [DOXIASITETOOLS-267] Upgrade to Doxia 2.0.0-M4

This branch includes the following new commits:

     new 81f99a8  [DOXIASITETOOLS-267] Upgrade to Doxia 2.0.0-M4

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[maven-doxia-sitetools] 01/01: [DOXIASITETOOLS-267] Upgrade to Doxia 2.0.0-M4

Posted by mi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 81f99a801ef06f1ef0227a3542570077a027a43f
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sun Oct 16 23:05:11 2022 +0200

    [DOXIASITETOOLS-267] Upgrade to Doxia 2.0.0-M4
    
    This closes #64
---
 doxia-site-renderer/pom.xml                            |  4 ----
 .../apache/maven/doxia/siterenderer/AptVerifier.java   |  8 ++++----
 .../maven/doxia/siterenderer/AttributesVerifier.java   | 14 +++++---------
 .../apache/maven/doxia/siterenderer/FaqVerifier.java   | 18 +++++++++++-------
 .../test/resources/site-validate/xdoc/entityTest.xml   |  4 ++--
 .../src/test/resources/site/xdoc/attributes.xml        |  2 +-
 pom.xml                                                |  7 +------
 7 files changed, 24 insertions(+), 33 deletions(-)

diff --git a/doxia-site-renderer/pom.xml b/doxia-site-renderer/pom.xml
index a912011..f5f79fa 100644
--- a/doxia-site-renderer/pom.xml
+++ b/doxia-site-renderer/pom.xml
@@ -85,10 +85,6 @@ under the License.
       <artifactId>doxia-module-xdoc</artifactId>
       <scope>test</scope>
     </dependency>
-    <dependency>
-      <groupId>org.apache.maven.doxia</groupId>
-      <artifactId>doxia-module-xhtml</artifactId>
-    </dependency>
     <dependency>
       <groupId>org.apache.maven.doxia</groupId>
       <artifactId>doxia-module-xhtml5</artifactId>
diff --git a/doxia-site-renderer/src/test/java/org/apache/maven/doxia/siterenderer/AptVerifier.java b/doxia-site-renderer/src/test/java/org/apache/maven/doxia/siterenderer/AptVerifier.java
index bfab1a8..fe47fd3 100644
--- a/doxia-site-renderer/src/test/java/org/apache/maven/doxia/siterenderer/AptVerifier.java
+++ b/doxia-site-renderer/src/test/java/org/apache/maven/doxia/siterenderer/AptVerifier.java
@@ -73,9 +73,9 @@ public class AptVerifier
 
         // Expected log: [APT Parser] Ambiguous link: 'cdc.html'. If this is a local link, prepend "./"!
         HtmlAnchor a = (HtmlAnchor) elementIterator.next();
-        assertEquals( "Anchor", a.getAttribute( "name" ) );
+        assertEquals( "Anchor", a.getAttribute( "id" ) );
         a = (HtmlAnchor) elementIterator.next();
-        assertEquals( "cdc.html", a.getAttribute( "name" ) );
+        assertEquals( "cdc.html", a.getAttribute( "id" ) );
 
         a = (HtmlAnchor) elementIterator.next();
         assertEquals( "#Anchor", a.getAttribute( "href" ) );
@@ -83,7 +83,7 @@ public class AptVerifier
         assertEquals( "#Anchor", a.getAttribute( "href" ) );
 
         a = (HtmlAnchor) elementIterator.next();
-        assertEquals( "Anchor_with_space", a.getAttribute( "name" ) );
+        assertEquals( "Anchor_with_space", a.getAttribute( "id" ) );
         a = (HtmlAnchor) elementIterator.next();
         assertEquals( "#Anchor_with_space", a.getAttribute( "href" ) );
 
@@ -165,7 +165,7 @@ public class AptVerifier
         assertNotNull( h1 );
         assertEquals( "No Default Anchor in Section Title with Explicit Anchor", h1.asNormalizedText().trim() );
         a = (HtmlAnchor) elementIterator.next();
-        assertEquals( "No_Default_Anchor_in_Section_Title_with_Explicit_Anchor", a.getAttribute( "name" ) );
+        assertEquals( "No_Default_Anchor_in_Section_Title_with_Explicit_Anchor", a.getAttribute( "id" ) );
 
         section = (HtmlSection) elementIterator.next();
         assertNotNull( section );
diff --git a/doxia-site-renderer/src/test/java/org/apache/maven/doxia/siterenderer/AttributesVerifier.java b/doxia-site-renderer/src/test/java/org/apache/maven/doxia/siterenderer/AttributesVerifier.java
index 423539c..7cca551 100644
--- a/doxia-site-renderer/src/test/java/org/apache/maven/doxia/siterenderer/AttributesVerifier.java
+++ b/doxia-site-renderer/src/test/java/org/apache/maven/doxia/siterenderer/AttributesVerifier.java
@@ -103,7 +103,6 @@ public class AttributesVerifier
         assertSame( img.getAttribute( "dummy" ), HtmlElement.ATTRIBUTE_NOT_DEFINED );
 
         HtmlTable table = (HtmlTable) elementIterator.next();
-        assertEquals( "1", table.getAttribute( "border" ) );
         assertEquals( "none", table.getAttribute( "class" ) );
 
         element = elementIterator.next();
@@ -114,15 +113,12 @@ public class AttributesVerifier
         HtmlTableHeaderCell th = (HtmlTableHeaderCell) elementIterator.next();
 
         th = (HtmlTableHeaderCell) elementIterator.next();
-        assertEquals( "center", th.getAttribute( "align" ) );
         assertEquals( "2", th.getAttribute( "colspan" ) );
-        assertEquals( "50%", th.getAttribute( "width" ) );
 
         tr = (HtmlTableRow) elementIterator.next();
 
         th = (HtmlTableHeaderCell) elementIterator.next();
         assertEquals( "2", th.getAttribute( "rowspan" ) );
-        assertEquals( "middle", th.getAttribute( "valign" ) );
 
         HtmlTableDataCell td = (HtmlTableDataCell) elementIterator.next();
         td = (HtmlTableDataCell) elementIterator.next();
@@ -159,7 +155,7 @@ public class AttributesVerifier
         assertEquals( "color: red; margin-left: 20px", p.getAttribute( "style" ) );
 
         HtmlAnchor a = (HtmlAnchor) elementIterator.next();
-        assertEquals( "Anchor", a.getAttribute( "name" ) );
+        assertEquals( "Anchor", a.getAttribute( "id" ) );
 
         p = (HtmlParagraph) elementIterator.next();
         assertNotNull( p );
@@ -202,19 +198,19 @@ public class AttributesVerifier
         assertEquals( "Subsection without id", h2.asNormalizedText().trim() );
 
         a = (HtmlAnchor) elementIterator.next();
-        assertEquals( "section-id", a.getAttribute( "name" ) );
+        assertEquals( "section-id", a.getAttribute( "id" ) );
         section = (HtmlSection) elementIterator.next();
         h1 = (HtmlHeading1) elementIterator.next();
         assertEquals( "Section with id", h1.asNormalizedText().trim() );
 
         a = (HtmlAnchor) elementIterator.next();
-        assertEquals( "subsection-id", a.getAttribute( "name" ) );
+        assertEquals( "subsection-id", a.getAttribute( "id" ) );
         section = (HtmlSection) elementIterator.next();
         h2 = (HtmlHeading2) elementIterator.next();
         assertEquals( "Subsection with id", h2.asNormalizedText().trim() );
 
         a = (HtmlAnchor) elementIterator.next();
-        assertEquals( "foo", a.getAttribute( "name" ) );
+        assertEquals( "foo", a.getAttribute( "id" ) );
         section = (HtmlSection) elementIterator.next();
         assertEquals( "bar", section.getAttribute( "class" ) );
         assertEquals( "foo", section.getAttribute( "id" ) );
@@ -223,7 +219,7 @@ public class AttributesVerifier
         assertEquals( "", h1.getAttribute( "class" ) );
 
         a = (HtmlAnchor) elementIterator.next();
-        assertEquals( "subfoo", a.getAttribute( "name" ) );
+        assertEquals( "subfoo", a.getAttribute( "id" ) );
         section = (HtmlSection) elementIterator.next();
         assertEquals( "subbar", section.getAttribute( "class" ) );
         assertEquals( "subfoo", section.getAttribute( "id" ) );
diff --git a/doxia-site-renderer/src/test/java/org/apache/maven/doxia/siterenderer/FaqVerifier.java b/doxia-site-renderer/src/test/java/org/apache/maven/doxia/siterenderer/FaqVerifier.java
index 57ab00d..7928dcf 100644
--- a/doxia-site-renderer/src/test/java/org/apache/maven/doxia/siterenderer/FaqVerifier.java
+++ b/doxia-site-renderer/src/test/java/org/apache/maven/doxia/siterenderer/FaqVerifier.java
@@ -71,7 +71,7 @@ public class FaqVerifier
         assertEquals( "Often Asked Questions", h1.asNormalizedText().trim() );
 
         HtmlAnchor a = (HtmlAnchor) elementIterator.next();
-        assertEquals( "top", a.getAttribute( "name" ) );
+        assertEquals( "top", a.getAttribute( "id" ) );
 
         HtmlParagraph p = (HtmlParagraph) elementIterator.next();
         element = elementIterator.next();
@@ -109,7 +109,10 @@ public class FaqVerifier
         section = (HtmlSection) elementIterator.next();
 
         h1 = (HtmlHeading1) elementIterator.next();
-        assertEquals( "Contributing", h1.asNormalizedText().trim() );
+
+        a = (HtmlAnchor) elementIterator.next();
+        assertEquals( "contributing", a.getAttribute( "id" ) );
+        assertEquals( "Contributing", a.asNormalizedText().trim() );
 
         HtmlDefinitionList dl = (HtmlDefinitionList) elementIterator.next();
 
@@ -117,7 +120,7 @@ public class FaqVerifier
         assertEquals( "One stupid question & a silly answer?", dt.getFirstChild().asNormalizedText().trim() );
 
         a = (HtmlAnchor) elementIterator.next();
-        assertEquals( "stupid-question", a.getAttribute( "name" ) );
+        assertEquals( "stupid-question", a.getAttribute( "id" ) );
 
         element = elementIterator.next();
         assertEquals( "b", element.getTagName() );
@@ -148,7 +151,6 @@ public class FaqVerifier
         assertEquals( "non-US-ASCII characters: àéèç", element.asNormalizedText().trim() );
 
         p = (HtmlParagraph) elementIterator.next();
-        assertEquals( "right", p.getAttribute( "align" ) );
 
         a = (HtmlAnchor) elementIterator.next();
         assertEquals( "#top", a.getAttribute( "href" ) );
@@ -157,7 +159,10 @@ public class FaqVerifier
         section = (HtmlSection) elementIterator.next();
 
         h1 = (HtmlHeading1) elementIterator.next();
-        assertEquals( "Using Maven", h1.asNormalizedText().trim() );
+
+        a = (HtmlAnchor) elementIterator.next();
+        assertEquals( "using", a.getAttribute( "id" ) );
+        assertEquals( "Using Maven", a.asNormalizedText().trim() );
 
         dl = (HtmlDefinitionList) elementIterator.next();
 
@@ -165,7 +170,7 @@ public class FaqVerifier
         assertEquals( "How do I disable a report on my site?", dt.getFirstChild().asNormalizedText().trim() );
 
         a = (HtmlAnchor) elementIterator.next();
-        assertEquals( "disable-reports", a.getAttribute( "name" ) );
+        assertEquals( "disable-reports", a.getAttribute( "id" ) );
 
         dd = (HtmlDefinitionDescription) elementIterator.next();
 
@@ -182,7 +187,6 @@ public class FaqVerifier
         assertEquals( "<source>1.5</source>", pre.asNormalizedText().trim() );
 
         p = (HtmlParagraph) elementIterator.next();
-        assertEquals( "right", p.getAttribute( "align" ) );
 
         a = (HtmlAnchor) elementIterator.next();
         assertEquals( "#top", a.getAttribute( "href" ) );
diff --git a/doxia-site-renderer/src/test/resources/site-validate/xdoc/entityTest.xml b/doxia-site-renderer/src/test/resources/site-validate/xdoc/entityTest.xml
index f524fe7..9e5682f 100644
--- a/doxia-site-renderer/src/test/resources/site-validate/xdoc/entityTest.xml
+++ b/doxia-site-renderer/src/test/resources/site-validate/xdoc/entityTest.xml
@@ -20,7 +20,7 @@
 
 <!DOCTYPE document [
 <!-- These are the entity sets for ISO Latin 1 characters for the XHTML -->
-<!ENTITY % HTMLlat1 SYSTEM "xhtml-lat1.ent">
+<!ENTITY % HTMLlat1 SYSTEM "https://www.w3.org/TR/xhtml1/DTD/xhtml-lat1.ent">
 %HTMLlat1;
 <!-- Some entities from http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent -->
 <!ENTITY Alpha    "&#913;"> <!-- greek capital letter alpha, U+0391 -->
@@ -32,7 +32,7 @@
 ]>
 <document xmlns="http://maven.apache.org/XDOC/2.0"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 file://xdoc-2.0.xsd">
+  xsi:schemaLocation="http://maven.apache.org/XDOC/2.0 https://maven.apache.org/xsd/xdoc-2.0.xsd">
   <properties>
     <title>Test entities, cdatas and comments</title>
     <!-- Test comment: DOXIA-312 -->
diff --git a/doxia-site-renderer/src/test/resources/site/xdoc/attributes.xml b/doxia-site-renderer/src/test/resources/site/xdoc/attributes.xml
index efbee99..a89eb4d 100644
--- a/doxia-site-renderer/src/test/resources/site/xdoc/attributes.xml
+++ b/doxia-site-renderer/src/test/resources/site/xdoc/attributes.xml
@@ -54,7 +54,7 @@
       <p style="color: red; margin-left: 20px"></p>
 
       <!-- Anchors / Links -->
-      <a name="Anchor"/>
+      <a id="Anchor"/>
       <p>
         Link to <a href="#Anchor">anchor</a>.
         Link to anchor <a href="#Anchor">showing alternate text</a>.
diff --git a/pom.xml b/pom.xml
index 7eb7f10..ccd8cbb 100644
--- a/pom.xml
+++ b/pom.xml
@@ -69,7 +69,7 @@ under the License.
 
   <properties>
     <javaVersion>8</javaVersion>
-    <doxiaVersion>2.0.0-M3</doxiaVersion>
+    <doxiaVersion>2.0.0-M4</doxiaVersion>
     <slf4jVersion>1.7.36</slf4jVersion>
     <mavenVersion>3.2.5</mavenVersion>
     <aetherVersion>1.0.0.v20140518</aetherVersion>
@@ -112,11 +112,6 @@ under the License.
         <artifactId>doxia-module-xdoc</artifactId>
         <version>${doxiaVersion}</version>
       </dependency>
-      <dependency>
-        <groupId>org.apache.maven.doxia</groupId>
-        <artifactId>doxia-module-xhtml</artifactId>
-        <version>${doxiaVersion}</version>
-      </dependency>
       <dependency>
         <groupId>org.apache.maven.doxia</groupId>
         <artifactId>doxia-module-xhtml5</artifactId>