cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "JACOB, ERIC" <eric.ja...@bell.ca>
Subject Mine-type
Date Wed, 10 Nov 2004 13:42:10 GMT
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


Mime
View raw message