You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Konrad Windszus <kw...@apache.org> on 2023/09/06 08:43:17 UTC

Using Sink API with XHTML markup

Hi,
In the context of [1] I am working on using the Sink API to emit the goal documentation reports for Maven plugins.
Currently there are XDoc documents emitted.
Conversion is more or less straight-forward, but there is also input originally coming from javadoc which is already in XHTML format.

Is there any way to put sink format specific stuff into the generic sink (which is just ignored by non-matching sinks).
According to [2] there is either “rawText” or “unknown” but both do not really have an indicator to which specific sink type it is targeted.
Is there anything else?

Thanks,
Konrad

[1] - https://issues.apache.org/jira/browse/MPLUGIN-442
[2] - https://maven.apache.org/doxia/developers/sink.html#avoid-sink-rawtext



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: Using Sink API with XHTML markup

Posted by Michael Osipov <mi...@apache.org>.
Am 2023-09-06 um 10:43 schrieb Konrad Windszus:
> Hi,
> In the context of [1] I am working on using the Sink API to emit the goal documentation reports for Maven plugins.
> Currently there are XDoc documents emitted.
> Conversion is more or less straight-forward, but there is also input originally coming from javadoc which is already in XHTML format.

Can you show which?

> Is there any way to put sink format specific stuff into the generic sink (which is just ignored by non-matching sinks).
> According to [2] there is either “rawText” or “unknown” but both do not really have an indicator to which specific sink type it is targeted.
> Is there anything else?

There is no way to determine what the target is after is has been 
created, that would more or less defeat the purpose of generic.
In your case you need to create an XHTML parser and pass the parse the 
result to the target sink. We have tests (identity) in Doxia which 
exactly do this. It might solve you problem.

M