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/05/28 20:24:56 UTC

[maven-doxia] 01/03: Stupid replacement

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

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

commit 86b03a320a833773a9c42bae08513502ffbb7063
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Sat May 28 20:37:38 2022 +0200

    Stupid replacement
---
 .../java/org/apache/maven/doxia/macro/EchoMacroTest.java     |  4 ++--
 .../apache/maven/doxia/macro/snippet/SnippetMacroTest.java   |  5 ++---
 .../java/org/apache/maven/doxia/macro/toc/TocMacroTest.java  | 12 ++++++------
 .../java/org/apache/maven/doxia/module/fml/FmlParser.java    |  4 ++--
 .../org/apache/maven/doxia/module/fml/FmlParserTest.java     | 12 ++++++------
 doxia-modules/doxia-module-markdown/pom.xml                  |  8 ++++----
 doxia-modules/doxia-module-markdown/src/it/general/pom.xml   |  2 +-
 .../apache/maven/doxia/module/markdown/MarkdownParser.java   | 10 +++++-----
 .../java/org/apache/maven/doxia/module/xdoc/XdocParser.java  |  4 ++--
 .../java/org/apache/maven/doxia/module/xdoc/XdocSink.java    |  4 ++--
 .../org/apache/maven/doxia/module/xhtml5/Xhtml5Markup.java   |  4 ++--
 .../org/apache/maven/doxia/module/xhtml5/Xhtml5Parser.java   |  4 ++--
 doxia-modules/doxia-module-xhtml5/src/site/site.xml          |  4 ++--
 .../doxia/module/xhtml5/Xhtml5SinkWithLanguageIdTest.java    |  2 +-
 14 files changed, 39 insertions(+), 40 deletions(-)

diff --git a/doxia-core/src/test/java/org/apache/maven/doxia/macro/EchoMacroTest.java b/doxia-core/src/test/java/org/apache/maven/doxia/macro/EchoMacroTest.java
index 639a2416..e3eb83ac 100644
--- a/doxia-core/src/test/java/org/apache/maven/doxia/macro/EchoMacroTest.java
+++ b/doxia-core/src/test/java/org/apache/maven/doxia/macro/EchoMacroTest.java
@@ -25,7 +25,7 @@ import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
 
-import org.apache.maven.doxia.parser.XhtmlBaseParser;
+import org.apache.maven.doxia.parser.Xhtml5BaseParser;
 import org.apache.maven.doxia.sink.impl.SinkEventElement;
 import org.apache.maven.doxia.sink.impl.SinkEventTestingSink;
 
@@ -49,7 +49,7 @@ public class EchoMacroTest
         final Map<String,Object> macroParameters = new HashMap<>();
         macroParameters.put( "paramName", "paramValue" );
 
-        XhtmlBaseParser parser = new XhtmlBaseParser();
+        Xhtml5BaseParser parser = new Xhtml5BaseParser();
 
         SinkEventTestingSink sink = new SinkEventTestingSink();
         MacroRequest request = new MacroRequest( null, parser, macroParameters, new File( "." ) );
diff --git a/doxia-core/src/test/java/org/apache/maven/doxia/macro/snippet/SnippetMacroTest.java b/doxia-core/src/test/java/org/apache/maven/doxia/macro/snippet/SnippetMacroTest.java
index 79878179..d75f5f68 100644
--- a/doxia-core/src/test/java/org/apache/maven/doxia/macro/snippet/SnippetMacroTest.java
+++ b/doxia-core/src/test/java/org/apache/maven/doxia/macro/snippet/SnippetMacroTest.java
@@ -26,10 +26,9 @@ import java.util.Map;
 
 import org.apache.maven.doxia.macro.MacroExecutionException;
 import org.apache.maven.doxia.macro.MacroRequest;
-import org.apache.maven.doxia.parser.XhtmlBaseParser;
+import org.apache.maven.doxia.parser.Xhtml5BaseParser;
 import org.apache.maven.doxia.sink.impl.SinkEventElement;
 import org.apache.maven.doxia.sink.impl.SinkEventTestingSink;
