Christian,
thanks for the help, I do have it using the same parser class now, but
apparently this did not resolve my problem.

if i have the following xml:
<root>
<company_address>282 Quarry Rd
Milford, CT 06460</company_address>
</root>

the following is in my stylesheet:

<fo:block font-family="sans-serif" font-size="10pt"
white-space-treatment="preserve" white-space-collapse="false"
text-align="start">
        <xsl:value-of select="company_address" />
</fo:block>


I have a batch file to run fop and create a pdf it prints:
282 Quarry Rd
Milford, CT 06460

When I run this from my code, I get the following in the pdf:
        282 Quarry Rd
Milford, CT 06460



Has anyone seen this behavior before where the first line is always indented
when i set white-space-collapse to false?  I find it especially weird
because it happens only when I create the pdf through our application.

Thanks again,
-David Rosenstein
IMS Software
http://www.ims-usa.com


java -jar xalan-2.4.1.jar -in test.xml -xsl testfop.fo -out test.out

java -jar fop.jar test.out -pdf test.pdf

-----Original Message-----
From: Christian Geisert [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 16, 2003 11:54 AM
To: [EMAIL PROTECTED]
Subject: Re: Changing SAX Class


David Rosenstein schrieb:
> Hi all-
> when i run fop through my java code and generate a pdf i am apparently
using
> a different sax parser than if i run it from the command line out of the
jar

Different CLASSPATH or different JDK?

[..]

> some how the two different parsers parse the xml in a different way and
with
> the xerces parser i get some weird white space in the pdf's if i have
> white-space-collapse set to false.  everything is normal when i am using
the
> crimson parser.   does anyone have a suggestion for how i get my code to
use
> the crimson class?

Remove xerces from classpath or set the property
javax.xml.parsers.SAXParserFactory=org.apache.crimson.jaxp.SAXParserFactoryI
mpl

Oh, the fop command does not support properties for the jvm. So if
you're running some kind of Unix you can do a
export
FOP_OPTS=-Djavax.xml.parsers.SAXParserFactory=org.apache.crimson.jaxp.SAXPar
serFactoryImpl
Under Windows just edit fop.bat (we should offer a more flexible way
under Windows too).


Christian


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to