You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Jeffrey Walton <no...@gmail.com> on 2011/10/25 10:28:37 UTC

Problem Creating PDF from XML Book (Stylesheet?)

Hi All,

I'm working on Ubuntu 10.04 (x64). I installed the FOP package, and
now trying to create a PDF from O'Reilly's DocBook sample at
https://prod.oreilly.com/external/tools/docbook/docs/authoring/docbook_source/.

$oreilly-handbook$ xalan -xml book.xml -pdf book.pdf

results in an exception:

oreilly-handbook$ xalan -in book.xml
XSLT Error: Failed to process stylesheet. (line -1, column -1.)

XSLException Type is: XSLTProcessorException
Message is: Failed to process stylesheet. (Unknown URI, line -1, column -1)
oreilly-handbook$

I believe i need to add `-xsl <stylesheet>`. But I don't know what the
default stylesheet is.

Would anyone be able to point out the default PDF stylesheet?
And how does one specify a PDF output? I haven't gotten far enough to
know what the default output is? There is -text and -html, but I did
not see -pdf.

Thanks in advance,
Jeff

Re: Problem Creating PDF from XML Book (Stylesheet?)

Posted by Daniel Reznick <ve...@gmail.com>.
This might help...

<xsl:stylesheet version="1.1"
	xmlns:xsl=http://www.w3.org/1999/XSL/Transform
		xmlns:fo="http://www.w3.org/1999/XSL/Format"
	exclude-result-prefixes="fo">


took it from the following Hello World example...

http://www.codeproject.com/KB/java/PDFGeneration_XSLFO_FOP.aspx


Regards,

Daniel.

On Tue, Oct 25, 2011 at 10:28 AM, Jeffrey Walton <no...@gmail.com> wrote:

> Hi All,
>
> I'm working on Ubuntu 10.04 (x64). I installed the FOP package, and
> now trying to create a PDF from O'Reilly's DocBook sample at
>
> https://prod.oreilly.com/external/tools/docbook/docs/authoring/docbook_source/
> .
>
> $oreilly-handbook$ xalan -xml book.xml -pdf book.pdf
>
> results in an exception:
>
> oreilly-handbook$ xalan -in book.xml
> XSLT Error: Failed to process stylesheet. (line -1, column -1.)
>
> XSLException Type is: XSLTProcessorException
> Message is: Failed to process stylesheet. (Unknown URI, line -1, column -1)
> oreilly-handbook$
>
> I believe i need to add `-xsl <stylesheet>`. But I don't know what the
> default stylesheet is.
>
> Would anyone be able to point out the default PDF stylesheet?
> And how does one specify a PDF output? I haven't gotten far enough to
> know what the default output is? There is -text and -html, but I did
> not see -pdf.
>
> Thanks in advance,
> Jeff
>