maven-doxia-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vsive...@apache.org
Subject svn commit: r739557 - in /maven/doxia/doxia/trunk: doxia-core/src/main/java/org/apache/maven/doxia/markup/ doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/ doxia-modules/doxia-module-fml/src/main/java/org/a...
Date Sat, 31 Jan 2009 13:54:33 GMT
Author: vsiveton
Date: Sat Jan 31 13:54:32 2009
New Revision: 739557

URL: http://svn.apache.org/viewvc?rev=739557&view=rev
Log:
o added/moved XML namespace, systemId and publicId in the markup interfaces

Modified:
    maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/markup/XmlMarkup.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocBookSink.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocbookMarkup.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlMarkup.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlValidatorTest.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoMarkup.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoSink.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocMarkup.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocSink.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XdocValidatorTest.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/XhtmlMarkup.java
    maven/doxia/doxia/trunk/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/XhtmlSink.java

Modified: maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/markup/XmlMarkup.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/markup/XmlMarkup.java?rev=739557&r1=739556&r2=739557&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/markup/XmlMarkup.java
(original)
+++ maven/doxia/doxia/trunk/doxia-core/src/main/java/org/apache/maven/doxia/markup/XmlMarkup.java
Sat Jan 31 13:54:32 2009
@@ -29,6 +29,9 @@
 public interface XmlMarkup
     extends Markup
 {
+    /** XML namespace: "http://www.w3.org/2001/XMLSchema-instance" */
+    String XML_NAMESPACE = "http://www.w3.org/2001/XMLSchema-instance";
+
     // ----------------------------------------------------------------------
     // Xml separator characters
     // ----------------------------------------------------------------------

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocBookSink.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocBookSink.java?rev=739557&r1=739556&r2=739557&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocBookSink.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocBookSink.java
Sat Jan 31 13:54:32 2009
@@ -51,17 +51,21 @@
     extends AbstractXmlSink
     implements DocbookMarkup
 {
-    /** DocBook V4.4 SGML public id: "-//OASIS//DTD DocBook V4.4//EN" */
-    public static final String DEFAULT_SGML_PUBLIC_ID = "-//OASIS//DTD DocBook V4.4//EN";
-
-    /** DocBook XML V4.4 XML public id: "-//OASIS//DTD DocBook XML V4.4//EN" */
-    public static final String DEFAULT_XML_PUBLIC_ID = "-//OASIS//DTD DocBook V4.4//EN";
-
-    /** DocBook XML V4.4 XML system id: "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
*/
-    public static final String DEFAULT_XML_SYSTEM_ID = "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd";
-
-    /** DocBook XML V4.4 SGML system id: "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
*/
-    public static final String DEFAULT_SGML_SYSTEM_ID = "http://www.oasis-open.org/docbook/sgml/4.4/docbookx.dtd";
+    /** DocBook V4.4 SGML public id: "-//OASIS//DTD DocBook V4.4//EN"
+     * @deprecated since 1.1, use {@link DocbookMarkup#DEFAULT_SGML_PUBLIC_ID} instead of.
*/
+    public static final String DEFAULT_SGML_PUBLIC_ID = DocbookMarkup.DEFAULT_SGML_PUBLIC_ID;
+
+    /** DocBook XML V4.4 XML public id: "-//OASIS//DTD DocBook XML V4.4//EN"
+     * @deprecated since 1.1, use {@link DocbookMarkup#DEFAULT_XML_PUBLIC_ID} instead of.
*/
+    public static final String DEFAULT_XML_PUBLIC_ID = DocbookMarkup.DEFAULT_XML_PUBLIC_ID;
+
+    /** DocBook XML V4.4 XML system id: "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
+     * @deprecated since 1.1, use {@link DocbookMarkup#DEFAULT_XML_SYSTEM_ID} instead of.
*/
+    public static final String DEFAULT_XML_SYSTEM_ID = DocbookMarkup.DEFAULT_XML_SYSTEM_ID;
+
+    /** DocBook XML V4.4 SGML system id: "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
+     * @deprecated since 1.1, use {@link DocbookMarkup#DEFAULT_SGML_SYSTEM_ID} instead of.
*/
+    public static final String DEFAULT_SGML_SYSTEM_ID = DocbookMarkup.DEFAULT_SGML_SYSTEM_ID;
 
     /** The output writer. */
     private PrintWriter out;
@@ -533,9 +537,9 @@
     /**
      * {@inheritDoc}
      *
-     * @see #DEFAULT_XML_PUBLIC_ID
-     * @see #DEFAULT_SGML_PUBLIC_ID
-     * @see #DEFAULT_XML_SYSTEM_ID
+     * @see DocbookMarkup#DEFAULT_XML_PUBLIC_ID
+     * @see DocbookMarkup#DEFAULT_SGML_PUBLIC_ID
+     * @see DocbookMarkup#DEFAULT_XML_SYSTEM_ID
      * @see DocbookMarkup#ARTICLE_TAG
      */
     public void head()
@@ -547,6 +551,14 @@
         writeStartTag( ARTICLE_TAG, att );
     }
 
+    /**
+     * @param root not null
+     * @return an attribute set
+     * @see DocbookMarkup#DEFAULT_XML_PUBLIC_ID
+     * @see DocbookMarkup#DEFAULT_SGML_PUBLIC_ID
+     * @see DocbookMarkup#DEFAULT_XML_SYSTEM_ID
+     * @see DocbookMarkup#ARTICLE_TAG
+     */
     protected MutableAttributeSet writeXmlHeader( String root )
     {
         if ( xmlMode )
@@ -571,11 +583,11 @@
         {
             if ( xmlMode )
             {
-                pubId = DEFAULT_XML_PUBLIC_ID;
+                pubId = DocbookMarkup.DEFAULT_XML_PUBLIC_ID;
             }
             else
             {
-                pubId = DEFAULT_SGML_PUBLIC_ID;
+                pubId = DocbookMarkup.DEFAULT_SGML_PUBLIC_ID;
             }
         }
         else
@@ -588,11 +600,11 @@
         {
             if ( xmlMode )
             {
-                sysId = DEFAULT_XML_SYSTEM_ID;
+                sysId = DocbookMarkup.DEFAULT_XML_SYSTEM_ID;
             }
             else
             {
-                sysId = DEFAULT_SGML_SYSTEM_ID;
+                sysId = DocbookMarkup.DEFAULT_SGML_SYSTEM_ID;
             }
         }
         markup( " \"" + sysId + "\">" );

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocbookMarkup.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocbookMarkup.java?rev=739557&r1=739556&r2=739557&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocbookMarkup.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-docbook-simple/src/main/java/org/apache/maven/doxia/module/docbook/DocbookMarkup.java
Sat Jan 31 13:54:32 2009
@@ -35,6 +35,18 @@
 public interface DocbookMarkup
     extends XmlMarkup
 {
+    /** DocBook V4.4 SGML public id: "-//OASIS//DTD DocBook V4.4//EN" */
+    String DEFAULT_SGML_PUBLIC_ID = "-//OASIS//DTD DocBook V4.4//EN";
+
+    /** DocBook XML V4.4 XML public id: "-//OASIS//DTD DocBook XML V4.4//EN" */
+    String DEFAULT_XML_PUBLIC_ID = "-//OASIS//DTD DocBook V4.4//EN";
+
+    /** DocBook XML V4.4 XML system id: "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
*/
+    String DEFAULT_XML_SYSTEM_ID = "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd";
+
+    /** DocBook XML V4.4 SGML system id: "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd"
*/
+    String DEFAULT_SGML_SYSTEM_ID = "http://www.oasis-open.org/docbook/sgml/4.4/docbookx.dtd";
+
     // ----------------------------------------------------------------------
     // Specific DocBook tags
     // ----------------------------------------------------------------------
@@ -58,7 +70,7 @@
             return "article";
         }
     };
-    
+
     /** DocBook tag for <code>articleinfo</code> */
     Tag ARTICLEINFO_TAG = new Tag()
     {

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlMarkup.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlMarkup.java?rev=739557&r1=739556&r2=739557&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlMarkup.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/main/java/org/apache/maven/doxia/module/fml/FmlMarkup.java
Sat Jan 31 13:54:32 2009
@@ -36,6 +36,12 @@
 public interface FmlMarkup
     extends HtmlMarkup
 {
+    /** FML namespace: "http://maven.apache.org/FML/1.0" */
+    String FML_NAMESPACE = "http://maven.apache.org/FML/1.0";
+
+    /** FML system id: "http://maven.apache.org/xsd/fml-1.0.xsd" */
+    String FML_SYSTEM_ID = "http://maven.apache.org/xsd/fml-1.0.xsd";
+
     // ----------------------------------------------------------------------
     // Specific Fml tags
     // ----------------------------------------------------------------------

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlValidatorTest.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlValidatorTest.java?rev=739557&r1=739556&r2=739557&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlValidatorTest.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-fml/src/test/java/org/apache/maven/doxia/module/fml/FmlValidatorTest.java
Sat Jan 31 13:54:32 2009
@@ -23,6 +23,7 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import org.apache.maven.doxia.markup.XmlMarkup;
 import org.apache.maven.doxia.xsd.AbstractXmlValidatorTest;
 import org.codehaus.plexus.util.StringUtils;
 
@@ -72,9 +73,9 @@
             if ( value.indexOf( FML_XSD.getName() ) == -1 )
             {
                 String faqs =
-                    "<" + root + " xmlns=\"http://maven.apache.org/FML/1.0\""
-                        + "  xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
-                        + "  xsi:schemaLocation=\"http://maven.apache.org/FML/1.0 " + FML_XSD.toURI()
+ "\" ";
+                    "<" + root + " xmlns=\"" + FmlMarkup.FML_NAMESPACE + "\""
+                        + "  xmlns:xsi=\"" + XmlMarkup.XML_NAMESPACE + "\""
+                        + "  xsi:schemaLocation=\"" + FmlMarkup.FML_NAMESPACE + " " + FML_XSD.toURI()
+ "\" ";
 
                 return StringUtils.replace( content, "<" + root, faqs );
             }

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoMarkup.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoMarkup.java?rev=739557&r1=739556&r2=739557&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoMarkup.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoMarkup.java
Sat Jan 31 13:54:32 2009
@@ -33,6 +33,9 @@
 public interface FoMarkup
     extends XmlMarkup
 {
+    /** FO namespace: "http://www.w3.org/1999/XSL/Format" */
+    String FO_NAMESPACE = "http://www.w3.org/1999/XSL/Format";
+
     // ----------------------------------------------------------------------
     // Specific FO tags
     // ----------------------------------------------------------------------

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoSink.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoSink.java?rev=739557&r1=739556&r2=739557&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoSink.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-fo/src/main/java/org/apache/maven/doxia/module/fo/FoSink.java
Sat Jan 31 13:54:32 2009
@@ -997,7 +997,7 @@
         }
         write( "?>" );
 
-        writeStartTag( ROOT_TAG, "xmlns:" + getNameSpace(), "http://www.w3.org/1999/XSL/Format"
);
+        writeStartTag( ROOT_TAG, "xmlns:" + getNameSpace(), FO_NAMESPACE );
 
         writeStartTag( LAYOUT_MASTER_SET_TAG, "" );
 

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocMarkup.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocMarkup.java?rev=739557&r1=739556&r2=739557&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocMarkup.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocMarkup.java
Sat Jan 31 13:54:32 2009
@@ -36,6 +36,12 @@
 public interface XdocMarkup
     extends HtmlMarkup
 {
+    /** XDOC namespace: "http://maven.apache.org/XDOC/2.0" */
+    String XDOC_NAMESPACE = "http://maven.apache.org/XDOC/2.0";
+
+    /** XDOC system id: "http://maven.apache.org/xsd/xdoc-2.0.xsd" */
+    String XDOC_SYSTEM_ID = "http://maven.apache.org/xsd/xdoc-2.0.xsd";
+
     // ----------------------------------------------------------------------
     // Specific Xdoc tags
     // ----------------------------------------------------------------------

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocSink.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocSink.java?rev=739557&r1=739556&r2=739557&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocSink.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/main/java/org/apache/maven/doxia/module/xdoc/XdocSink.java
Sat Jan 31 13:54:32 2009
@@ -45,9 +45,6 @@
     extends XhtmlBaseSink
     implements XdocMarkup
 {
-    /** XDoc system id: "http://maven.apache.org/xsd/xdoc-2.0.xsd" */
-    public static final String XDOC_SYSTEM_ID = "http://maven.apache.org/xsd/xdoc-2.0.xsd";
-
     // ----------------------------------------------------------------------
     // Instance fields
     // ----------------------------------------------------------------------
@@ -117,9 +114,9 @@
         write( "?>" );
 
         MutableAttributeSet atts = new SinkEventAttributeSet();
-        atts.addAttribute( "xmlns", "http://maven.apache.org/XDOC/2.0" );
-        atts.addAttribute( "xmlns:xsi", "http://www.w3.org/2001/XMLSchema-instance" );
-        atts.addAttribute( "xsi:schemaLocation", "http://maven.apache.org/XDOC/2.0 " + XDOC_SYSTEM_ID
);
+        atts.addAttribute( "xmlns", XDOC_NAMESPACE );
+        atts.addAttribute( "xmlns:xsi", XML_NAMESPACE );
+        atts.addAttribute( "xsi:schemaLocation", XDOC_NAMESPACE + " " + XDOC_SYSTEM_ID );
 
         writeStartTag( DOCUMENT_TAG, atts );
 

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XdocValidatorTest.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XdocValidatorTest.java?rev=739557&r1=739556&r2=739557&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XdocValidatorTest.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src/test/java/org/apache/maven/doxia/module/xdoc/XdocValidatorTest.java
Sat Jan 31 13:54:32 2009
@@ -23,6 +23,7 @@
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
+import org.apache.maven.doxia.markup.XmlMarkup;
 import org.apache.maven.doxia.xsd.AbstractXmlValidatorTest;
 import org.codehaus.plexus.util.StringUtils;
 
@@ -73,7 +74,7 @@
             {
                 String faqs =
                     "<" + root + " xmlns=\"http://maven.apache.org/XDOC/2.0\""
-                        + "  xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\""
+                        + "  xmlns:xsi=\"" + XmlMarkup.XML_NAMESPACE + "\""
                         + "  xsi:schemaLocation=\"http://maven.apache.org/XDOC/2.0 " + XDOC_XSD.toURI()
+ "\" ";
 
                 return StringUtils.replace( content, "<" + root, faqs );

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/XhtmlMarkup.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/XhtmlMarkup.java?rev=739557&r1=739556&r2=739557&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/XhtmlMarkup.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/XhtmlMarkup.java
Sat Jan 31 13:54:32 2009
@@ -34,4 +34,12 @@
 public interface XhtmlMarkup
     extends HtmlMarkup
 {
+    /** XHTML namespace: "http://www.w3.org/1999/xhtml" */
+    String XHTML_NAMESPACE = "http://www.w3.org/1999/xhtml";
+
+    /** XHTML 1.0 transitional public id: "-//W3C//DTD XHTML 1.0 Transitional//EN" */
+    String XHTML_TRANSITIONAL_PUBLIC_ID = "-//W3C//DTD XHTML 1.0 Transitional//EN";
+
+    /** XHTML 1.0 transitional system id: "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
*/
+    String XHTML_TRANSITIONAL_SYSTEM_ID = "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";
 }

Modified: maven/doxia/doxia/trunk/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/XhtmlSink.java
URL: http://svn.apache.org/viewvc/maven/doxia/doxia/trunk/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/XhtmlSink.java?rev=739557&r1=739556&r2=739557&view=diff
==============================================================================
--- maven/doxia/doxia/trunk/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/XhtmlSink.java
(original)
+++ maven/doxia/doxia/trunk/doxia-modules/doxia-module-xhtml/src/main/java/org/apache/maven/doxia/module/xhtml/XhtmlSink.java
Sat Jan 31 13:54:32 2009
@@ -43,15 +43,6 @@
     extends XhtmlBaseSink
     implements XhtmlMarkup
 {
-    /** XHTML 1.0 public id: "-//W3C//DTD XHTML 1.0 Transitional//EN" */
-    public static final String XHTML_PUBLIC_ID = "-//W3C//DTD XHTML 1.0 Transitional//EN";
-
-    /** XHTML 1.0 system id: "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" */
-    public static final String XHTML_SYSTEM_ID = "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd";
-
-    /** XHTML xmlns: "http://www.w3.org/1999/xhtml" */
-    public static final String XHTML_XMLLNS = "http://www.w3.org/1999/xhtml";
-
     // ----------------------------------------------------------------------
     // Instance fields
     // ----------------------------------------------------------------------
@@ -96,8 +87,13 @@
 
         setHeadFlag( true );
 
-        write( "<!DOCTYPE html PUBLIC \"" + XHTML_PUBLIC_ID + "\" \"" + XHTML_SYSTEM_ID
+ "\">" );
-        write( "<html xmlns=\"" + XHTML_XMLLNS + "\">" );
+        write( "<!DOCTYPE html PUBLIC \"" + XHTML_TRANSITIONAL_PUBLIC_ID + "\" \"" + XHTML_TRANSITIONAL_SYSTEM_ID
+            + "\">" );
+
+        MutableAttributeSet atts = new SinkEventAttributeSet();
+        atts.addAttribute( "xmlns", XHTML_NAMESPACE );
+
+        writeStartTag( Tag.HTML, atts );
 
         writeStartTag( Tag.HEAD );
     }



Mime
View raw message