maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lukas Theussl (JIRA)" <j...@codehaus.org>
Subject [jira] Commented: (DOXIA-204) Add generic parameters support to Figure and Link events
Date Tue, 26 Feb 2008 09:49:28 GMT

    [ http://jira.codehaus.org/browse/DOXIA-204?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_125140
] 

Lukas Theussl commented on DOXIA-204:
-------------------------------------

I think it's a matter of practicability (if that word exists in english... ;) ), and keeping
the api as concise as possible. It is somewhat subjective what you consider 'well known' attributes.
For instance for the img attributes I listed above, I would consider all but the last two
as 'well known'. So together with the base attributes that would make 13 method parameters...


Also note the example of tableCell(); where someone already added the method tableCell( String
width ); but I wouldn't consider 'align, colspan, height, rowspan, valign' any less known
than 'width'. And we are not going to add a method for each of them...

IMO we should only keep parameters if they are required or logically necessary for a sink
event, eg:

{code}
void anchor( String name, SinkEventAttributes attributes );
void figureGraphics( String src, SinkEventAttributes attributes );
void link( String name, SinkEventAttributes attributes );
void numberedList( int numbering, SinkEventAttributes attributes );
void section( int level, SinkEventAttributes attributes );
void sectionTitle( int level, SinkEventAttributes attributes );
{code}

so SinkEventAttributes would only specify optional parameters. WDYT?

> Add generic parameters support to Figure and Link events
> --------------------------------------------------------
>
>                 Key: DOXIA-204
>                 URL: http://jira.codehaus.org/browse/DOXIA-204
>             Project: Maven Doxia
>          Issue Type: Improvement
>          Components: Sink API
>    Affects Versions: 1.0-alpha-10
>            Reporter: Vincent Massol
>             Fix For: 1.0-beta-1
>
>
> For example XWiki has the following syntax for image macros and links:
> * image: http://code.xwiki.org/xwiki/bin/view/Macros/ImageMacro
> * links: http://platform.xwiki.org/xwiki/bin/view/Main/XWikiSyntax#HLinks
> For the image macro there are the "document" and "fromincludingdoc" which are specific
to XWiki and thus cannot be put as standard parameters.
> Same for links.
> Thus I propose to allow parsers to pass a Map of properties (pair/values) to the Sink
API so that sinks can be written to understand them (the XWiki sink would understand them
for example).

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message