cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Hoskens ...@schaubroeck.be>
Subject Re: bit of brotherly help...
Date Thu, 27 Jan 2005 12:23:27 GMT
Ok, I'll make it easy for you, just copy this:

package org.yourcompany.cocoon.serialization;

import org.xml.sax.SAXException;

/**
  * A simple serializer, extending XMLSerializer to avoid getting namespaces in
  * output. (Thus only overriding prefixmapping methods to do nothing.)
  *
  * This is most usefull for xhtml outputting.
  *
  */
public class XMLSerializer extends org.apache.cocoon.serialization.XMLSerializer
{

     public void endPrefixMapping(String prefix) throws SAXException
     {
         // do nothing
     }

     public void startPrefixMapping(String prefix, String uri)
             throws SAXException
     {
         // do nothing
     }
}

Then compile with the following jars added to your buildpath:
       avalon-framework-api-4.2.0.jar
       avalon-framework-impl-4.2.0.jar
       cocoon-2.1.5.jar
       excalibur-sourceresolve-2.0.jar
       excalibur-xmlutil-1.0.jar
       excalibur-pool-1.2.jar
       regexp-1.3.jar
I don't know if you need them all (last one probably not, other's not sure as I have other

transformers/serializers/generators as well). These files can be found in your cocoon/WEB-INF/lib

directory, possibly with another version.

Kind Regards,
Jan

beyaRecords wrote:
> 
> On 27 Jan 2005, at 10:43, Jan Hoskens wrote:
> 
>> public class XMLSerializer extends 
>> org.apache.cocoon.serialization.XMLSerializer
>> {
>>
>>     public void endPrefixMapping(String prefix) throws SAXException
>>     {
>>         // do nothing
>>     }
>>
>>     public void startPrefixMapping(String prefix, String uri)
>>             throws SAXException
>>     {
>>         // do nothing
>>     }
>> }
> 
> 
> Hi,
> i'm gonna call this class from my own package as so:
> 
> package test
> 
> all I need to know is what package I need to import and what jar file it 
> sits in? so:
> 
> package test
> import ?????
> 
> public class myXMLSerializer extends 
> org.apache.cocoon.serialization.XMLSerializer
> 
> regards
> 
> Uzo
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 


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


Mime
View raw message