You are viewing a plain text version of this content. The canonical link for it is here.
Posted to doxia-dev@maven.apache.org by Vincent Siveton <vs...@apache.org> on 2009/08/19 11:17:20 UTC

Re: svn commit: r805576 - in /maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src: main/java/org/apache/maven/doxia/module/xdoc/XdocParser.java test/java/org/apache/maven/doxia/module/xdoc/XdocParserTest.java

Hi Lukas,

2009/8/19 Lukas Theussl <lt...@apache.org>:
> IIUC, according to the xdoc schema it is perfectly legal to specify a
> <title> in both <properties> and <head>, so throwing an Exception is not the
> right solution IMO. I would prefer one of the following two alternatives:

Yes both are legal, but the doc doesn't specify which one is the
"official" title of a xdoc.

> 1) define and document which title gets used if both are specified and emit
> a warning that the other is ignored

I was thinking about this idea but due to the parser impl, it will be
always head/title which emits a warn due to the exception actually.

IMHO head/title should be the right title, properties/title is more
for backward compatibility reasons. WDYT?

Cheers,

Vincent

Re: svn commit: r805576 - in /maven/doxia/doxia/trunk/doxia-modules/doxia-module-xdoc/src: main/java/org/apache/maven/doxia/module/xdoc/XdocParser.java test/java/org/apache/maven/doxia/module/xdoc/XdocParserTest.java

Posted by Lukas Theussl <lt...@apache.org>.

Vincent Siveton wrote:
> Hi Lukas,
> 
> 2009/8/19 Lukas Theussl <lt...@apache.org>:
>> IIUC, according to the xdoc schema it is perfectly legal to specify a
>> <title> in both <properties> and <head>, so throwing an Exception is not the
>> right solution IMO. I would prefer one of the following two alternatives:
> 
> Yes both are legal, but the doc doesn't specify which one is the
> "official" title of a xdoc.

properties/title is required by the xsd and should have priority, head/title is 
only there for compatibility with xhtml, but it is optional.

> 
>> 1) define and document which title gets used if both are specified and emit
>> a warning that the other is ignored
> 
> I was thinking about this idea but due to the parser impl, it will be
> always head/title which emits a warn due to the exception actually.
> 
> IMHO head/title should be the right title, properties/title is more
> for backward compatibility reasons. WDYT?

The other way round IMO. The properties/title is a required element, while 
head/title is optional, and properties comes before head, so simply emit a warning 
when a second title is encountered.

-Lukas

> 
> Cheers,
> 
> Vincent
>