-import org.codehaus.plexus.PlexusTestCase;
 import org.codehaus.plexus.testing.PlexusTest;
 import org.hamcrest.CoreMatchers;
 import org.junit.jupiter.api.Test;
@@ -163,7 +162,7 @@ public class SnippetMacroTest
     {
         File basedir = new File( getBasedir() );
 
-        XhtmlBaseParser parser = new XhtmlBaseParser();
+        Xhtml5BaseParser parser = new Xhtml5BaseParser();
 
         SinkEventTestingSink sink = new SinkEventTestingSink();
 
diff --git a/doxia-core/src/test/java/org/apache/maven/doxia/macro/toc/TocMacroTest.java b/doxia-core/src/test/java/org/apache/maven/doxia/macro/toc/TocMacroTest.java
index 5fd41a4c..038fa962 100644
--- a/doxia-core/src/test/java/org/apache/maven/doxia/macro/toc/TocMacroTest.java
+++ b/doxia-core/src/test/java/org/apache/maven/doxia/macro/toc/TocMacroTest.java
@@ -28,11 +28,11 @@ import java.util.Map;
 
 import org.apache.maven.doxia.macro.MacroExecutionException;
 import org.apache.maven.doxia.macro.MacroRequest;
-import org.apache.maven.doxia.parser.XhtmlBaseParser;
+import org.apache.maven.doxia.parser.Xhtml5BaseParser;
 import org.apache.maven.doxia.sink.impl.SinkEventAttributeSet;
 import org.apache.maven.doxia.sink.impl.SinkEventElement;
 import org.apache.maven.doxia.sink.impl.SinkEventTestingSink;
-import org.apache.maven.doxia.sink.impl.XhtmlBaseSink;
+import org.apache.maven.doxia.sink.impl.Xhtml5BaseSink;
 import org.junit.jupiter.api.Test;
 
 import static org.junit.jupiter.api.Assertions.*;
@@ -55,7 +55,7 @@ public class TocMacroTest
     {
         String sourceContent = "<div><h1>h11</h1><h1>h12</h1><h2>h2</h2><h3>h3</h3><h1>h13</h1></div>";
 
-        XhtmlBaseParser parser = new XhtmlBaseParser();
+        Xhtml5BaseParser parser = new Xhtml5BaseParser();
 
         Map<String, Object> macroParameters = new HashMap<>();
         macroParameters.put( "section", "sec1" );
@@ -103,7 +103,7 @@ public class TocMacroTest
 
         // test parameters
 
-        parser = new XhtmlBaseParser();
+        parser = new Xhtml5BaseParser();
         macroParameters.put( "section", "2" );
         macroParameters.put( "fromDepth", "1" );
         macroParameters.put( "toDepth", "2" );
@@ -152,7 +152,7 @@ public class TocMacroTest
         String sourceContent =
             "<div><h1>h<b>11</b></h1><h1>h<i>12</i></h1><h2>h<tt>2</tt></h2><h3>h3</h3><h1>h13</h1></div>";
 
-        XhtmlBaseParser parser = new XhtmlBaseParser();
+        Xhtml5BaseParser parser = new Xhtml5BaseParser();
 
         Map<String, Object> macroParameters = new HashMap<>();
         macroParameters.put( "section", "sec1" );
@@ -160,7 +160,7 @@ public class TocMacroTest
         File basedir = new File( "" );
 
         StringWriter out = new StringWriter();
-        XhtmlBaseSink sink = new XhtmlBaseSink( out );
+        Xhtml5BaseSink sink = new Xhtml5BaseSink( out );
         MacroRequest request = new MacroRequest( sourceContent, parser, macroParameters, basedir );
         TocMacro macro = new TocMacro();
         macro.execute( sink, request );
diff --git a/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlParser.java b/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlParser.java
index a1c36022..52f34e8b 100644
--- a/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlParser.java
+++ b/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlParser.java
@@ -41,7 +41,7 @@ import org.apache.maven.doxia.parser.AbstractXmlParser;
 import org.apache.maven.doxia.parser.ParseException;
 import org.apache.maven.doxia.sink.Sink;
 import org.apache.maven.doxia.sink.impl.SinkEventAttributeSet;
-import org.apache.maven.doxia.sink.impl.XhtmlBaseSink;
+import org.apache.maven.doxia.sink.impl.Xhtml5BaseSink;
 import org.apache.maven.doxia.util.DoxiaUtils;
 import org.apache.maven.doxia.util.HtmlTools;
 import org.codehaus.plexus.util.IOUtil;
@@ -478,7 +478,7 @@ public class FmlParser
                 try
                 {
                     StringWriter sw = new StringWriter();
-                    XhtmlBaseSink sink = new XhtmlBaseSink( sw );
+                    Xhtml5BaseSink sink = new Xhtml5BaseSink( sw );
                     executeMacro( macroName, request, sink );
                     sink.close();
                     buffer.append( sw.toString() );
diff --git a/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlParserTest.java b/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlParserTest.java
index bebb5bd9..eeaab5ae 100644
--- a/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlParserTest.java
+++ b/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlParserTest.java
@@ -35,7 +35,7 @@ import org.apache.maven.doxia.parser.Parser;
 import org.apache.maven.doxia.sink.Sink;
 import org.apache.maven.doxia.sink.impl.SinkEventElement;
 import org.apache.maven.doxia.sink.impl.SinkEventTestingSink;
-import org.apache.maven.doxia.sink.impl.XhtmlBaseSink;
+import org.apache.maven.doxia.sink.impl.Xhtml5BaseSink;
 import org.codehaus.plexus.util.IOUtil;
 import org.junit.jupiter.api.BeforeEach;
 import org.junit.jupiter.api.Test;
@@ -63,18 +63,18 @@ public class FmlParserTest
         // Be sure to delete them
         String tmpDir = System.getProperty( "java.io.tmpdir" );
 
-        // Using FileFilter, because is it is much faster then FileUtils.listFiles 
+        // Using FileFilter, because is it is much faster then FileUtils.listFiles
         File[] tmpFiles = new File( tmpDir ).listFiles( new FileFilter()
         {
             final Pattern xsdPatterns = Pattern.compile( "(xml|fml\\-.+)\\.xsd" );
-            
+
             @Override
             public boolean accept( File pathname )
             {
-                return xsdPatterns.matcher( pathname.getName() ).matches(); 
+                return xsdPatterns.matcher( pathname.getName() ).matches();
             }
         } );
-        
+
         for ( File tmpFile : tmpFiles )
         {
             tmpFile.delete();
@@ -271,7 +271,7 @@ public class FmlParserTest
         try ( Writer output = getTestWriter( "macro" );
               Reader reader = getTestReader( "macro" ) )
         {
-            Sink sink = new XhtmlBaseSink( output );
+            Sink sink = new Xhtml5BaseSink( output );
             createParser().parse( reader, sink );
             sink.close();
         }
diff --git a/doxia-modules/doxia-module-markdown/pom.xml b/doxia-modules/doxia-module-markdown/pom.xml
index c9f17668..dc1fb009 100644
--- a/doxia-modules/doxia-module-markdown/pom.xml
+++ b/doxia-modules/doxia-module-markdown/pom.xml
@@ -74,7 +74,7 @@ under the License.
     </dependency>
     <dependency>
       <groupId>org.apache.maven.doxia</groupId>
-      <artifactId>doxia-module-xhtml</artifactId>
+      <artifactId>doxia-module-xhtml5</artifactId>
     </dependency>
     <dependency>
       <groupId>org.codehaus.plexus</groupId>
@@ -107,18 +107,18 @@ under the License.
         <executions>
 
           <!-- integration-test -->
-          <!-- Copy the Doxia XHTML module from our working directory to the local-repo -->
+          <!-- Copy the Doxia XHTML5 module from our working directory to the local-repo -->
           <!-- We do that manually because the invoker:install goal (below) doesn't do it, as -->
           <!-- it's not the artifact we're working on, but the ones that are produced by our "siblings" -->
           <execution>
-            <id>copy-doxia-module-xhtml-to-local-repo</id>
+            <id>copy-doxia-module-xhtml5-to-local-repo</id>
             <phase>integration-test</phase>
             <goals>
               <goal>install-file</goal>
             </goals>
             <configuration>
               <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
-              <file>${project.basedir}/../doxia-module-xhtml/target/doxia-module-xhtml-${project.version}.jar</file>
+              <file>${project.basedir}/../doxia-module-xhtml5/target/doxia-module-xhtml5-${project.version}.jar</file>
             </configuration>
           </execution>
           <execution>
diff --git a/doxia-modules/doxia-module-markdown/src/it/general/pom.xml b/doxia-modules/doxia-module-markdown/src/it/general/pom.xml
index 12afb4fd..cfc15a95 100644
--- a/doxia-modules/doxia-module-markdown/src/it/general/pom.xml
+++ b/doxia-modules/doxia-module-markdown/src/it/general/pom.xml
@@ -51,7 +51,7 @@ under the License.
           </dependency>
           <dependency>
             <groupId>org.apache.maven.doxia</groupId>
-            <artifactId>doxia-module-xhtml</artifactId>
+            <artifactId>doxia-module-xhtml5</artifactId>
             <version>@project.version@</version>
           </dependency>
           <dependency>
diff --git a/doxia-modules/doxia-module-markdown/src/main/java/org/apache/maven/doxia/module/markdown/MarkdownParser.java b/doxia-modules/doxia-module-markdown/src/main/java/org/apache/maven/doxia/module/markdown/MarkdownParser.java
index 6ae517e9..2844eaba 100644
--- a/doxia-modules/doxia-module-markdown/src/main/java/org/apache/maven/doxia/module/markdown/MarkdownParser.java
+++ b/doxia-modules/doxia-module-markdown/src/main/java/org/apache/maven/doxia/module/markdown/MarkdownParser.java
@@ -26,9 +26,9 @@ import javax.inject.Singleton;
 import com.vladsch.flexmark.ast.Heading;
 import com.vladsch.flexmark.ast.HtmlCommentBlock;
 import com.vladsch.flexmark.util.ast.Node;
+import com.vladsch.flexmark.util.options.MutableDataSet;
 import com.vladsch.flexmark.ast.util.TextCollectingVisitor;
 import com.vladsch.flexmark.html.HtmlRenderer;
-import com.vladsch.flexmark.util.options.MutableDataSet;
 import com.vladsch.flexmark.ext.escaped.character.EscapedCharacterExtension;
 import com.vladsch.flexmark.ext.abbreviation.AbbreviationExtension;
 import com.vladsch.flexmark.ext.autolink.AutolinkExtension;
@@ -40,7 +40,7 @@ import com.vladsch.flexmark.ext.gfm.strikethrough.StrikethroughExtension;
 
 import org.apache.maven.doxia.markup.HtmlMarkup;
 import org.apache.maven.doxia.markup.TextMarkup;
-import org.apache.maven.doxia.module.xhtml.XhtmlParser;
+import org.apache.maven.doxia.module.xhtml5.Xhtml5Parser;
 import org.apache.maven.doxia.parser.AbstractTextParser;
 import org.apache.maven.doxia.parser.ParseException;
 import org.apache.maven.doxia.sink.Sink;
@@ -60,7 +60,7 @@ import java.util.regex.Pattern;
  * </p>
  * <p>
  * Defers effective parsing to the <a href="https://github.com/vsch/flexmark-java">flexmark-java library</a>,
- * which generates HTML content then delegates parsing of this content to a slightly modified Doxia Xhtml parser.
+ * which generates HTML content then delegates parsing of this content to a slightly modified Doxia Xhtml5 parser.
  * (before 1.8, the <a href="http://pegdown.org">PegDown library</a> was used)
  * </p>
  *
@@ -262,14 +262,14 @@ public class MarkdownParser
      * <li> DIV elements are translated as Unknown Sink events
      * <li> PRE elements are all considered as boxed
      * </ul>
-     * PRE elements need to be "boxed" because the XhtmlSink will surround the
+     * PRE elements need to be "boxed" because the Xhtml5Sink will surround the
      * corresponding verbatim() Sink event with a DIV element with class="source",
      * which is how most Maven Skin (incl. Fluido) recognize a block of code, which
      * needs to be highlighted accordingly.
      */
     @Named
     public static class MarkdownHtmlParser
-        extends XhtmlParser
+        extends Xhtml5Parser
     {
         public MarkdownHtmlParser()
         {
diff --git a/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocParser.java b/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocParser.java
index 67dc1809..e7f84a51 100644
--- a/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocParser.java
+++ b/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocParser.java
@@ -34,7 +34,7 @@ import org.apache.maven.doxia.macro.MacroExecutionException;
 import org.apache.maven.doxia.macro.MacroRequest;
 import org.apache.maven.doxia.macro.manager.MacroNotFoundException;
 import org.apache.maven.doxia.parser.ParseException;
-import org.apache.maven.doxia.parser.XhtmlBaseParser;
+import org.apache.maven.doxia.parser.Xhtml5BaseParser;
 import org.apache.maven.doxia.sink.Sink;
 import org.apache.maven.doxia.sink.impl.SinkEventAttributeSet;
 import org.apache.maven.doxia.util.HtmlTools;
@@ -54,7 +54,7 @@ import org.slf4j.LoggerFactory;
 @Singleton
 @Named( "xdoc" )
 public class XdocParser
-    extends XhtmlBaseParser
+    extends Xhtml5BaseParser
     implements XdocMarkup
 {
     private static final Logger LOGGER = LoggerFactory.getLogger( XdocParser.class );
diff --git a/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocSink.java b/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocSink.java
index ea0b871d..de012612 100644
--- a/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocSink.java
+++ b/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocSink.java
@@ -27,7 +27,7 @@ import javax.swing.text.html.HTML.Attribute;
 import org.apache.maven.doxia.sink.SinkEventAttributes;
 import org.apache.maven.doxia.sink.impl.SinkEventAttributeSet;
 import org.apache.maven.doxia.sink.impl.SinkUtils;
-import org.apache.maven.doxia.sink.impl.XhtmlBaseSink;
+import org.apache.maven.doxia.sink.impl.Xhtml5BaseSink;
 import org.apache.maven.doxia.util.HtmlTools;
 
 import org.codehaus.plexus.util.StringUtils;
@@ -42,7 +42,7 @@ import org.codehaus.plexus.util.StringUtils;
  * @since 1.0
  */
 public class XdocSink
-    extends XhtmlBaseSink
+    extends Xhtml5BaseSink
     implements XdocMarkup
 {
     // ----------------------------------------------------------------------
diff --git a/doxia-modules/doxia-module-xhtml5/src/main/java/org/apache/maven/doxia/module/xhtml5/Xhtml5Markup.java b/doxia-modules/doxia-module-xhtml5/src/main/java/org/apache/maven/doxia/module/xhtml5/Xhtml5Markup.java
index bdd4e9f1..111bc6b8 100644
--- a/doxia-modules/doxia-module-xhtml5/src/main/java/org/apache/maven/doxia/module/xhtml5/Xhtml5Markup.java
+++ b/doxia-modules/doxia-module-xhtml5/src/main/java/org/apache/maven/doxia/module/xhtml5/Xhtml5Markup.java
@@ -22,9 +22,9 @@ package org.apache.maven.doxia.module.xhtml5;
 import org.apache.maven.doxia.markup.HtmlMarkup;
 
 /**
- * List of <code>Xhtml</code> markups.
+ * List of <code>Xhtml5</code> markups.
  * <br>
- * Xhtml uses all {@link javax.swing.text.html.HTML.Tag} and {@link javax.swing.text.html.HTML.Attribute}
+ * Xhtml5 uses all {@link javax.swing.text.html.HTML.Tag} and {@link javax.swing.text.html.HTML.Attribute}
  * as markups.
  */
 @SuppressWarnings( "checkstyle:interfaceistype" )
diff --git a/doxia-modules/doxia-module-xhtml5/src/main/java/org/apache/maven/doxia/module/xhtml5/Xhtml5Parser.java b/doxia-modules/doxia-module-xhtml5/src/main/java/org/apache/maven/doxia/module/xhtml5/Xhtml5Parser.java
index 392ac4f0..48a695a7 100644
--- a/doxia-modules/doxia-module-xhtml5/src/main/java/org/apache/maven/doxia/module/xhtml5/Xhtml5Parser.java
+++ b/doxia-modules/doxia-module-xhtml5/src/main/java/org/apache/maven/doxia/module/xhtml5/Xhtml5Parser.java
@@ -45,7 +45,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
- * Parse an xhtml model and emit events into a Doxia Sink.
+ * Parse an xhtml5 model and emit events into a Doxia Sink.
  */
 @Singleton
 @Named( "xhtml5" )
@@ -56,7 +56,7 @@ public class Xhtml5Parser
     private static final Logger LOGGER = LoggerFactory.getLogger( Xhtml5Parser.class );
 
     /** For boxed verbatim. */
-    private boolean boxed;
+    protected boolean boxed;
 
     /** Empty elements don't write a closing tag. */
     private boolean isEmptyElement;
diff --git a/doxia-modules/doxia-module-xhtml5/src/site/site.xml b/doxia-modules/doxia-module-xhtml5/src/site/site.xml
index 5f058c88..4ac71f1c 100644
--- a/doxia-modules/doxia-module-xhtml5/src/site/site.xml
+++ b/doxia-modules/doxia-module-xhtml5/src/site/site.xml
@@ -23,7 +23,7 @@
 
 <project xmlns="http://maven.apache.org/DECORATION/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://maven.apache.org/DECORATION/1.1.0 https://maven.apache.org/xsd/decoration-1.1.0.xsd"
-  name="Xhtml">
+  name="Xhtml5">
 
   <body>
 
@@ -40,4 +40,4 @@
 
   </body>
 
-</project>
\ No newline at end of file
+</project>
diff --git a/doxia-modules/doxia-module-xhtml5/src/test/java/org/apache/maven/doxia/module/xhtml5/Xhtml5SinkWithLanguageIdTest.java b/doxia-modules/doxia-module-xhtml5/src/test/java/org/apache/maven/doxia/module/xhtml5/Xhtml5SinkWithLanguageIdTest.java
index 3a9945e8..e86acd52 100644
--- a/doxia-modules/doxia-module-xhtml5/src/test/java/org/apache/maven/doxia/module/xhtml5/Xhtml5SinkWithLanguageIdTest.java
+++ b/doxia-modules/doxia-module-xhtml5/src/test/java/org/apache/maven/doxia/module/xhtml5/Xhtml5SinkWithLanguageIdTest.java
@@ -31,7 +31,7 @@ public class Xhtml5SinkWithLanguageIdTest
     /** {@inheritDoc} */
     protected Sink createSink( Writer writer )
     {
-        return new Xhtml5Sink( writer, "UTF-8", Locale.US.getLanguage() );
+        return new Xhtml5Sink( writer, "UTF-8", Locale.ENGLISH.getLanguage() );
     }
 
     /** {@inheritDoc} */