XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
S GillSubject: How to use FOP 0.95 with Stylus Studio?
Author: S Gill
Date: 07 May 2009 03:37 PM
Goal is to use FOP 0.95 instead of FOP 0.20. Also I want to configure FOP to use spcific fonts.

I read following posts:
#1 http://www.stylusstudio.com/SSDN/default.asp?action=9&fid=23&read=1626

#2 http://www.stylusstudio.com/ssdn/default.asp?action=9&read=8469&fid=23

In the #2 first I did not find an option to select the "Custom FOP processor".
In the scenario properties "Post Processor" tab
I select "Custom post-process" and enter following command in the Command line field:

java -cp C:\sgill\pdf\fop-0.95\build\fop.jar;C:\sgill\pdf\fop-0.95\lib\xalan-2.7.0.jar;C:\sgill\pdf\fop-0.95\lib\serializer-2.7.0.jar;C:\sgill\pdf\fop-0.95\lib\xml-apis-1.3.04.jar;C:\sgill\pdf\fop-0.95\lib\xercesImpl-2.7.1.jar;C:\sgill\pdf\fop-0.95\lib\xmlgraphics-commons-1.3.1.jar;C:\sgill\pdf\fop-0.95\lib\xml-apis-ext-1.3.04.jar org.apache.fop.apps.Fop -c C:\sgill\pdf\fop-0.95\conf\fop.xconf %1 %2

When I run this scenario I am getting following error:
Stylus Studio 2009 XML Enterprise Suite Release 2
Error: on line 695 of file:///c:/sgill/pdf/XML2PD~1/myxsl.XSL:

Cannot find a matching 1-argument function named {http://xml.apache.org/xalan}nodeset()

Any help will be appreciated.
S Gill

(Deleted User) Subject: How to use FOP 0.95 with Stylus Studio?
Author: (Deleted User)
Date: 08 May 2009 02:48 AM
I think that the error is coming from the XSLT processor used to perform the transformation, before the FOP post-processor has been started. Which processor did you choose in the "Processor" tab? As you are using a Xalan-specific function, you should try the Java built-in, or use the Custom Processor option to pick the same C:\sgill\pdf\fop-0.95\lib\xalan-2.7.0.jar you are using for FOP.


S GillSubject: How to use FOP 0.95 with Stylus Studio?
Author: S Gill
Date: 08 May 2009 03:12 PM
Hi Alberto,
First I appreciate your help!

In the "Processor" tab I was using "Saxon" then as you advised I switch to "Java built-in".
Also in the "Post Process" tab selected "Custom post-process" and added following values:
In Command line field:
C:\Dev\PDF\fop-0.95\fop.bat %1 %2

Generated file extension:

Additional path:
C:\Program Files\Java\jre1.6.0_03\bin

NOTE: Now I am NOT using custom processor as described in my previous post. In other words in "Processor" tab I have only one setting to set, which is:
Processor: "Java built-in"

When I tried to run scenario Stylus Studio prompted dialog box:
Stylus Studio 2009 XML Enterprise Suite Release 2
The selected XSLT processor is not compatible with XSLT 1.1.

Do you want to use the Saxon processor instead?
Yes No Cancel

I clicked "No".
Post Processing finished with valid PDF document.
This is great!
I really appreciate your help!

Now two things:

#1 During Post Processing run there are many WARN/INFO messages coming as below:
May 8, 2009 9:51:28 AM org.apache.fop.fo.PropertyList convertAttributeToProperty
SEVERE: Ignoring property: color="" (file:/C:/DOCUME~1/nebuild/LOCALS~1/Temp/pro2CC.xml:34944:146: No conversion defined ; property:'color')

Any Idea how these can be fixed?

#2 I want to use/embed specific fonts in the PDF. My scenario using FOP 0.95 so I modified fop.xconf available under {fop-0.95-install-location}\conf also copy font xml and .ttf file as well (e.g. ocra.ttf and ocra.xml).
Post Processing is not using those specific fonts.

I also tried to create “userconfig.xml” and deployed under C:\Program Files\Stylus Studio 2009 Release 2 XML Enterprise Suite\bin\Plugins\Fop

Any idea how to direct FOP to use specified fonts?

Many thanks,
S. Gill

(Deleted User) Subject: How to use FOP 0.95 with Stylus Studio?
Author: (Deleted User)
Date: 08 May 2009 04:04 PM
the XSLT 1.1 specs is only supported by Saxon (and it's not a "real" specs, the work done on that version has never been released); so, unless you are really using instructions from the 1.1 version you should be using Saxon (but in that case you shouldn't use Xalan-specific extensions).
As you say that the transofrmation runs fine, you should change the version="1.1" into version="1.0".

The color="" attribute that FOP finds is evidently a programming error in the XSLT, that doesn't fill that attribute with a valid value; you should inspect your XSLT & XML (or post them here, if you need help) to check why this happens.

To use specific fonts in the PDF you should NOT use the instructions to create the userconfig.xml file in the Stylus Studio folder; that configuration file is for FOP 0.20 only, and in any case Stylus Studio would pick it only when running the copy of FOP 0.20 that ships with Stylus Studio itself. Provided that you compiled the fop.xconf as FOP 0.95 dictates, you should also add to the command line inside fop.bat that runs FOP the -c fop.xconf switch

Hope this helps,

Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.