pdf transformations not working

Having trouble installing Oxygen? Got a bug to report? Post it all here.
guest

pdf transformations not working

Post by guest »

hi there, just started using oxygen, this could be simple, but i cant figure it out! I'd appreciate some help if anyone has seen this before!

I seem to be able to run the whole process of validating an xml file, a stylesheet for that style and a dtd/schema. I seem to be able to setup and run the transformation to pdf, in other words the software reports that the transformation was successful.

However, there just isnt a file generated. There are no errors, but nothing happens.

Ive tried using very simple files, and ive tried using files included with the distribution....

Any ideas?
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi,

We have no record of something similar so in order to help you we need sample files and a description of what you have tried to do.

Best Regards,
George
jaimes
Posts: 6
Joined: Sat Oct 04, 2003 2:19 pm
Contact:

Post by jaimes »

of course, thanks, thats me by the way, i'm registered now ;)

These are the xml/xsl/dtd files. I am quite new to this so there may just be something really wrong with my files. I used the "learn structure" button to generate the dtd.

I am able to configure a transformation, following instructions of the help files, and able to "apply transformation", but no file is generated.

Thanks for the help, oxygen seems like a really cool product, I want to figure this out and get into it!!

Code: Select all


<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE Studies SYSTEM "file:/Library/WebServer/Documents/dev/oxygen/oxygen2.dtd">
<?xml-stylesheet href="invoice.xsl" type="text/xsl" ?>
<Studies>
<Year>
<Course>
<Lecture>
<Lecturer/>
<Date/>
<Title/>
<Notes>
<Section>
<Heading/>
<Para/>
</Section>
</Notes>
</Lecture>
<CourseTitle/>
<CourseID/>
</Course>
<Date>2003</Date>
<Period>First Year</Period>
</Year>
</Studies>

Code: Select all


<?xml version="1.0" encoding="UTF-8" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<head>
<title>invoice</title>
</head>
<body>
<xsl:value-of select="/" />
</body>
</html>
</xsl:template>
</xsl:stylesheet>

Code: Select all


