I wonder if we should agree on some guidelines for the use of namespaces 
(namespace prefixes) for extensions. I am thinking along the following 
lines:

The namespace "http://xmlgraphics.apache.org/fop/extensions"; (common 
prefix "fox") is reserved for generic extensions to FOP supported 
across all (e.g. if handled by layout) or most renderers.

Extensions specific to a particular renderer and / or extensions which 
constitute a rendering hint (e.g. render this image as a grayscale) 
should be in a renderer specific namespace. That namespace name is 
formed by appending the common renderer acronym to the above generic 
extension namespace, e.g. 
http://xmlgraphics.apache.org/fop/extensions/pdf or 
http://xmlgraphics.apache.org/fop/extensions/pcl or 
http://xmlgraphics.apache.org/fop/extensions/afp. At the same time the 
usual prefix for those extensions would be just the renderer acronym.

Even if the same type of rendering hint can be used by different 
renderers they still should be in separate namespaces as this allows 
the user control over behaviour on a per renderer basis without 
changing the fo file. For example lets assume we want to support image 
conversion hints which allows tuning of the image output format. 
Instead of having <fo:external-graphic 
fox:output-conversion="grayscale" src="xyz.png" /> I would recommend to 
use render specific hints like <fo:external-graphic 
afp:output-conversion="grayscale" pcl:output-conversion="bitmap" 
pdf:output-converion="jpeg" src="xyz.png" />. This may not be a good 
example but I hope it illustrates what I am trying to achieve.

Manuel

Reply via email to