Search code examples
xsltxsl-foapache-fop

Using FOP, is it possible to output info/warning on the command line?


I use the basic fop command in a cron. Under certain circumstances, for example when a value does not exists, I would like to print a warning on the standard output.

Ideally, I expect a special command like <fox:stdout></fox:stdout> which outputs nothing on the document but can be wrapped inside an <xsl:if></xsl:if> or something alike.

I could not find anything like that in the official documentation (https://xmlgraphics.apache.org/fop/2.0/), how would you do such a thing?


Solution

  • You can use xsl:message to output messages.

    Note though that how those messages are output can be different from one processor to the next.