<!ELEMENT Year (#PCDATA | Course | Date | Period)*>
<!ELEMENT CourseTitle (#PCDATA)>
<!ELEMENT Para (#PCDATA)>
<!ELEMENT Notes (#PCDATA | Section)*>
<!ELEMENT Section (#PCDATA | Heading | Para)*>
<!ELEMENT Lecturer (#PCDATA)>
<!ELEMENT Title (#PCDATA)>
<!ELEMENT Course (#PCDATA | Lecture | CourseTitle | CourseID)*>
<!ELEMENT Date (#PCDATA)>
<!ELEMENT Lecture (#PCDATA | Lecturer | Date | Title | Notes)*>
<!ELEMENT CourseID (#PCDATA)>
<!ELEMENT Heading (#PCDATA)>
<!ELEMENT Period (#PCDATA)>
<!ELEMENT Studies (#PCDATA | Year)*>
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi,

Thanks for posting the documents.
Oxygen uses a FOP to generate PDF documents. It comes with Apache FOP but other FOPs can be easily added. The input for a FOP is a formating objects document. Now your stylesheet generates HTML and not FO therefore it cannot be converted to PDF.

For a FO tutorial you can look at
http://www.renderx.com/tutorial.html
The RenderX FOP - that is XEP - can be very easily integrated to work with oXygen, see
http://xep.xattic.com/xep/connectors/oxygen.html

Hope that helps,
George
jaimes
Posts: 6
Joined: Sat Oct 04, 2003 2:19 pm
Contact:

re::

Post by jaimes »

Cool, thanks, I'll get into that.....
MJ
Posts: 3
Joined: Mon Oct 20, 2003 9:29 pm
Location: Centre for Global eHealth Innovation

having same issue with built-in Apache FOP

Post by MJ »

I'm having the same problem with the built-in FOP in Oxygen 2.0.4 - I have configured my XSLT transformation for FO output to PDF using the built-in Apache FOP processor. Transformation runs fine (no errors), but no files are generated.

I'd prefer to use Apache FO instead of XEP since I work for an academic institution and Apache FO is free. (yes, I know XEP has an academic license...)

I *am* generating valid (as far as I know) FO so if anyone has had this problem or knows what I'm doing wrong, any help would be appreciated!

(the XML source is long so I won't include it but trust me, it's well-formed and valid to the DTD)

XSLT (well-formed, valid):

Code: Select all


<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Archiving and Interchange DTD v1.0 20021201//EN" "http://dtd.nlm.nih.gov/publishing/1.0/journalpublishing.dtd">

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:fo="http://www.w3.org/1999/XSL/Format">

<xsl:strip-space elements="table|tbody|tr|th|td"/>

<xsl:variable name="baseDir" select="'../../../'"/>

<xsl:template match="/article">
<fo:root font-size="10pt" font-family="Times" text-align="justify" xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master master-name="simple" page-height="29.7cm" page-width="21cm" margin-top="1.5cm" margin-bottom="1cm" margin-left="2.5cm" margin-right="2.5cm">
<fo:region-before extent="1cm"/>
<fo:region-body margin-top="1cm" margin-bottom="1.5cm"/>
<fo:region-after extent="1cm"/>
</fo:simple-page-master>
</fo:layout-master-set>
<fo:page-sequence master-reference="simple">
<fo:static-content flow-name="xsl-region-before">
<fo:block text-align="end" border-top="0.1pt solid black" padding-before="3pt" space-after.optimum="3pt">JOURNAL OF MEDICAL INTERNET RESEARCH
</fo:block>
</fo:static-content>
<fo:static-content flow-name="xsl-region-after">
<fo:block font-size="6pt">
<fo:table widows="1" table-layout="fixed">
<fo:table-column column-width="8cm"/>
<fo:table-column column-width="8cm"/>
<fo:table-body>
<fo:table-row>
<fo:table-cell>
<fo:block>
<xsl:value-of select="front/self-uri/@xlink:href"/>
</fo:block>
</fo:table-cell>
<fo:table-cell>
<fo:block text-align="right">
<xsl:value-of select="front/journal-meta/journal-id[@journal-id-type='nlm-ta']"/><xsl:text> </xsl:text><xsl:value-of select="front/article-meta/pub-date/year"/> | vol. <xsl:value-of select="front/article-meta/volume"/> | iss. <xsl:value-of select="front/article-meta/issue"/> | page <xsl:value-of select="front/article-meta/elocation-id"/>-<fo:page-number/>
</fo:block>
</fo:table-cell>
</fo:table-row>
</fo:table-body>
</fo:table>
</fo:block>
</fo:static-content>
<fo:flow flow-name="xsl-region-body">
<!--
<xsl:call-template name="header"/>
<xsl:call-template name="body"/>
<xsl:call-template name="footer"/>
-->
</fo:flow>
</fo:page-sequence>
</fo:root>
</xsl:template>

</xsl:stylesheet>
FO (when i use the XSLT to output to a .fo file):

Code: Select all


<?xml version="1.0" encoding="UTF-8"?>
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xlink="http://www.w3.org/1999/xlink" text-align="justify" font-family="Times" font-size="10pt"><fo:layout-master-set><fo:simple-page-master margin-right="2.5cm" margin-left="2.5cm" margin-bottom="1cm" margin-top="1.5cm" page-width="21cm" page-height="29.7cm" master-name="simple"><fo:region-before extent="1cm"/><fo:region-body margin-bottom="1.5cm" margin-top="1cm"/><fo:region-after extent="1cm"/></fo:simple-page-master></fo:layout-master-set><fo:page-sequence master-reference="simple"><fo:static-content flow-name="xsl-region-before"><fo:block space-after.optimum="3pt" padding-before="3pt" border-top="0.1pt solid black" text-align="end">JOURNAL OF MEDICAL INTERNET RESEARCH
</fo:block></fo:static-content><fo:static-content flow-name="xsl-region-after"><fo:block font-size="6pt"><fo:table table-layout="fixed" widows="1"><fo:table-column column-width="8cm"/><fo:table-column column-width="8cm"/><fo:table-body><fo:table-row><fo:table-cell><fo:block/></fo:table-cell><fo:table-cell><fo:block text-align="right">J Med Internet Res 2003 | vol. 5 | iss. 3 | page e23-<fo:page-number/></fo:block></fo:table-cell></fo:table-row></fo:table-body></fo:table></fo:block></fo:static-content><fo:flow flow-name="xsl-region-body"/></fo:page-sequence></fo:root>
Help! :wink:

MJ
jaimes
Posts: 6
Joined: Sat Oct 04, 2003 2:19 pm
Contact:

different thing ;)

Post by jaimes »

MJ, its not the same thing, I was being new, its working for me now that I am transforming to fo and not html...

sorry, good luck...
MJ
Posts: 3
Joined: Mon Oct 20, 2003 9:29 pm
Location: Centre for Global eHealth Innovation

not the same?

Post by MJ »

Are you using the built-in FOP successfully then? I seem to be having the same symptoms as yourself - do you think it might be because I'm generating invalid FO?

M
MJ
Posts: 3
Joined: Mon Oct 20, 2003 9:29 pm
Location: Centre for Global eHealth Innovation

FOP errors with Oxygen

Post by MJ »

My suspicion was correct.... It was an error in the FO formatting. Apparently FOP errors aren't passed back to Oxygen when parsing FO -> PDF. (XML -> FO errors are reported, however). Hopefully there is some way to change/fix this in the future?

M
george
Site Admin
Posts: 2095
Joined: Thu Jan 09, 2003 2:58 pm

Post by george »

Hi,

The next release will add a new option FO processor/ Enable built-in FOP output that will allow you to see eventual errors of the Apache FOP.

Best Regards,
George
Post Reply