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

Default XSL Stylesheet for PDF?

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$ fop -xml book.xml -pdf book.pdf

results in an exception:

Oct 25, 2011 3:34:41 AM org.apache.fop.cli.Main startFOP
SEVERE: Exception
org.apache.fop.apps.FOPException: XSLT file must be specified for the
transform mode

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?

Thanks in advance,
Jeff

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


Re: Default XSL Stylesheet for PDF?

Posted by Jeffrey Walton <no...@gmail.com>.
On Tue, Oct 25, 2011 at 4:31 AM, Eduard Tibet <ed...@i-free.com> wrote:
> Jeff,
>
> Despite your question is more about Docbook specific points, than FOP, I'll try to give you an idea.
My bad. When the other tools did not work, someone (on a mailing list)
suggested I use Apache FOP.

> If you are using Docbook, try the following 2-step transformation.
>
> 1. Use xsltproc to create a FO file using default Docbook:
>
> xsltproc --xinclude --output book.fo <path_to_your_docbook_xsl_stylesheets>/docbook-xsl-1.76.1/fo/docbook.xsl book.xml
>
> As a result you will get .fo-file: book.fo
>
> 2. Using FOP try to create PDF: fop book.fo book.pdf
>
> Hope this helps.
>
> P.S. If you are using Windows OS, replace the slash to the opposite one (sorry, but I forgot about what slash is reverse and what is normal).
Thanks for the help,

jeff

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


RE: Default XSL Stylesheet for PDF?

Posted by Eduard Tibet <ed...@i-free.com>.
Jeff,

Despite your question is more about Docbook specific points, than FOP, I'll try to give you an idea.

If you are using Docbook, try the following 2-step transformation.

1. Use xsltproc to create a FO file using default Docbook:

xsltproc --xinclude --output book.fo <path_to_your_docbook_xsl_stylesheets>/docbook-xsl-1.76.1/fo/docbook.xsl book.xml

As a result you will get .fo-file: book.fo

2. Using FOP try to create PDF: fop book.fo book.pdf

Hope this helps.

P.S. If you are using Windows OS, replace the slash to the opposite one (sorry, but I forgot about what slash is reverse and what is normal).

--
 Best regards,
  Eduard Tibet

-----Original Message-----
From: Jeffrey Walton [mailto:noloader@gmail.com] 
Sent: Tuesday, October 25, 2011 11:55 AM
To: mehdi houshmand
Cc: fop-users@xmlgraphics.apache.org
Subject: Re: Default XSL Stylesheet for PDF?

On Tue, Oct 25, 2011 at 3:48 AM, mehdi houshmand <me...@gmail.com> wrote:
> Hi Jeff,
>
> FOP is an FO processor, as such it takes FO as input, not XML (even
> though FO is XML, XML isn't FO). You need to make sure your input is
> valid FO, then either use the -fo parameter or no parameter since it's
> the FOPs primary input.
OK, thanks (I think).

> If you were curious the -xml input is used in conjunction with an XSLT
> (thus the -xsl parameter) to transform said XML file to FO. There is
> no "default" PDF stylesheet, this mechanism is merely a helper since a
> lot of users create FO using a transform.
OK. xalan also complains about a style sheet. These style sheets seem important.

$ 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)

> So assuming your book.xml is valid FO, the command would look like:
> $oreilly-handbook$ fop book.xml -pdf book.pdf
OK, thanks.

Out of curiosity, how do you create a PDF from a XML (DocBook) book. I
haven't had any luck with docbook2pdf, xsltproc, xalan, fop, etc. I am
amazed at how difficult the designers/architects have made this
process. Here's what the sample book looks like (the chapters are
similar):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
<book>
  <title>DocBook Authoring Guidelines</title>

  <xi:include href="bookinfo.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />

  <xi:include href="ch00.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />

  <xi:include href="ch01.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />

  <xi:include href="ch02.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />

  <xi:include href="ch03.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
</book>

Jeff

