Thanks a lot Keiron, it worked.
                
Just in case someone has this problem, the final stuff looks like:

        private String parserClass= "org.apache.xerces.parsers.SAXParser";
        ...
        XMLReader  parser = (XMLReader)
Class.forName(this.parserClass).newInstance();
 
parser.setFeature("http://xml.org/sax/features/namespace-prefixes",true);

Gustavo

-----Message d'origine-----
De : Keiron Liddle [mailto:[EMAIL PROTECTED]]
Envoyé : jeudi, 5. juillet 2001 09:59
À : [EMAIL PROTECTED]
Objet : Re: problem to run fop within a servlet


I'm not sure if this is the what you need but you may want to try putting
this in.

parser.setFeature("http://xml.org/sax/features/namespace-prefixes";,
                              true);

On Thu, 05 Jul 2001 09:49:57 Wolf Gustavo (SGC-EXT) wrote:
> Hello,
>        I am trying to run fop within my servlet.
> In order to do that, I use:
> 
>         InputHandler inputHandler = new
> XSLTInputHandler(xmlInputSource,xslInputSource);
>         InputSource inputSource = inputHandler.getInputSource();
> //FAILURE HERE
>         XMLReader  parser = inputHandler.getParser();
> /**
> * Creates the driver telling it to write the output file to screen (AWT).
> */
>         Driver driver = new Driver();
>         driver.setRenderer(this.AWTRendererClass);
>         driver.buildFOTree(parser, inputSource);
>         driver.format();
>         driver.render();
> 
> First and second lines run OK. Third line gives an exception:
> javax.xml.transform.TransformerConfigurationException: Namespace not
> supported by SAXParser exception.message: null 
> 
> There is in principle no problem with the xmlInputSource and
> xslInputSource,
> because when I run fop from the command line:
> 
> Fop -xml xmlInputSource.xml -xsl xslInputSource.xsl -pdf output.pdf (or
> option -awt), 
> 
> I get proper results.
> 
> COuld someone please tell me what am I doing wrong, or what am I missing?
> 
> Also, are the lines related to the Driver correct?
> 
> Thanks a lot for your help,
>                                 Gustavo 


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to