Yes.. the xsl is outputed exactly as the xsl template...
with small changes in margins but that should not throw the error..

IŽll try moving to sax as soon as i finish some other code....

iŽll keep you updated with any news about this..

thanks for all your help!!

Best Regards,
Esteban

----- Original Message -----
From: "J.Pietschmann" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, May 31, 2002 5:48 PM
Subject: Re: wrong namespace??


> Esteban Gonzalez wrote:
> > seems like an error in the code?
> >
> >                // ADDED XML VOUCHER GENERATION
> >                 XMLGenerator xml = new XMLGenerator();
> >                 Document voucher = xml.generateVoucher( voucherGener );
> >                 Document xsl = xml.getXSL();
> >
> >                 // XSL Formatting.
> >                 Driver driver = new Driver();
> >                 driver.setRenderer( Driver.RENDER_PDF );
> >                 file://driver.setInputSource( new
DocumentInputSource() );
> >                 driver.setOutputStream( outStream );
> >
> >                 file://Let's set the input
> >                 Transformer trans =
> > TransformerFactory.newInstance().newTransformer( new DOMSource( xsl ) );
> >                 trans.transform( new DOMSource( voucher ), new
> > AXResult( driver.getContentHandler() ));
>
> This is already driving the formatting, everything from here
> won't have any effect.
>
> >                 file://Let's set all loggin stuff
> >                 Logger log = null;
> >                 Hierarchy hierarchy = Hierarchy.getDefaultHierarchy();
> >                 PatternFormatter formatter = new
> > PatternFormatter("[%{priority}]: %{message}\n%{throwable}");
> >                 LogTarget target = null;
> >                 target = new StreamTarget(System.err, formatter);
> >                 hierarchy.setDefaultLogTarget(target);
> >                 log = hierarchy.getLoggerFor("fop");
> >                 log.setPriority(Priority.DEBUG);
> >                 driver.setLogger(log);
> >
> >                 file://Let's try another thing
> >                 file://XSLTInputHandler input = new XSLTInputHandler(new
> > File(xmlParam), new File(xslParam));
> >
> >                 file://Let's render the Formatting tree
> >                 driver.render( voucher );
>
> This is particularly superflous, as the document has already been
> rendered.
>
> Are you sure this:
>  >                 Document xsl = xml.getXSL();
> gets you the correct DOM for the style sheet? Try dumping it
> to a file using the identity transformer:
>    TransformerFactory.newInstance().newTransformer().transform(
>      new DOMSource(xsl), new StreamResult(new File("dump.xsl")));
>
> BTW Unless you have to manipulate the content, use SAX instead
> of DOM whereever feasible.
>
> J.Pietschmann
>


Reply via email to