maven-doxia-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Siveton" <vincent.sive...@gmail.com>
Subject Re: svn commit: r700094 - /maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/DefaultConverter.java
Date Mon, 29 Sep 2008 15:26:56 GMT
Hi,

Lukas has right: we handle only Simplified DocBook. Hervé could you revert this?

Cheers,

Vincent

2008/9/29 Lukas Theussl <ltheussl@apache.org>:
> Hi Herve,
>
> I haven't looked at the doxia modules for a while, and I am not a docbook
> expert but IIRC, the doxia docbook module is for Simplified Docbook only and
> in Simplified DocBook the root element is always <article>.
>
> Correct me if I'm wrong...
>
> Cheers,
> -Lukas
>
>
> hboutemy@apache.org wrote:
>>
>> Author: hboutemy
>> Date: Mon Sep 29 05:29:00 2008
>> New Revision: 700094
>>
>> URL: http://svn.apache.org/viewvc?rev=700094&view=rev
>> Log:
>> there are multiple root element values possible for Docbook format
>> (article, but also book, part, chapter, ...)
>>
>> Modified:
>>
>>  maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/DefaultConverter.java
>>
>> Modified:
>> maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/DefaultConverter.java
>> URL:
>> http://svn.apache.org/viewvc/maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/DefaultConverter.java?rev=700094&r1=700093&r2=700094&view=diff
>>
>> ==============================================================================
>> ---
>> maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/DefaultConverter.java
>> (original)
>> +++
>> maven/doxia/doxia-tools/trunk/doxia-converter/src/main/java/org/apache/maven/doxia/DefaultConverter.java
>> Mon Sep 29 05:29:00 2008
>> @@ -27,10 +27,12 @@
>>  import java.io.Reader;
>>  import java.io.Writer;
>>  import java.util.HashMap;
>> +import java.util.HashSet;
>>  import java.util.Iterator;
>>  import java.util.List;
>>  import java.util.Locale;
>>  import java.util.Map;
>> +import java.util.Set;
>>  import java.util.regex.Matcher;
>>  import java.util.regex.Pattern;
>>  @@ -111,6 +113,37 @@
>>     public static final String[] SUPPORTED_TO_FORMAT =
>>         { APT_SINK, DOCBOOK_SINK, FO_SINK, ITEXT_SINK, LATEX_SINK,
>> RTF_SINK, XDOC_SINK, XHTML_SINK };
>>  +    private static final Set DOCBOOK_ROOT_ELEMENT = new HashSet();
>> +
>> +    static
>> +    {
>> +        DOCBOOK_ROOT_ELEMENT.add( "set" );
>> +        DOCBOOK_ROOT_ELEMENT.add( "book" );
>> +        DOCBOOK_ROOT_ELEMENT.add( "part" );
>> +        DOCBOOK_ROOT_ELEMENT.add( "chapter" );
>> +        DOCBOOK_ROOT_ELEMENT.add( "section" );
>> +        DOCBOOK_ROOT_ELEMENT.add( "sect1" );
>> +        DOCBOOK_ROOT_ELEMENT.add( "sect2" );
>> +        DOCBOOK_ROOT_ELEMENT.add( "sect3" );
>> +        DOCBOOK_ROOT_ELEMENT.add( "sect4" );
>> +        DOCBOOK_ROOT_ELEMENT.add( "sect5" );
>> +        DOCBOOK_ROOT_ELEMENT.add( "article" );
>> +        DOCBOOK_ROOT_ELEMENT.add( "preface" );
>> +        DOCBOOK_ROOT_ELEMENT.add( "partintro" );
>> +        DOCBOOK_ROOT_ELEMENT.add( "appendix" );
>> +        DOCBOOK_ROOT_ELEMENT.add( "bibliography" );
>> +        DOCBOOK_ROOT_ELEMENT.add( "reference" );
>> +        DOCBOOK_ROOT_ELEMENT.add( "bibliography" );
>> +        DOCBOOK_ROOT_ELEMENT.add( "bibliodiv" );
>> +        DOCBOOK_ROOT_ELEMENT.add( "glossary" );
>> +        DOCBOOK_ROOT_ELEMENT.add( "refentry" );
>> +        DOCBOOK_ROOT_ELEMENT.add( "refnamediv" );
>> +        DOCBOOK_ROOT_ELEMENT.add( "refsection" );
>> +        DOCBOOK_ROOT_ELEMENT.add( "refsect1" );
>> +        DOCBOOK_ROOT_ELEMENT.add( "refsect2" );
>> +        DOCBOOK_ROOT_ELEMENT.add( "refsect3" );
>> +    }
>> +
>>     /** Plexus container */
>>     private PlexusContainer plexus;
>>  @@ -614,7 +647,7 @@
>>             {
>>                 continue;
>>             }
>> -            else if ( firstTag.equals( "article" )
>> +            else if ( DOCBOOK_ROOT_ELEMENT.contains( firstTag )
>>                 && supportedFromFormat.equalsIgnoreCase( DOCBOOK_PARSER )
>> )
>>             {
>>                 return supportedFromFormat;
>>
>>
>>
>

Mime
View raw message