Parse error: whitespace required (found ">")

Having trouble installing Oxygen? Got a bug to report? Post it all here.
smaug42
Posts: 44
Joined: Tue May 25, 2004 2:27 pm

Parse error: whitespace required (found ">")

Post by smaug42 »

I am using XEP to transform a large document to PDF. The transform to PDF works fine with the default settings... but if I go into the "Configure transformation scenario" and add in an HTML header (using the "Append header and footer" button) and try to transform again, I get this error:

Code: Select all


[error] Fatal parse error: file:/home/ccornell/doc/xml/manual.doc_xslt: line 1, column 62: whitespace required (found ">")

Parse error: whitespace required (found ">")
Process ended with exit code: 1
The HTML I'm trying to use as a header is pretty simple:

Code: Select all


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Logo</title>
</head>
<body>
<img
style="width: 100px; height: 50px;" src="logo.jpg">
</body>
</html>
So... what's going wrong here? Is there some special syntax required for the HTML header function?
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi,

You cannot mix FO and HTML.
Getting PDF from XML means
1. convert the XML using a stylesheet (XSLT) to FO (Formatting Objects)
2. convert the FO document to PDF using a FO Processor

The header and footer options are just some helpers to allow a partial result to be properly presented in the embedded views. For instance imagine that you have a stylesheet that generates only a table row, in order to have it properly presented the html, head, body, table tags can be added in the header and footer so that the result header + transformation result + footer will get a well formed (X)HTML document.

Best Regards,
George
smaug42
Posts: 44
Joined: Tue May 25, 2004 2:27 pm

Post by smaug42 »

Thanks, I thought it was too easy to be able to add a "header" like that... :-) It wasn't really clear in the documentation what that header/footer thing was, so I assumed (hoped) it allowed me to add a header or footer to the final transformed page. It makes sense now...

Now to find a way to insert a company logo/watermark on the top of every page of the PDF....
sorin_ristache
Posts: 4141
Joined: Fri Mar 28, 2003 2:12 pm

Post by sorin_ristache »

Hello,

If the XML document uses the DocBook framework you can add headers and/or footers to every page of the transformation result by customizing some templates in the DocBook stylesheets depending of what you have to display in the header/footer. If the output format of your transformation is HTML you can find more informations at

http://www.sagehill.net/docbookxsl/HTMLHeaders.html

For PDF output see

http://www.sagehill.net/docbookxsl/PrintHeaders.html

Regards,
Sorin
smaug42
Posts: 44
Joined: Tue May 25, 2004 2:27 pm

Post by smaug42 »

Excellent references. Thanks. They are bookmarked now :-) The second link is exactly the solution I need.
Post Reply