$ fop book.xml -pdf book.pdf
Oct 25, 2011 3:48:53 AM org.apache.fop.cli.Main startFOP
SEVERE: Exception
org.apache.fop.apps.FOPException:
org.apache.fop.fo.ValidationException: Error: First element must be
the fo:root formatting object. Found (Namespace URI: "", Local Name:
"book") instead. Please make sure you're producing a valid XSL-FO
document.
javax.xml.transform.TransformerException:
org.apache.fop.fo.ValidationException: Error: First element must be
the fo:root formatting object. Found (Namespace URI: "", Local Name:
"book") instead. Please make sure you're producing a valid XSL-FO
document.
	at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:217)
	at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125)
	at org.apache.fop.cli.Main.startFOP(Main.java:166)
	at org.apache.fop.cli.Main.main(Main.java:197)
Caused by: javax.xml.transform.TransformerException:
org.apache.fop.fo.ValidationException: Error: First element must be
the fo:root formatting object. Found (Namespace URI: "", Local Name:
"book") instead. Please make sure you're producing a valid XSL-FO
document.
	at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:502)
	at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:214)
	... 3 more
Caused by: org.apache.fop.fo.ValidationException: Error: First element
must be the fo:root formatting object. Found (Namespace URI: "", Local
Name: "book") instead. Please make sure you're producing a valid
XSL-FO document.
	at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:262)
	at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:163)
	at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1073)
	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
	at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source)
	at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)
	at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown
Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
	at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)
	... 4 more

---------

javax.xml.transform.TransformerException:
org.apache.fop.fo.ValidationException: Error: First element must be
the fo:root formatting object. Found (Namespace URI: "", Local Name:
"book") instead. Please make sure you're producing a valid XSL-FO
document.
	at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:502)
	at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:214)
	at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125)
	at org.apache.fop.cli.Main.startFOP(Main.java:166)
	at org.apache.fop.cli.Main.main(Main.java:197)
Caused by: org.apache.fop.fo.ValidationException: Error: First element
must be the fo:root formatting object. Found (Namespace URI: "", Local
Name: "book") instead. Please make sure you're producing a valid
XSL-FO document.
	at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:262)
	at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:163)
	at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1073)
	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
	at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source)
	at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)
	at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown
Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
	at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)
	... 4 more
---------
org.apache.fop.fo.ValidationException: Error: First element must be
the fo:root formatting object. Found (Namespace URI: "", Local Name:
"book") instead. Please make sure you're producing a valid XSL-FO
document.
	at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:262)
	at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:163)
	at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1073)
	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
	at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source)
	at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)
	at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown
Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
	at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)
	at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:214)
	at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125)
	at org.apache.fop.cli.Main.startFOP(Main.java:166)
	at org.apache.fop.cli.Main.main(Main.java:197)
/oreilly-handbook$

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


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


Re: Default XSL Stylesheet for PDF?

Posted by Jeffrey Walton <no...@gmail.com>.
On Tue, Oct 25, 2011 at 3:48 AM, mehdi houshmand <me...@gmail.com> wrote:
> Hi Jeff,
>
> FOP is an FO processor, as such it takes FO as input, not XML (even
> though FO is XML, XML isn't FO). You need to make sure your input is
> valid FO, then either use the -fo parameter or no parameter since it's
> the FOPs primary input.
OK, thanks (I think).

> If you were curious the -xml input is used in conjunction with an XSLT
> (thus the -xsl parameter) to transform said XML file to FO. There is
> no "default" PDF stylesheet, this mechanism is merely a helper since a
> lot of users create FO using a transform.
OK. xalan also complains about a style sheet. These style sheets seem important.

$ 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)

> So assuming your book.xml is valid FO, the command would look like:
> $oreilly-handbook$ fop book.xml -pdf book.pdf
OK, thanks.

Out of curiosity, how do you create a PDF from a XML (DocBook) book. I
haven't had any luck with docbook2pdf, xsltproc, xalan, fop, etc. I am
amazed at how difficult the designers/architects have made this
process. Here's what the sample book looks like (the chapters are
similar):

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
<book>
  <title>DocBook Authoring Guidelines</title>

  <xi:include href="bookinfo.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />

  <xi:include href="ch00.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />

  <xi:include href="ch01.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />

  <xi:include href="ch02.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />

  <xi:include href="ch03.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
</book>

Jeff

