[jira] [Commented] (DOXIA-712) Add validation capability to Sink API

2023-12-24 Thread Konrad Windszus (Jira)


[ 
https://issues.apache.org/jira/browse/DOXIA-712?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17800167#comment-17800167
 ] 

Konrad Windszus commented on DOXIA-712:
---

All those limitations outlined above are defined by the Sink interface (i.e. 
are implementation agnostic). That is for me the whole point of using this Sink 
indirection. The Sink API must work the same irrespective of the actual 
implementation.

> Add validation capability to Sink API
> -
>
> Key: DOXIA-712
> URL: https://issues.apache.org/jira/browse/DOXIA-712
> Project: Maven Doxia
>  Issue Type: Improvement
>  Components: Core
>Reporter: Konrad Windszus
>Priority: Major
>
> The Sink API comes with several limitations with regards to valid order of 
> events/method calls and valid parametrization. Those are documented in the 
> javadoc of the Sink interface but are complex to follow. This includes
> - certain start events need to be followed by an according end event
> - {{sectionTitle(int,SinkEventAttributes)}} needs to be directly preceded by 
> {{section(int,SinkEventAttributes)}} with the same first argument.
> - certain rules for sequence of events for {{table}}, {{list}} (numbered, 
> non-numbered and definition) and {{figure}}
> - validation of certain common parameters like {{level}} or 
> {{SinkEventAttributes}} for valid values
> As we encourage the direct usage of the Sink API for report mojos there 
> should be a way for mojo authors to quickly crosscheck whether they used the 
> Sink API in a correct way.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (DOXIA-712) Add validation capability to Sink API

2023-12-24 Thread Michael Osipov (Jira)


[ 
https://issues.apache.org/jira/browse/DOXIA-712?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17800160#comment-17800160
 ] 

Michael Osipov commented on DOXIA-712:
--

How should this happen? Per Sink implemenatation because only they know the 
semantics of validation? A configure flag to enforce?

> Add validation capability to Sink API
> -
>
> Key: DOXIA-712
> URL: https://issues.apache.org/jira/browse/DOXIA-712
> Project: Maven Doxia
>  Issue Type: Improvement
>  Components: Core
>Reporter: Konrad Windszus
>Priority: Major
>
> The Sink API comes with several limitations with regards to valid order of 
> events/method calls and valid parametrization. Those are documented in the 
> javadoc of the Sink interface but are complex to follow. This includes
> - certain start events need to be followed by an according end event
> - {{sectionTitle(int,SinkEventAttributes)}} needs to be directly preceded by 
> {{section(int,SinkEventAttributes)}} with the same first argument.
> - certain rules for sequence of events for {{table}}, {{list}} (numbered, 
> non-numbered and definition) and {{figure}}
> - validation of certain common parameters like {{level}} or 
> {{SinkEventAttributes}} for valid values
> As we encourage the direct usage of the Sink API for report mojos there 
> should be a way for mojo authors to quickly crosscheck whether they used the 
> Sink API in a correct way.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)