You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "JACOB, ERIC" <er...@bell.ca> on 2004/11/10 14:42:10 UTC

Mine-type

Hi,

I'm wondering how to get the mine-type of a serializer (in a custom
transformer). I tried something like this, but I got an NPE:

ServiceSelector selector = ( ServiceSelector )this.manager.lookup(
Serializer.ROLE + "Selector" );
Serializer serializer = ( Serializer )selector.select( "html" );
if ( serializer.getMimeType().equals( "text/html" ) ) {
    // to something...
}

Configuration into the sitemap:

<map:serializer name="html" logger="sitemap.serializer.html"
mime-type="text/html" src="org.apache.cocoon.serialization.HTMLSerializer">
  <doctype-public>-//W3C//DTD HTML 4.01 Transitional//EN</doctype-public>
  <encoding>ISO-8859-1</encoding>
</map:serializer>

Help would be appreciated.

Thanks,

Eric




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org