$ fop book.xml -pdf book.pdf
Oct 25, 2011 3:48:53 AM org.apache.fop.cli.Main startFOP
SEVERE: Exception
org.apache.fop.apps.FOPException:
org.apache.fop.fo.ValidationException: Error: First element must be
the fo:root formatting object. Found (Namespace URI: "", Local Name:
"book") instead. Please make sure you're producing a valid XSL-FO
document.
javax.xml.transform.TransformerException:
org.apache.fop.fo.ValidationException: Error: First element must be
the fo:root formatting object. Found (Namespace URI: "", Local Name:
"book") instead. Please make sure you're producing a valid XSL-FO
document.
	at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:217)
	at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125)
	at org.apache.fop.cli.Main.startFOP(Main.java:166)
	at org.apache.fop.cli.Main.main(Main.java:197)
Caused by: javax.xml.transform.TransformerException:
org.apache.fop.fo.ValidationException: Error: First element must be
the fo:root formatting object. Found (Namespace URI: "", Local Name:
"book") instead. Please make sure you're producing a valid XSL-FO
document.
	at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:502)
	at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:214)
	... 3 more
Caused by: org.apache.fop.fo.ValidationException: Error: First element
must be the fo:root formatting object. Found (Namespace URI: "", Local
Name: "book") instead. Please make sure you're producing a valid
XSL-FO document.
	at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:262)
	at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:163)
	at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1073)
	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
	at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source)
	at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)
	at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown
Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
	at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)
	... 4 more

---------

javax.xml.transform.TransformerException:
org.apache.fop.fo.ValidationException: Error: First element must be
the fo:root formatting object. Found (Namespace URI: "", Local Name:
"book") instead. Please make sure you're producing a valid XSL-FO
document.
	at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:502)
	at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:214)
	at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125)
	at org.apache.fop.cli.Main.startFOP(Main.java:166)
	at org.apache.fop.cli.Main.main(Main.java:197)
Caused by: org.apache.fop.fo.ValidationException: Error: First element
must be the fo:root formatting object. Found (Namespace URI: "", Local
Name: "book") instead. Please make sure you're producing a valid
XSL-FO document.
	at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:262)
	at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:163)
	at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1073)
	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
	at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source)
	at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)
	at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown
Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
	at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)
	... 4 more
---------
org.apache.fop.fo.ValidationException: Error: First element must be
the fo:root formatting object. Found (Namespace URI: "", Local Name:
"book") instead. Please make sure you're producing a valid XSL-FO
document.
	at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:262)
	at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:163)
	at org.apache.xalan.transformer.TransformerIdentityImpl.startElement(TransformerIdentityImpl.java:1073)
	at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
	at org.apache.xerces.xinclude.XIncludeHandler.startElement(Unknown Source)
	at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
	at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)
	at org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scanRootElementHook(Unknown
Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
	at org.apache.xalan.transformer.TransformerIdentityImpl.transform(TransformerIdentityImpl.java:485)
	at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:214)
	at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:125)
	at org.apache.fop.cli.Main.startFOP(Main.java:166)
	at org.apache.fop.cli.Main.main(Main.java:197)
/oreilly-handbook$

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


Re: Default XSL Stylesheet for PDF?

Posted by mehdi houshmand <me...@gmail.com>.
Hi Jeff,

FOP is an FO processor, as such it takes FO as input, not XML (even
though FO is XML, XML isn't FO). You need to make sure your input is
valid FO, then either use the -fo parameter or no parameter since it's
the FOPs primary input.

If you were curious the -xml input is used in conjunction with an XSLT
(thus the -xsl parameter) to transform said XML file to FO. There is
no "default" PDF stylesheet, this mechanism is merely a helper since a
lot of users create FO using a transform.

So assuming your book.xml is valid FO, the command would look like:
$oreilly-handbook$ fop book.xml -pdf book.pdf

Hope that helps

Mehdi


On 25 October 2011 08:37, 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$ fop -xml book.xml -pdf book.pdf
>
> results in an exception:
>
> Oct 25, 2011 3:34:41 AM org.apache.fop.cli.Main startFOP
> SEVERE: Exception
> org.apache.fop.apps.FOPException: XSLT file must be specified for the
> transform mode
>
> 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?
>
> Thanks in advance,
> Jeff
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org
>
>

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