fo:table margin-left/padding-before not working with RTF

2010-04-14 Thread Glen Mazza

Hello, I'm using FOP 0.95-1.  In my RTF document I would like to pad an
entire fo:table one inch to the right.  If I apply margin-left to the
fo:table tag, it ends up padding not only the table (good) but every cell
within the table's body (bad)--they also get moved off to the right within
their cells.  (I'm not seeing this problem with PDF generation, margin-left
is properly not being inherited by child fo:table-cells.)

Is wrongful inheritance of the margin-xxx properties within RTF generation a
known issue?  I can enter a JIRA bug if helpful.  

If I try padding-before instead of margin-left, FOP complains that this
property must be ignored given that I'm using the default
border-collapse=collapsed property; if I switch to the
border-collapse=separate, the error goes away but nothing moves off to the
right.

So in the meantime, anyone know how I can move a table in a document one
inch to the right with the RTF renderer?

Thanks,
Glen

-- 
View this message in context: 
http://old.nabble.com/fo%3Atable-margin-left-padding-before-not-working-with-RTF-tp28247941p28247941.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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



Re: Problem using attributes with xsl:value-of select=/

2009-11-24 Thread Glen Mazza


J.Pietschmann wrote:
 

Hmm, Transformers can't be reused, perhaps you should get a new
instance here?

 

Oh, I did not know that.  Thanks for the info.


J.Pietschmann wrote:
 
Another possible problem:
 atts.addAttribute(, , reportId, , 123);
 
The method declaration is:
  addAttribute(String uri, String localName, String qName, String type,
String value)
 
You are setting the local name to , which may  cause hiccups.
Try any of the following:
  atts.addAttribute(, reportId, reportId, , 123);
  atts.addAttribute(null, reportId, reportId, , 123);
(Actually, I have no idea which one should work, may even be
implementation dependent).
 

Yes, that was the problem!   Either alternative you have above fixed the
problem for me.

Thanks Joerg!

Glen
-- 
View this message in context: 
http://old.nabble.com/Problem-using-attributes-with-%3Cxsl%3Avalue-of-select%3D%22%22-%3E-tp26451537p26505563.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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



Re: Problem using attributes with xsl:value-of select=/

2009-11-23 Thread Glen Mazza

Thanks, Joerg--it turns out using Fop command line (Fop -xml ... -xsl ...
-pdf ...) attributes and elements 
copy over perfectly.  It's just within my Java program that I can get only
elements.  I'll need to look more into this issue.

Glen


J.Pietschmann wrote:
 
 Both approaches work for me (the first is the canonical one).
 
 I suspect your original problem is somewhat different, common
 problems are misspellings, wrong context and namespace confusions.
 You might get more help if you cutpaste the actual xml and
 xslt code into the mail.
 
 J.Pietschmann
 

-- 
View this message in context: 
http://old.nabble.com/Problem-using-attributes-with-%3Cxsl%3Avalue-of-select%3D%22%22-%3E-tp26451537p26488126.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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



Re: Problem using attributes with xsl:value-of select=/

2009-11-23 Thread Glen Mazza

I could use assistance here.  Given an xml such as:

report reportId=123
   animalcat/animal
/report

My embedded FOP transformation is handling elements but not attributes. 
Here is the code as a Nabble attachment:  
http://old.nabble.com/file/p26489602/attributetest.zip attributetest.zip  --
if you have Maven on your machine, mvn clean install exec:exec will
quickly and easily show the problem.  Here is the code within the
attachment:

public class AttributeTest {


private void run() {
   try {
  // works fine -- both animal element and reportId attribute in pdf
  URL fileURL = getClass().getClassLoader().getResource(attr.xml);
  Source rptSource = new StreamSource(fileURL.toString());
  OutputStream outStream = new
java.io.FileOutputStream(1pdfdirect.pdf);
   
  FopFactory fopFactory = FopFactory.newInstance();
  Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, outStream);
  Result res = new SAXResult(fop.getDefaultHandler());
   
  URL stylesheetURL =
getClass().getClassLoader().getResource(AttributeTest.xsl);
  TransformerFactory factory = TransformerFactory.newInstance();
  Transformer t = factory.newTransformer(new
StreamSource(stylesheetURL.toString()));
  t.transform(rptSource, res);
  outStream.close();
  
  // does not work -- has animal element but not reportId attribute
in pdf
  Source rptSource2 = new SAXSource(new ReportXMLBuilder(), new
EmptyInputSource());
  OutputStream outStream2 = new
java.io.FileOutputStream(2pdfViaReader.pdf);

  Fop fop2 = fopFactory.newFop(MimeConstants.MIME_PDF, outStream2);
  Result res2 = new SAXResult(fop2.getDefaultHandler());
  t.transform(rptSource2, res2);
  outStream2.close();
  
  // but oddly, this *does* work -- keeps reportId attribute
  Source rptSource3 = new SAXSource(new ReportXMLBuilder(), new
EmptyInputSource());
  Transformer t2 = factory.newTransformer();  
  Result res3 = new StreamResult(3xmloutput.xml); // has reportId
attribute
  t2.transform(rptSource3, res3);
  
   } catch (Exception e) {
  e.printStackTrace(System.out);
   }
}

// AbstractXMLBuilder is here: http://tinyurl.com/ye4c39h
public static class ReportXMLBuilder extends AbstractXMLBuilder {
   public void parse(InputSource input) throws IOException, SAXException
{
   handler.startDocument();
   AttributesImpl atts = new AttributesImpl();
   atts.addAttribute(, , reportId, , 123);
   handler.startElement(report, atts);
   handler.element(animal, cat);
   handler.endElement(report);
   handler.endDocument();
   }
}
  
...
}

Can anyone see what I'm doing wrong?

Thanks,
Glen



J.Pietschmann wrote:
 
 Both approaches work for me (the first is the canonical one).
 
 I suspect your original problem is somewhat different, common
 problems are misspellings, wrong context and namespace confusions.
 You might get more help if you cutpaste the actual xml and
 xslt code into the mail.
 
 J.Pietschmann
 

-- 
View this message in context: 
http://old.nabble.com/Problem-using-attributes-with-%3Cxsl%3Avalue-of-select%3D%22%22-%3E-tp26451537p26489602.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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



Problem using attributes with xsl:value-of select=/

2009-11-20 Thread Glen Mazza

Hello, I'm having difficulty getting xsl:value-of select=/ to work with
attributes--it must be something obvious but I can't figure out the problem. 
(I'm using FOP 0.95-1.)

For this XML snippet:

batch myattval=
   aaadog/aaa
   bbbcat/bbb
...

and this XSL template:

  xsl:template match=batch
  fo:blockxsl:value-of select=@myattval//fo:block
  fo:blockxsl:value-of select=./@myattval//fo:block
  fo:blockxsl:value-of select=./myattval//fo:block
  fo:blockxsl:value-of select=myattval//fo:block
  fo:blockxsl:value-of select=./aaa//fo:block
  fo:blockxsl:value-of select=./bbb//fo:block
   

I can get aaa and bbb to output but I cannot get myattval to appear.  I
would think the first and second would be correct, but none of the four
attempts above are working for myattval.  Can anybody see what I'm doing
wrong?

Thanks,
Glen

-- 
View this message in context: 
http://old.nabble.com/Problem-using-attributes-with-%3Cxsl%3Avalue-of-select%3D%22%22-%3E-tp26451537p26451537.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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



Maven repo for FOP 0.95?

2009-01-24 Thread Glen Mazza

Hello, I can't find the Maven Repository for FOP 0.95--the most up-to-date I
see[1] is for FOP 0.93.  Does anyone know of a repository for the latest
release version?  I can type up a JIRA item if one is needed for this.

Thanks,
Glen

[1] http://repo1.maven.org/maven2/fop/fop/
-- 
View this message in context: 
http://www.nabble.com/Maven-repo-for-FOP-0.95--tp21645280p21645280.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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



Re: Maven repo for FOP 0.95?

2009-01-24 Thread Glen Mazza

Never mind--found it.  It's here:
http://repo1.maven.org/maven2/org/apache/xmlgraphics/fop/

It might be nice on the website, perhaps on the Ant Task page under Using
FOP for each version, if you give the dependency and repository snippets
for using FOP w/Maven, and then rename the page to Ant/Maven Use or
similar.

Glen


Glen Mazza wrote:
 
 Hello, I can't find the Maven Repository for FOP 0.95--the most up-to-date
 I see[1] is for FOP 0.93.  Does anyone know of a repository for the latest
 release version?  I can type up a JIRA item if one is needed for this.
 
 Thanks,
 Glen
 
 [1] http://repo1.maven.org/maven2/fop/fop/
 

-- 
View this message in context: 
http://www.nabble.com/Maven-repo-for-FOP-0.95--tp21645280p21645338.html
Sent from the FOP - Users mailing list archive at Nabble.com.


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



[ANNOUNCE] Warthog Reports Framework 1.0 now available

2007-11-21 Thread Glen Mazza

Hello All,

I created a Google Code open-source (Apache license) framework to help with
querying and production of multiple SQL-XML-XSL-FO-PDF reports in a
servlet environment.  It uses FOP 0.93 internally.  It is here[1] in case it
can help anyone, and [2] provides more information on the framework.

Regards,
Glen

[1] http://code.google.com/p/warthog/
[2] http://www.jroller.com/gmazza/date/20071121

-- 
View this message in context: 
http://www.nabble.com/-ANNOUNCE--Warthog-Reports-Framework-1.0-now-available-tf4853236.html#a13887602
Sent from the FOP - Users mailing list archive at Nabble.com.


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



Article for using FOP in a Web Service

2007-11-03 Thread Glen Mazza

Hello,

I recently figured out how to use FOP as part of a web service that returns
PDF documents.  In case this might be of help to others who would like to do
something similar, I have blogged it here:  
http://www.jroller.com/gmazza/date/20071102

Regards,
Glen




-- 
View this message in context: 
http://www.nabble.com/Article-for-using-FOP-in-a-Web-Service-tf4742505.html#a13561699
Sent from the FOP - Users mailing list archive at Nabble.com.


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



Re: FOP supports the Japanese characters?

2007-01-18 Thread Glen Mazza
FOP handles Roomaji very well.  For the other writing scripts, possible 
sources of help are:


http://www.javaworld.com/javaworld/jw-03-2005/jw-0328-xmlprinting.html
http://www.terra-intl.com/tetsuya/2005/11/forrest_japanese.html
http://marc.theaimsgroup.com/?l=fop-userw=2r=1s=japaneseq=b

Glen


Hai-Fun Wu wrote:


Hello, I have a Japanese FO file (attached) generated by 
javax.xml.transform.Transformer.  It looks like encoded correctly 
(UTF-8).  I ran it through FOP (FOP test-japanese.fo 
test-japanese.pdf) and the result Japanese characters in PDF file were 
not displayed correctly in my Adobe Acrobat.  It is possible that my 
Adobe Acrobat might not configure correctly.  I was also wondering if 
you know FOP supports the Japanese characters.


Thanks in advance,
Hai-Fun Wu



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



Re: Running FOP as a Java Stored Procedure on Oracle

2007-01-15 Thread Glen Mazza

Perhaps this would be a good skeleton for what you want to do:
http://www.renderx.com/support/oracle.html

Of course, the Java API between FOP and RenderX are different and will 
need changing, etc.  But the basic principle should be the same.


HTH,
Glen

Luciano Belotto wrote:


I use Apache FOP to turn xml into PDF using an xsl.

 

I wish to have this functionality run on the Oracle database as a Java 
stored procedure. What I want to ask is that if anyone has done this 
before, and can pass along some info or where I could find information 
on doing this. I’ve searched mailing list archives and the web, I 
couldn’t find anything specific to loading FOP on Oracle, just on 
loading Java classes in general on the database. I’d like any tips on 
FOP in specific, if it has been done before.


 




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



Re: fo:table-row is missing child elements

2007-01-02 Thread Glen Mazza
Hmmm...judging from your email address, I hope it is not a docbook 
stylesheet that is requiring you to run in -r mode.  I would send a 
bug report to the OASIS docbook team if it is.


Glen


[EMAIL PROTECTED] wrote:


Hi Glen,

running FOP 0.92beta with the option

-r  relaxed/less strict validation (where available)

now generates a PDF without the error described below :-)))

Thanks and happy new year.

Best Regards,
Leeloo

*/Glen Mazza [EMAIL PROTECTED]/* schrieb:

[EMAIL PROTECTED] escribió:

  Trying to convert an FO-File which was generated by FOP 0.92beta
to an
  PDF just stopped with following Error Message:
  javax.xml.transform.TransformerException:
  org.apache.fop.fo.ValidationException: file:///test/test.fo:1:43655:
  Error(1/43655): fo:table-row is missing child elements.
  Required Content Model: (table-cell+)
 

Process of elimination is probably best here: keep minimizing your FO
file until you identify the element causing the error to occur.

There is also an option I believe in FOP 0.93 to run in non-strict
validation mode, which would I believe would accept the situation that
is occurring for you.

  I can't find any fo:table-row in FO-File which missed a
fo:table-cell. I
  think everything is alright. Using FOP 0.20.5 converting the XML
to PDF
  - it works fine.
 

The new FOP raises an error by default, as protection in case you
goofed
up your XSLT template calls and ended up creating no cells where you
actually wanted some. This way erroneously created invoices with no
rows, for example, won't end up going out to the customer, or if you
create a 250 page document you don't have to manually read each page
just to make sure every table has the rows you intended.

Glen

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


__
Do You Yahoo!?
Sie sind Spam leid? Yahoo! Mail verfügt über einen herausragenden Schutz 
gegen Massenmails.

http://mail.yahoo.com




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



Re: fo:table-row is missing child elements

2006-12-21 Thread Glen Mazza

[EMAIL PROTECTED] escribió:

Trying to convert an FO-File which was generated by FOP 0.92beta to an 
PDF just stopped with following Error Message:
javax.xml.transform.TransformerException: 
org.apache.fop.fo.ValidationException: file:///test/test.fo:1:43655: 
Error(1/43655): fo:table-row is missing child elements.

Required Content Model: (table-cell+)



Process of elimination is probably best here:  keep minimizing your FO 
file until you identify the element causing the error to occur.


There is also an option I believe in FOP 0.93 to run in non-strict 
validation mode, which would I believe would accept the situation that 
is occurring for you.


I can't find any fo:table-row in FO-File which missed a fo:table-cell. I 
think everything is alright. Using FOP 0.20.5 converting the XML to PDF 
- it works fine.




The new FOP raises an error by default, as protection in case you goofed 
up your XSLT template calls and ended up creating no cells where you 
actually wanted some.  This way erroneously created invoices with no 
rows, for example, won't end up going out to the customer, or if you 
create a 250 page document you don't have to manually read each page 
just to make sure every table has the rows you intended.


Glen

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



Re: How to process xhtml form data into pdf document?

2006-11-01 Thread Glen Mazza
Oh, by the way, you want to ask these types of questions on 
fop-users@xmlgraphics.apache.org, *many* more users there.


Glen

Glen Mazza wrote:

Jeremias provided a solution[1] to a similar question I had.  Also, I 
wonder if XForms might be a better option for you--there are some open 
source server-side solutions you might want to look at[2].  (However, 
I have not yet used XForms myself so am unsure here.)


Glen

[1] http://marc.theaimsgroup.com/?l=fop-userm=108136796216447w=2
[2] http://en.wikipedia.org/wiki/XForms#Software_support


Nielsen, Michael wrote:


Hi there

Im new to FOP and I have been searching the web for hours now trying to
find a solution the the following challenge:

I have an XHTML file that consists of a scanned gif file and some html
form fields that are positioned on the xhtml file using css where the
positioning of of the fields are described. So if you open the xhtml
file you can enter data directly.

My challege is how to transform this into xsl:fo?? I have tried to make
a block use the image gif as background and render text on top of it but
no luck. Only the part of the image that has text on it is shown. What i
need is the full form image to be shown and then render the html form
data on top of it in the correct positions.
I have also tried to use the external-graphics tag to render the image
but then I cant position data on top of it ;(.

So:

1) Whats the best solution for rendering the full image and position
data on top of it?
2) How to position data on top of the image file?

Thanx in advance!

/Regards Michael


This message contains information that may be privileged or 
confidential and is the property of the Capgemini Group. It is 
intended only for the person to whom it is addressed. If you are not 
the intended recipient,  you are not authorized to read, print, 
retain, copy, disseminate,  distribute, or use this message or any 
part thereof. If you receive this  message in error, please notify 
the sender immediately and delete all  copies of this message.


 




-
Apache XML Graphics Project URL: http://xmlgraphics.apache.org/
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]



Re: How to make directives look better? Customizing/defining elements and formatting...

2006-10-19 Thread Glen Mazza

Jay Bryant wrote:


Hi, Dan,

That's either not DocBook or it's a customization of it.

You can achieve the same look by writing a transform that turns those 
elements into standard Docbook and then styling the DocBook output 
accordingly.


For now, remember that DocBook contains content. You'll do the styling 
when you run the DocBook XSL stylesheets to generate FO content for 
FOP. So, once you have the content in DocBook, you want to look at 
customizing the styling layer.


THE book on the subject is Bob Stayton's DocBook XSL.



Here's a link to it:  http://www.sagehill.net/docbookxsl/index.html

Glen


Keep asking questions and showing us your code.

Jay Bryant
Bryant Communication Services




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



Re: fop with oc4j

2006-10-16 Thread Glen Mazza

On 16.10.2006 14:26:51 Onur Senturk wrote:


hi, i'm trying to use fop with oc4j but i think the xml parsers are
conflicting. when i try to use xerces, the application doesn't start. When i
use the xml parser of the oc4j, i cannot make fop work.
what should i do? does anyone have an idea? thanks.

   



Hi Onur, I converted a FOP-based web app from Tomcat to Oracle App 
Server a few months back.  Yes, you will need to switch to the Apache 
XML libraries, but you will also probably need to temporarily activate 
OAS classloader logging to try to figure out what the loading problem is 
(the application doesn't start problem you mentioned above.)  Every 
application is different, and all have their initial installation 
headaches.  (It turned out for me, for example, that I was missing 
commons-logging.jar, but the *only* way I could figure that out was by 
running OAS classloader logging and viewing the log files.)  If this 
doesn't work, and you're desperate, another piece of advice I can offer 
is to *greatly* simplify your webapp--deploy a skeleton of it--and 
incrementally put more into it, using process of elimination to 
determine at what point the webapp fails.  I gave links to information 
about OAS classloader logging and switching parsing libraries in a blog 
entry below:


http://jroller.com/page/gmazza?entry=migrating_spring_based_webapp_from

Glen


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



Re: Barcodes in fop 0.92 - Batik

2006-10-09 Thread Glen Mazza

Richard King wrote:


Thanks for that.  I appreciate it and the jar looks good.

Downloaded and updated my jar ... unfortunately now have a new problem!

Running the fop.bat or via java I get a FATAL.  The message of concern I 
believe is:
The attribute width of the element rect is required



Ummm, just to confirm, you *do* have a width attribute on that 
rect/, right?  I want to make sure that this is not an EBKAC problem.


Glen

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



Re: Barcodes in fop 0.92 - Batik

2006-10-09 Thread Glen Mazza

Richard King wrote:


Heya,
What I'm doing is trying to implement a barcode via barcode4j.


Oh!  This is a Jeremias question then.  My knowledge of barcodes is 
limited to finding them on products so I can use the self-serve checkout 
at the grocery store.


I did not realize that the rect/ was generated from the barcode 
program and not from your code.




Full FATAL:
09-Oct-2006 17:47:52 org.apache.fop.fo.FONode attributeWarning
WARNING: Warning(Unknown location): fo:table, table-layout=auto is currently n
ot supported by FOP
09-Oct-2006 17:47:52 org.apache.fop.fo.FONode attributeWarning
WARNING: Warning(Unknown location): fo:table, table-layout=auto is currently n
ot supported by FOP


Still, leaving aside the barcode error, I would place a 
table-layout=fixed to get rid of this error.  (Note I believe you will 
need to also subsequently give table-column widths as a result.  Google 
on fo:table for a billion examples.)  It *might* be related to the 
barcode error you are getting, if the barcode program uses table 
dimensions to determine the width attribute.


Glen


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



Re: conversion of xml data to pdf

2006-10-08 Thread Glen Mazza

Andreas L Delmelle wrote:


On Oct 8, 2006, at 15:45, Andreas L Delmelle wrote:


snip /
It appears that either these bugs simply get ignored by Oracle (*),  
or no-one takes the time to file them and supply the Oracle-devs  
with the information they really need to address these problems.



It just occurred to me: to make sure which of the two options applies  
here, maybe someone can test this with Oracle 10g and see if the bug  
is still present in that release. Maybe it has already been fixed,  
but not in Oracle 9...





Been there, done that with Oracle 10.1.3, Oracle XML-parsing bugs still 
exist there too.  The main solution, which worked well for me, is to 
switch to the Apache Xerces libraries[1].


Glen

[1] 
http://download-east.oracle.com/docs/cd/B25221_04/web.1013/b14433/classload.htm#CIHFJEEF



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



Re: node() and text() problem

2006-10-02 Thread Glen Mazza
This issue does not appear to be XSL-related, and I am not certain it is 
even XSLT related.  Perhaps the XML-DEV mailing list could be of 
help--be sure to give more background information over which 
XML-processing technology you are using.  Also note your My problem 
sentence below is missing several words.


Glen

fabio76 wrote:


I have a file test.xml as this :

test 1a child 1bcchild 2/cchild 2btest 2a 



My problem is the same :How can I read the text of node   before node , then
apply node  , and then continue with the text of element   ?

In my example :

test 1a

apply-node b and his child

test 2a

Best regards
Fabio
 




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



Detecting page breaks (Was Re: Creating FO DOM directly)

2006-09-28 Thread Glen Mazza

Shubhrata Tewari wrote:


Hi,



Greetings.  Be careful not to hijack threads (i.e., remember to change 
the subject title in your email to help with searching the mailing list 
archives.)


Is it possible using xslt and xsl:fo to detect a page break? 


No, not XSLT (xsl: namespace) because that happens before FOP starts 
working.  FOP determines page breaks after the XSLT transformations are 
complete.


As for XSL-FO (fo: namespace)...

basically I 
am using a for-each, and I want to show some data in the first row

of a page whenever a new page begins.
Any ideas?



Again, your xsl:for-each has dissolved and disappeared before FOP ever 
activates.


If the data is constant (Hi!  Welcome to India!) then just place it in 
the fo:static-content with region xsl-region-start.


If the data is dynamic and based on the contents of the page (for 
example, the first and last words on the page of a glossary or 
dictionary) then the fo:marker and fo:retrieve-marker is what you will 
need.  Google on those two fo's for countless examples.


If you would like running subtotals of financial data, Joerg gave a 
solution[1] a while back.


Glen

[1] http://marc.theaimsgroup.com/?l=fop-userm=109035492329917w=2


shubhrata, India



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



Re: Creating FO DOM directly

2006-09-27 Thread Glen Mazza

Lars Ivar Igesund wrote:

I need to create PDF from the information contained in some Java objects. The 
standard way to do this according to the FOP docs, is to create XML from the 
objects, then transform to XSL-FO using XSLT.


 



Yes.  Learning XSLT (like Ant) is Time Very Well Spent.

But since there are FO DOM nodes internally in FOP, it seems to me to be a 
natural alternative to create these nodes directly instead of going via XML + 
XSLT.
 



I placed in such an example a few years back into our 
{fop-dist}/examples/ directory, back in my ultra-newbie days.  It's 
quite hideous, but here it is:  [1].  (Unfortunately, with the switch of 
FOP's repository from CVS to SVN, we apparently have lost this deleted 
file, but it remains in our CVS mailing list archives.)


[1] http://marc.theaimsgroup.com/?l=fop-cvsm=106081657102191w=2


Is this possible, and how would I go about processing the tree?

 



See above, but really look at these examples[2] for the XSLT  SAX-based 
way of processing.  This will prove much easier for you.


[2] 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/examples/embedding/java/embedding/


Glen


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



Re: xml to pdf converstion(generic xsl-fo)

2006-09-18 Thread Glen Mazza
I would recommend using XSLT to do the transformations that you need.  
Unfortunately you will need to learn XSLT first before you can use it.  
Check the Xalan website for more details.  The Mulberry XSLT mailing 
list (google) is best for specific questions you may have.


Glen

vijay wrote:

Hi 


This is urgent requirement for our project.we are in need of urgent solution
for the problem , i am explaning below:

1.i need solution for the conversion of xml to PDF using XSL-fo.Because we
are using fo concepts, it's specific to xsl-fo.

My system is generating xml file. The generated xml file needs to be
converted to PDF file.Example: 


root
object  
   c1/c1

   c2/c2
   c3/c3
   c4/c4
/object

object  
   c1/c1

   c2/c2
   c3/c3
   c4/c4
/object
/root

I have to convert this xml file to pdf format. in pdf  c1,c2,c3,c4 values
should be  print in table  coloumns and rows 



so my output will be in table 



 c1  c2  c3  c4
 aa  bb  cc  dd
 zz  xx  vv  nn


The main problem is i have to write generic xsl-fo  that will converts any
xml into pdf 




kindly do reply asap .i would be greateful and obliged..

Thanks in advance
 




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



Re: How to get the text be flowed to the next column

2006-09-14 Thread Glen Mazza

Susanta Dash wrote:


Hey guys, I can't wait for XSL-FO 1.1 and can't see any alternative. Can you
guys just guide me to accomplish my need; I'm trying to get the exact point
where to break the text, so that I can just move the rest of the text to the
next column. I'm thinking to use AWT renderer and pick the font metrics by
using Rectangle2D and JPEGEncoder, etc. etc. Now, what I'm afraid of is, the
co-ordinates I'll generate from this, will it be the same or will be fit for
FOP or Can I use some FOP thing that helps me doing this?

Thanks.

 



Sorry, I personally cannot help or advise you at this stage--this goes 
well beyond my capabilities.


Glen

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



Re: How to get the text be flowed to the next column

2006-09-13 Thread Glen Mazza
Susanta,  I think you're a victim of your earlier thread-hijacking, 
check this post:

http://marc.theaimsgroup.com/?l=fop-userm=115812992904817w=2

Basically, I believe the reason why you are using tables is because XSL 
1.0 does not provided the advanced layout functionality you want with 
respect to regions and page flow (because it just has 
fo:simple-page-master), so you are hoping to accomplish with tables what 
you can't do with pages/regions.  Problem is, if the XSL Working group 
would have defined this layout for tables (which would be an odd use 
case here), they would probably have first done it for pages/regions anyway.


The fo:flow-map/multiple fo:flow of XSL 1.1 (not yet implemented in FOP) 
might help you, as the link above states; in addition, I think the XSL 
WG will eventually create an fo:page-master that will also have the 
advanced layout missing from fo:simple-page-master.


Glen


Susanta Dash wrote:


Hey guys,
 
Are we on the same page yet? OR Am I making any mistake to understand 
how to layout this problem OR this feature is missing entirely or in 
the build I'm using(0.20.5)?
 
Thanks.
On 9/13/06, *Susanta Dash* [EMAIL PROTECTED] 
mailto:[EMAIL PROTECTED] wrote:


Glen,

Actually i've a paragraph(s) of text, ABC was just an example.
Like in my
previous example i had 2 paragraphs and to be fit in 2 different
rows each.
It's not at all a problem if i have same number of columns in each
row, but
variable column count is an issue.

Thanks.

-Original Message-
From: Glen Mazza [mailto: [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 13, 2006 12:03 AM
To: fop-users@xmlgraphics.apache.org
mailto:fop-users@xmlgraphics.apache.org
Subject: Re: How to get the text be flowed to the next column


Susanta Dash wrote:


 Here is the problem I'm facing while rendering it in FOP.
 I've two rows, first one has 3 columns and the next has 2
columns. The
 text within these rows need to be flowed to the next column.

Why wouldn't having one column for each row and letting the text flow
normally solve what you need?  What would be lost if you did that?

 Like for
 example: I've ABC as text, in this scenario I want the text to be
 arranged as A in column1, B in column2 and C in column3. The
same thing
 for the second row.

Are there spaces between ABC?  I'm having difficulty
generalizing what
you want.  What if you had The person is in the room as text--which
words would you want in each column?  Also, what justification
would you
want for the text in each column?

Glen


 I tried to arrange the text below, hope it's viewable:

 
 | A | B | C |
 
 |  X   |  Y  |
 

 I also tried to set column-count in fo:region-body at page level,
 where i can set either to 2 or 3, which is not helpful.

 Suggestions are highly appreciated.

 Thanks.

 Susant.


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





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



Re: docbook-xsl Stylesheets packaged in a WAR

2006-09-12 Thread Glen Mazza

Don Adams wrote:


Hello,

Has anyone successfully packaged the docbook-xsl stylesheets
into a WAR and used them with JAXP?
 



I'm unsure what the relevance of the WAR file to your problem is.  Upon 
deployment, wouldn't the servlet container expand the WAR file into its 
various folders and files anyway?  So it would appear that your problem 
would be happening regardless of whether or not the files originally 
came from a WAR file.


Glen


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



Re: How to get the text be flowed to the next column

2006-09-12 Thread Glen Mazza

Susanta Dash wrote:



Here is the problem I'm facing while rendering it in FOP.
I've two rows, first one has 3 columns and the next has 2 columns. The 
text within these rows need to be flowed to the next column. 


Why wouldn't having one column for each row and letting the text flow 
normally solve what you need?  What would be lost if you did that?


Like for 
example: I've ABC as text, in this scenario I want the text to be 
arranged as A in column1, B in column2 and C in column3. The same thing 
for the second row.


Are there spaces between ABC?  I'm having difficulty generalizing what 
you want.  What if you had The person is in the room as text--which 
words would you want in each column?  Also, what justification would you 
want for the text in each column?


Glen



I tried to arrange the text below, hope it's viewable:


| A | B | C |

|  X   |  Y  |


I also tried to set column-count in fo:region-body at page level, 
where i can set either to 2 or 3, which is not helpful.


Suggestions are highly appreciated.

Thanks.

Susant.



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



Re: formatting tables

2006-09-06 Thread Glen Mazza

paul wrote:


Hello

I'm trying to format a table, and it would be useful to apply formats like
padding, background-color to entire rows or columns (which, according to my
book, should be possible). If I try to do so, nothing happens. I always have to
set these attributes in the individual cells of the table, which I find a bit
tedious and fumbly.


Speaking generally, if there are properties that are not working row- or 
column-level in FOP, requiring tedious cell-level usage, sometimes a 
solution is to rely on XSLT to simplify your work.  Two options are XSLT 
attribute sets and calling templates.


Frank Neugebauer's article, Modularize Formatting Objects, linked 
here[1] (with other XSL links you may find useful), is probably one of 
the best articles to read for this purpose.


Glen

[1] http://del.icio.us/gmazza/xsl

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



Re: number-page-citation math...

2006-09-01 Thread Glen Mazza
Just my $0.02, but I dislike usage of the deprecated XSL-FO.  The 
difference between XSL and XSLT are pretty well-understood today.


Glen

Jeremias Maerki wrote:

XSL-FO doesn't provide anything that would let you do that. 

 




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



Re: PDF Destinations

2006-08-25 Thread Glen Mazza
I would prefer avoiding the use of fox:destination, as the XSL WG did 
not see a need for a separate FO for this when they placed bookmarks 
into 1.1.  Instead, I think it would be better to implement it the way 
the commercial processors handle them, which is I believe is relying 
either on the id on the element to be anchored or another property 
[1][2][3].  Relying on a property instead of a new FO would probably be 
easier/cleaner than introducing fox:destination back to the source code 
anyway, as there would be no XSL document validation issues to be 
checking for.


Glen

[1] http://sourceware.org/ml/docbook-apps/2005-q2/msg00214.html
[2] http://www.oasis-open.org/archives/docbook-apps/200602/msg00174.html
[3] http://sourceware.org/ml/docbook-apps/2005-q2/msg00216.html

Jeremias Maerki wrote:


Indeed, we had fox:destination in FOP 0.20.5 but this has not been
reimplemented, yet. Contributions are welcome as always. If you need
pointers, we're always eager to provide those to get you started.

On 24.08.2006 09:59:52 andyrob_24_7 wrote:
 


Is there a way to achieve destinations in a pdf (so you can link to a certain 
page), in FOP?

It seems this is not yet in 0.92?
   





Jeremias Maerki


-
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]



Re: [Poll] Expectations regarding side-floats

2006-08-11 Thread Glen Mazza
Vincent, in considering this, you may wish to also keep in mind:  what 
do you see as the usage difference between side-floats and the 
xsl:region-start and xsl:region-end regions?  I mention this, just to 
make sure that use cases actually intended for side regions do not move 
into side-floats, and vice-versa.


Glen

Vincent Hennebert wrote:


Dear Fop users,

I'm currently thinking about the implementation of side-floats
(fo:float float=start/end) into Fop. It turns out that there is a
choice to make between several design decisions which imply different
behaviors regarding the placement of floats on the page.

To help me make a decision, I'd like to know which usage you would make
of side-floats: on a general manner, what sort of typographic material
would you typeset using side-floats? Particular things of which we don't
think in the first place?

More specifically, as the XSL-FO recommendation allows some freedom in
these areas:
- would you expect a side-float being placed on another page than its
 anchor? Would you prefer the whole chunk of text to be deferred on the
 following page?
- would you expect a side-float being split on several pages?
- would you expect different layouts, depending on whether a set of
 side-floats would be placed on the middle of a page or at the bottom
 (thus, with some of them on the current page and the others on the
 following page)?



Any comments, remarks, hints of all sort would be welcome.

Thanks,
Vincent

-
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]



Re: User Types

2006-08-09 Thread Glen Mazza

We use XSL/XSLT for reports and for Docbook.

Docbook:  Tech Writer creates the XML documents that will be fed through 
the Docbook stylesheets.  Uses Eclipse WTP for this.  The developer 
creates an Ant script that automates all of the tech writer's doc 
generation and publishing-to-web-server tasks so the writer only needs 
to know how to call Ant tasks from the script for these chores.  (Over 
time, our tech writer has also learned to modify and add new tasks in.)


Docbook Maintenance:  Tech Writer enters the documentation changes 
(after getting information from developers) and republishes them via Ant 
scripts.


XSL/XSLT Reports:  Very nice separation of data from presentation 
chores.  Developer first defines the input format of the XML document 
that will have the report's data.  The tech writer creates the 
stylesheet that will layout the report, usually leveraging previously 
created stylesheets, and also creates sample XML documents with dummy 
data for testing the stylesheets.  Tech writer also maintains any header 
stylesheets that will be imported by multiple document stylesheets.  
Developer creates the SQL, SAX Event generation, etc. that generate the 
XML document.


For a non-programming tech writer, XSLT coding presents a pleasantly 
not-very-steep but continuous learning curve--simple stuff can be done 
without any training at all (i.e., change the title in an already 
existing document from FOO to BAR -- anyone with a text editor can S  R 
on FOO to do this without needing to know a thing about XSLT) with more 
complex tasks (XSLT templates and functions and the like) gradually 
added in over time.


XSL/XSLT Reports Maintenance:  Tech Writer is responsible for making 
stylesheet/reports look nice and presentation/layout change requests, 
developer is responsible for bringing in new/different data elements 
from the SQL, as well as overall maintenance of the web application.


The main thing when doing Docbook and XSL/XSLT in production, especially 
with non-programming employees is:  Ant, Ant, Ant!  Keep everything 
automated and defined (classpaths, working directories, web servers to 
FTP to, etc.) within Ant and outside local IDEs/computer environment 
variables.  (Among other benefits, if some developers prefer this IDE 
and others another IDE, it won't matter, because everything is 
configured within the Ant build file.)  The second most important thing 
is CVS/SVN, CVS/SVN, CVS/SVN!  Eclipse makes it easy to immediately 
commit new changes.


Glen

[EMAIL PROTECTED] wrote:


I'd be interested to know what types of people are using the FOP engine to 
generate documents.

Could you indicate whether your setup has a dedicated programmer, or team of 
programmers, individual author, technical author etc.

Does the same person who writes the content setup your FOP transformations.

thanks

Andy R

--
This message was sent on behalf of [EMAIL PROTECTED] at openSubscriber.com
http://www.opensubscriber.com/messages/fop-users@xmlgraphics.apache.org/topic.html

-
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]



Re: marker value to variable

2006-07-19 Thread Glen Mazza

pat wrote:


Hi,

Well, the template is for kind of bill for Czech postal service and they
require to split payment to integer part and the fraction (don't ask me why).

 



Yes, the Czech postal service is a constant source of problems on this 
ML.   ;-)



So, the creation of two markers is not possible (addition of fraction can
produce integer part :-\). The way should be adding all prices on the page and
then split integer and fraction (split 10.50 as 10 and 50 in two separated
columns in table).

In the fo:flow is used:
fo:marker marker-class-name=subtotal
  xsl:value-of select=price + sum(preceding::price)/
/fo:marker

and in fo:static-content flow-name=xsl-region-after thers's:
fo:block text-align-last=end font-size=12pt
  fo:retrieve-marker retrieve-class-name=subtotal retrieve-boundary=page
  retrieve-position=last-starting-within-page/
/fo:block

I have played a bit with setting the marker value to variable and I've found 
this:
1) variable definition:
xsl:variable name=tmp
  fo:retrieve-marker ... /
/xsl:variable
2) reading $tmp by xsl:copy-of select=$tmp/ gave me a requested number
3) reading $tmp by xsl:value-of select=$tmp/ does nothing

 



I would stop thinking about using xsl: tags.  Again, they all disappear 
before the fo: tags are activated.  By the time fo:retrieve-marker has a 
value, the xsl:anything stuff is long gone from the stylesheet.


Instead, I wonder if you can use div and mod[1] to get the portions you 
need.  I haven't done this before with XSL, however.


$55.28 * 100 = 5528 mod 100 = 28?
$55.28 * 100 = 5528 - ($55.28 * 100 mod 100) = 5000 div 100 = 50?

I don't know if fo:retrieve-marker/ can be used in place of $55.28 
above though.


Glen

[1] 
http://www.w3.org/TR/2001/REC-xsl-20011015/slice5.html#section-N6961-Expressions



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



Re: marker value to variable

2006-07-18 Thread Glen Mazza

pat wrote:


Hi all,

I have a problem and I'm not able to solve it :-( I'm using marker to generate
subtotat (it works) and for retrievng the subtotal I'm using retrieve-marker
(that works too), but I need to split subtotal to part before decimal point
and after decimal point ant this is the problem. How to store the value from
retrieve-marker to variable or use it directly ???

I'm looking for something like this:
xsl:variable name=qqq
 fo:retrieve-marker .../
/xsl:variable

Is there a way how to do that ???

 

I don't think so.  By the time FOP is processing your input XML, it is 
fully in the FO namespace.  (It initially uses Xalan--or Saxon--to do 
the XSLT transformations, replacing your xsl: elements with the result 
tree of your XSLT transformation.)  The xsl: elements are all gone by 
the time FOP is processing fo:retrieve-marker.


It may be helpful for others to be able to answer your question if you 
let us know what type of data you are handling and why you need this 
functionality.  There may be another way to accomplish what you need here.


Glen


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



Re: FO2PDF without validation

2006-07-12 Thread Glen Mazza
If it's not compliant, then it is not an FO file, and expected output 
would have to be undefined as a result.  I'm unsure why you would want 
to code your stylesheets in an invalid way.  If you have no data, better 
to code your XSLT not to generate a fo:table to begin with.


Glen

Navanee wrote:


Hello,

 

Is it possible to convert FO file to PDF without validating FO?  I am 
getting the following Exception.


 

org.apache.fop.fo.ValidationException: file:///E:/test.fo:66:1145: 
Error(66/1145): fo:table-body is missing child elements.


Required Content Model: marker* (table-row+|table-cell+)

at 
org.apache.fop.fo.FONode.missingChildElementError(FONode.java:403)


at 
org.apache.fop.fo.flow.TableBody.endOfNode(TableBody.java:103)


at 
org.apache.fop.fo.FOTreeBuilder$MainFOHandler.endElement(FOTreeBuilder.java:357) 



at 
org.apache.fop.fo.FOTreeBuilder.endElement(FOTreeBuilder.java:193)


 


Your suggestions are most welcome!

 


Thanks,

 


Best Regards

Navanee.

 

 




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



Re: XSL Optimization

2006-07-04 Thread Glen Mazza

[Happy Independence Day fellow Americans!]

Manuel Mall wrote:


Looking at the stylesheet you seem to simply generate a table. IMO if 
this is all you want to do FOP may not be the best tool for the task at 
hand. For example storing your test results in a database and using a 
report writer may be a much better fit to your needs. The strength of 
FOP is NOT in the generation of hundreds of pages of identically 
structured tabular data. FOP is actually fairly inefficient at doing 
that.




While FOP may indeed not be optimized or designed to handle generating 
the telephone book of a large city, I think we should stress that this 
is not necessarily a limitation of XSL or XSLT.


XSL and XSLT combined still offer incredible power in allowing you to 
implement the Don't Repeat Yourself principle--common headers and 
footers and formatting rules, etc., that normally would have to be 
defined and maintained individually within each report using a 
traditional report writer can be stored and maintained in just one 
place.  As the number of reports increases, the maintenance savings from 
using xsl:import, xsl:include, xsl:call-template, etc., grows 
exponentially over reporting tools that generate 
must-be-maintained-individually reports.


So I personally would be more inclined to (1) make sure the user really 
needs a report as large as the one they are generating (most people 
won't read 1000-page reports anyway, for example) and, if so, (2) first 
refer the user to a commercial XSL FO processor if they are doing 
something beyond FOP's capabilities, not to a manual WYSIWYG-like 4GL 
report generator.


Glen

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



Re: Error when customizing title fonts etc.

2006-05-13 Thread Glen Mazza

[EMAIL PROTECTED] wrote:



I am using xsltproc and fop 0.92b to generate pdf output from docbook 
sources.
I am trying to customize my section titles by changing the 
section.title.properties attribute-set in my customization layer.


The error message I receive from FOP is:

java.lang.IllegalStateException: Flow 'xsl-region-body' does not map to 
the region-body in page-master 'blank'.  FOP presently does not support 
this.




Question:  Do you get this same error message when you *aren't* trying 
to customize the section titles?  I don't know if this customization is 
a red herring for your problem, because this error message is really 
unrelated to what you are doing.


Also, do you actually have an fo:simple-page-master called 'blank'? Look 
at the output FO document, before it is fed to FOP.


Main problem:  If any of the fo:flows have a flow-name that map to 
something other than xsl-region-body, or if any of the 
fo:static-contents have a flow-name that map to xsl-region-body, then 
this error message will occur.  If this is occurring for you, fix your 
XSLT customization layer so this doesn't happen.


Glen

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



Re: crash

2006-05-13 Thread Glen Mazza

Matthew East wrote:


Hi all, and sorry to bother yet again.

Fop is now working nicely on my home computer. Then I tried to run it on another
pc, with basically the same setup on the same files, with the same version of
java installed, and I get this error:

http://fop.pastebin.com/715978

Any ideas? Please let me know if you require any more information!



It could be that the other pc does not have the proper graphics 
libraries to handle what you are doing.  (I think they call those 
headless PCs[1], but am unsure.)


Otherwise, it may be an internal FOP bug.  Looking at the code, 
ArrayIndexOutOfBoundsException, that indicates that one method is 
sending an invalid array index value (say, position #14 of a 10-cell 
array) to another.  Perhaps best to send the very most minimal FO 
document (with no sensitive data in it) to Bugzilla that reproduces this 
error.


[Note to the FOP team, I would recommend resisting the temptation to 
alter the called method for it to quietly keep running even if an 
invalid index is provided to it.  Nothing good downstream is going to 
happen by requesting cell 14 of a possible 10--it's just going to make 
locating the bug that much harder.  Best to have the caller of this 
method fixed so it doesn't send invalid values to begin with, or will 
otherwise raise an exception if it is provided one by *its* caller.]


Glen

[1] http://marc.theaimsgroup.com/?l=fop-userm=112897587310604w=2

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



Re: Error when customizing title fonts etc.

2006-05-13 Thread Glen Mazza

Matthew East wrote:


Glen Mazza gmazza at apache.org writes:

Main problem:  If any of the fo:flows have a flow-name that map to 
something other than xsl-region-body, or if any of the 
fo:static-contents have a flow-name that map to xsl-region-body, then 
this error message will occur.  If this is occurring for you, fix your 
XSLT customization layer so this doesn't happen.



It might not be precisely on-topic for this list, but I didn't get a response to
it on docbook.apps, so maybe you can help.



Open-source requires more detective work on the part of the person 
having the problem.



When I set double.sided to 1 with docbook-xsl-1.69.1, I get this region-body
error. Otherwise, I don't get it, and I didn't get it with version 1.68 either.



OK.  Again, look at the flow-name property[1] (attributes) on each of 
the fo:flows and fo:static-contents within the 1.68-generated FO file 
(not the output PDF, this is before you process the file with FOP), and 
do the same with the 1.69.1.  If you have the problem mentioned at the 
top with the latter stylesheets but not the former, then you probably 
have a Docbook bug, to be recorded here[2].


[1] http://www.w3.org/TR/2001/REC-xsl-20011015/slice6.html#fo_flow
[2] http://sourceforge.net/tracker/?group_id=21935atid=373747

Glen

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



Re: fox:outline to fo:bookmark-tree help

2006-05-11 Thread Glen Mazza

Geldersma, Matt (AGRN) wrote:



But when I try to use it I get this error
org.apache.fop.fo.ValidationExceltion:  Error(unknown location): For
fo:root,  fo:layout-master-set must be declared before fo:bookmark tree.



In this case, either you declared an fo:bookmark-tree before the 
fo:layout-master-set, or you forgot to declare an fo:l-m-s, which you 
*must* have for an fo:root.


Look at the content model of fo:root[1]:

(layout-master-set,declarations?,bookmark-tree?,(page-sequence|page-sequence-wrapper)+)

This says that fo:root must have as immediate children/descendants, 
***IN THIS ORDER***:


1.) one l-m-s
2.) an optional declarations
3.) an optional bookmark tree
4.) at least one of a series of page-sequences and page-sequence-wrappers.

(Ignore for the moment fo:page-sequence-wrapper, that's a 1.1 construct 
FOP doesn't have).


[1] http://www.w3.org/TR/xsl11/#fo_root




I try adding fo:layout-master-set and then I get an error saying
fo-bookmark-tree is not a valid child of fo:layout-master-set. What am I
doing wrong?  This is my first attempt at working with FOP so any help
would be appreciated.



Here, you're trying to make an fo:bookmark-tree an immediate child of an 
fo:l-m-s, which is invalid.


The layout master set[2] may have either of these two FO's as children ONLY:
(simple-page-master|page-sequence-master)+

[2] 
http://www.w3.org/TR/2001/REC-xsl-20011015/slice6.html#fo_layout-master-set


The thing to keep in mind was that fox:outline construct was not created 
in the spirit of the XSL recommendation, where each fo: has a defined 
location in which it is valid, because fox:outline was allowed to be 
placed anywhere.  fo:bookmark-tree, OTOH, may be placed in only one 
location as defined above.


Make sure your fo: follows the content model of the 1.0 specification, 
with the exception of fo:bookmark-tree, which follows the 1.1 spec.  FOP 
0.92 enforces it.


Glen

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



Re: Extending fox:outline

2006-05-04 Thread Glen Mazza

Vijay Yellapragada wrote:


The current problem I am trying to solve is the following :-

I am trying to generate subsections numbers in my final PDF document. So I have 
chosen a scheme where each h? tag in html maps to a corresponding section 
level. For eg :


h2 - 1
h3 - 1.1
h4 - 1.1.1 etc

My XSLT transforms the 'h' tag to FOP 'fox:outline' with an appropriate 
subsection number based on its depth in the html document. 



This will not work by the time you're ready for FOP 0.92, because 
fox:outline has been replaced with the XSL 1.1 equivalents fo:bookmark, 
fo:bookmark-tree, etc.[1], and the content model (location where 
fo:bookmarks can be placed) for XSL 1.1 is being enforced, i.e., 
fo:bookmark tree is a direct descendant of fo:root only.


[1] http://www.w3.org/TR/xsl11/#d0e14222


I noticed that inorder for me to get a tree structure of bookmarks, I need to 
have nested fox:outline, however this gets overly complex because the 'h' 
tags are not inherently nested.


If you can use 0.92, I think you just need to go to the Mulberry List to 
determine what XSLT to use to get the nesting that you desire.


Glen

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



Re: Java Result: 2 Why?

2006-05-04 Thread Glen Mazza

David wrote:


Dear members,
 
I am getting problmes when getting generating the PDF file from using 
FOP. I am using DocBook, vía Ant:
 


More detective work seems needed.  Have you tried to create the 
absolutely most minimal Docbook document possible, to see if the error 
still occurs?  This would help determine if the problem is in the text 
(in which case, you can slowly zoom in on the problematic XML by adding 
more of your original text in) or your Docbook setup.


Also, I think there is a fop.extensions parameter[1] that needs to be 
set for Docbook when you are using our processor.  The Docbook-Apps 
mailing list may be able to help you more on this topic, unless someone 
else here also knows.


Glen

[1] http://www.sagehill.net/docbookxsl/InstallingAnFO.html#InstallFop

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



Re: Height of region-after

2006-04-17 Thread Glen Mazza
I wonder if what he actually wants to use are footnotes.  Won't those 
grow in the manner that he desires?


Glen


Jeremias Maerki wrote:

Chapter 6.4.15 (region-after) in XSL 1.0 says:

The block-progression-dimension of the region-viewport-area is
determined by the extent trait on the fo:region-after formatting object.

That means that the height of the region-after must be fixed and is
given by the extent property. So, there's no way that the region-after
can grow dynamically based on its content.

What you can do however, is render the content for the region-after as
part of the flow and measure its height. You can do that by rendering to
the area tree XML (-at on the command-line) and inspect the generated
XML file. I don't think that will work satisfyingly with 0.20.5. You
would have to upgrade to the latest version for that. Once you have the
dynamic height you can use that value in a second run in the extent
property of region-after. Not a very convenient approach but it can work.

On 17.04.2006 10:47:23 Guenter Bertels wrote:


hallo,

i use fop 0.20.5

and i want that the height of the region-after is dynamic.

I definde the region in this way.
fo:region-after extent=0.5cm overflow=auto/

I dont know exactly how much content came into the footer

Is ther any way to fit the height of the footer to the content?

Sorry for my bad english, i hope you understand what i want.





Jeremias Maerki


-
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]



[Fwd: [docbook-apps] FOP 0.91 : trying to remove a non-trailing word space]

2006-04-06 Thread Glen Mazza

Hello FOP Team,

This is from the Docbook-Apps list.  I think there is a stray debugging 
comment in the 0.91 version that can probably be removed--it seems 
unrelated to anything wrong that the user might be doing, but rather 
just a debugging note added in during algorithm development.  See below.


Thanks,
Glen

 Original message 
Subject: [docbook-apps] FOP 0.91 : trying to remove a non-trailing word 
space

Date: Wed, 05 Apr 2006 13:24:21 +0900
From: Michael(tm) Smith [EMAIL PROTECTED]
To: docbook-apps@lists.oasis-open.org

Has anyone else observed the following message when generating
PDFs from FOP 0.91? -

  trying to remove a non-trailing word space

Any idea what kind of problem (if any) it indicates? Any clues on
how to avoid it and/or how to suppress the message? It seems to
just be a notification. But it appears even when FOP is run with
the -q (quiet) option.

  --Mike

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



Re: Java/POJO based FOP transformation (instead of XSL) like in JasperReports

2006-03-16 Thread Glen Mazza
The SAX processing model (instead of constructing DOM trees to 
subsequently feed FOP) would probably be much faster for you.  No JSP 
needed for this.  I would take a look at Jeremias' ExampleObj2PDF[1] and 
corresponding model[2] to get an idea of the process.  I've been using 
this method at work for some time now and it has been working quite well 
for me.


Glen

[1] 
http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/trunk/examples/embedding/java/embedding/ExampleObj2PDF.java?rev=332791view=markup


[2]
http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/trunk/examples/embedding/java/embedding/model/


Geoffrey De Smet wrote:


I've worked with both FOP and JasperReports
and I really prefer the FO format over jasperreport's custom format.
But Jasperreports allows to use Java/POJO based transformations, so I am 
wondering if this is possible in FOP.


Basically the idea is to replace:
- generate XML based on POJO
- transform XML with XSL to FO
- feed FOP the FO
with
- supply POJO to JSP without http which generates FO
- feed FOP the FO

Does anyone know an (open source?) library which can do something like:

class Person {
  private String firstName;
  private String lastName;
  // getters and setters
}

...
jspWithoutHttp:valueObject name=personList 
class=java.util.ListPerson/

...
% for (Person person : personList) { %
  fo:block
%= person.getFirstName%
  /fo:block
  fo:block
%= person.getLastName%
  /fo:block
% } %
...

This should be usable in fat clients, webclients, ...: it is not bound 
to the HTTP protocol.





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



Re: NPE

2006-03-07 Thread Glen Mazza

Andreas L Delmelle wrote:


In the latter case, however:

fo:instream-foreign-object
  svg:svg ...
  ...
  /svg:svg
/fo:instream-foreign-object

Note that the i-f-o now contains two text nodes (= #PCDATA):  
'#x0A;#x20;#x20;' and '#xA0;'




I think they call that insignificant white space, and that would not 
be counted as PCDATA.  Partly explained here, but not definitive either way:


http://www.w3.org/TR/REC-xml/#sec-white-space

Also, this old email[1], which included the above link, has an 
interesting quote of how to interpret whitepace:


Whitespace verifies as #PCDATA if #PCDATA is allowed at a particular 
point.  If #PCDATA is NOT allowed at a particular point, the whitespace 
is ignored for the purposes of verifying.


[1] http://lists.xml.org/archives/xml-dev/199806/msg00386.html

But I'm far from an expert on this stuff.

This means we have a choice to either test every one of those  
characters, or let the 'error' slip through, possibly with a warning.  
Depending on the context, I can imagine users not being very happy if  
FOP were to be unconditionally strict here... [suppose i-f-o is on  one 
of the last pages of a 250 page document :-/]




I don't think that whitespace-only nodes are being created by FOP 
anyway, if the whitespace just exists between two consecutive opening 
tags.  So this problem may not be occuring for the user as it is.


soapboxBut it is a common misperception[2] that strict validation is 
mean and cold-hearted, when in fact is it saves people from submitting 
erroneously built documents/invoices.  Just a warning means that the 
user is required to scroll through the log output of every document 
generation, just to make sure that the document FOP produced is valid, 
and if they fail to do that, then they may submit an incorrect document 
or invoice.  For every hacker irritated by strict validation, two or 
three are probably saved by it--especially billing invoices, where you 
almost certainly would want to halt if you had an XSLT error which would 
otherwise cause an invalid invoice to be created./soapbox


Thankfully FOP has both a strict and non-strict version to suit either 
preference.  Human nature being what it is though, most who clamor for 
the latter, as soon as it is provided to them, start using the former 
anyway.


Glen

[2] http://marc.theaimsgroup.com/?l=fop-devm=111365780207108w=2


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



Re: 0.20.3 to 0.91b migration log messages

2006-02-28 Thread Glen Mazza

[EMAIL PROTECTED] wrote:



10:01:48,302 WARN  [FONode] Warning(Unknown location): fo:table-column, 
In the separate border model (border-collapse=separate), borders 
cannot be specified on a fo:table-column, but a non-zero value for 
border was found. The border will be ignored.


I don't like this phrasing.  One can place (specify) any property on any 
FO.  (See first sentence of Chapter 5.[1])  I wonder if the FOP 
developer who did this is mistaking FO Tree properties (where the users 
can set whatever properties they want) with area traits (in which 
certain traits will indeed be ignored or set to zero, as per the spec.)


 WARN  [FONode] Warning(Unknown location): fo:table-row, fo:table-row
 does not have padding (see the property list for fo:table-row in XSL
 1.0), but a non-zero value for padding was found. The padding will be
 ignored.
 Solution:  Remove superfluous row padding.

This is a much better phrasing.  It states a fact (this property will be 
ignored) while not incorrectly stating that the user *cannot* set this 
property.


Glen

[1] http://www.w3.org/TR/xsl11/#refinement


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



Re: porblem running new fop-0.91

2006-02-16 Thread Glen Mazza

Jeremias Maerki wrote:


Actually, this message refers to the fo:region-before element in the
single-page-master. The specification dictates that border and/or padding
must not be specified on a region-before which seems to be the case in
your example. 


Well, technically you can specify any property on any formatting object:

For 1.1, First sentence of chapter #5 here: 
http://www.w3.org/TR/xsl11/#refinement


For 1.0, Search on Although every formatting property:
http://www.w3.org/TR/2001/REC-xsl-20011015/slice1.html#section-N639-Processing-a-Stylesheet


Specifically, I have an example tha comes with StyluStudio thate creates a 
catalog with text pictures. Using the new fop, I get this error:
(Location of error unknown)org.apache.fop.fo.expr.PropertyException: Border and padding 
for region xsl-region-before must be '0' (See 6.4.13 in XSL 1.0).



The specification is unfortunately vague here by which value it is 
referring to that must be zero, but I would be inclined to think 6.4.13 
means the *computed value* or *actual value* must be zero, not the 
(user-)specified value.  If so, they would be welcome to put anything 
they want there.  Even the spec, in 5.1.2 computed values, mentions 
properties being forced to be set to 0pt regardless of the specified 
value.  Perhaps it would be better to just have this as a warning in 
both the strictly validating and relaxed validation versions.


http://www.w3.org/TR/2001/REC-xsl-20011015/slice5.html#speccomact

Glen

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



Re: The id x already exists in this document - Headers and Footers

2006-02-06 Thread Glen Mazza

Marcel Hoffmann wrote:


Hi,
I have a problme with the id already exists issue that has - to my
knowledge - not been discussed in this group.

The fo file I use carries a fo:wrapper node in the header section. The
wrapper node appears only once. Nevertheless FOP is not able to process
the fo file and returns the following error code.
   


ID's must be unique for the entire XSL document, not just for a class of 
formatting objects.



[ERROR] file:/E:/chiron/batchprotest/test4.fo:2:2947 The id
Produktname already exists in this document

Does anyone know a solution for this that can be emplyed before the
release of FOP 1.0
 


Ensure unique ID's for all formatting objects.  Is there a reason why 
that is not possible here?


Glen


M. Hoffmann

-
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]



Best way to adjust spacing between rows in an fo:table?

2006-01-22 Thread Glen Mazza

Hello,

I'm using FOP 0.20.5 and I would like to adjust the vertical spacing 
between rows in the fo:table-body/ of an fo:table/, but am having 
trouble doing so.  (The rows contain text only and currently are too 
close together.)


What is the preferred property (padding/space -before, -after?) to use 
for doing this, and on which FO element is it best for it to go on (the 
fo:blocks within the fo:table-cells, fo:table-cells, fo:table-rows, 
etc.)?  I would prefer a property that I can just place on the 
fo:table-body/ and have it inherit, but that is not a requirement in 
case 0.20.5 won't support it.


Thanks,
Glen


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



Re: Best way to adjust spacing between rows in an fo:table?

2006-01-22 Thread Glen Mazza

Clay Leeds wrote:


I always used either the padding-bottom attribute on fo:table-row, or  
margin-bottom on fo:block. I occasionally had problems w fo:table-row  
padding attributes, in which case I would apply padding-bottom to the  
fo:table-cell element.




Thanks, that did it!  (padding-bottom on fo:table-row didn't work for me 
either though, but I just needed to place it on the first fo:table-cell 
in the row instead for it to work throughout the row.)


Glen


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



Re: no runtime java--how to install

2006-01-21 Thread Glen Mazza

Paul Tremblay wrote:


I am trying to run fop from a CD (or other removable device). I am at
a different place every day and at a different computer. At some of
the places java is installed, so I can run fop no problem.



I'm assuming you're running fop by calling fop.bat.


However, at other places there is no java runtime. So is it possible
to to install the java runtime on a removable device such as a CD? 
I want to do with java what I do with python, put the executables on a
removable device and then sat the path to these executables. 



I *think* so, although I haven't tried it.  I would install (expand) the 
J2SDK (or JRE) on your computer's hard drive, then move the entire 
expanded directory to the CD that will have FOP on it.


Next, modify FOP's fop.bat (located in FOP's root directory); the line 
at the bottom that says java -CP %LOCALCLASSPATH%...; switch it to 
..\jd2sdk\jre\bin\java -CP... or whereever the java.exe will be on the 
CD.  Make sure you use a relative path (..\.., etc.) instead of 
hardcoding the drive letter because that will probably change from 
machine to machine.


Glen

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



Re: Dynamic charts issues in batch PDF generation

2006-01-20 Thread Glen Mazza

Clay Leeds wrote:

On Jan 20, 2006, at 6:28 AM, Jeroen van der Vegt wrote:

I'm not sure I correctly understand the problem anymore, but this 
might be relevant:


Can't you let the JPEG servlet indicate that its output should not be 
cached? I use this code to disable various cache mechanism:


   private void setNoCache(HttpServletResponse resp) {
   resp.setHeader(Pragma,No-Cache);
   resp.setHeader(Cache-Control,no-Cache);
   resp.setDateHeader(Expires, 0 );
   }

Regards,

Jeroen



I understood the OP (pasted at the bottom of this msg) to mean there is 
a caching problem with the JPEG image of each chart.




Are you sure?  The proxy/client is getting only a PDF document (MIME 
type application/pdf), no JPEGs.  The JPEGs are incorporated within the 
PDF documents.  Nothing is sent to the proxy/client until the PDF 
document is finished (would have to be, if only to solve the Page 1 of 
XXX resolution issues.)  I would think the proxy/client would be 
completely oblivious to the fact that the PDF contains JPEGs within it 
when it receives the application/pdf stream.


No problem whatsoever with the rest of what you're saying, just this 
premise.


Glen

My previous post supported Jeremias 'simple' fix whereby each chart be 
given a different URI (PATH, name, etc.)--even if the difference is just 
'dummy' text. I still believe this is the case.


While you can set special caching parameters on the server end (such as 
described by Jeroen above), unless there is a change in the 
URI/PATH/Filename, there are other places where the file might be cached 
(thereby negating any 'NEVER CACHE THIS RESOURCE' settings).


I attended a talk by Michael Radwin, Senior Engineering Manager for 
Yahoo, at ApacheCon US 2005 in San Diego[1], entitled 'HTTP Caching and 
Cache-busting for Content Publishers'. Among other things, Y! needs to 
ensure that multiple users at an Internet Cafe checking their mail will 
*never* receive the same content.


On Jan 18, 2006, at 12:32 AM, vijay visu wrote:


i am doing a code which generates the PDF in a batch
process. 


These PDFs include dynamically built charts by
servlets. 
I am making use of external-graphic tag to pick the

images.
These servlets throw jpeg image of the charts in the
output stream.

These servlets should be called for each PDFs
generated since each chart will be unique.
My problem is that the servlets which builds the
dynamic charts are called 
for the first time only. On the subsequent calls the
old charts are 
only built in PDF and the servlets are not getting

called.

Please help me out in this problem



[1] (click on 'Cache-busting techniques' at the bottom of the navigation)
http://public.yahoo.com/~radwin/talks/http-caching-apachecon2005.htm




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



Re: Dynamic charts issues in batch PDF generation

2006-01-19 Thread Glen Mazza

Jeremias Maerki wrote:


On 18.01.2006 09:44:57 Chris Bowditch wrote:


vijay visu wrote:

snip/


These servlets should be called for each PDFs
generated since each chart will be unique.
My problem is that the servlets which builds the
dynamic charts are called 
for the first time only. On the subsequent calls the
old charts are 
only built in PDF and the servlets are not getting

called.




snip/



Or you need to simply make sure that the URLs are unique. You can use a
dummy parameter in the URL to fake uniqueness:

http://localhost/MyChartServlet?dummy=1234



Hmmm...my guess is that for any servlet-related problem for which a 
dummy parameter to fake uniqueness would solve it, that the servlet 
itself can be rewritten to fix the problem instead.  (In this case, have 
it coded to regenerate the image for every call, with no dummy parameter 
needed.)  If I'm correct, I would refer the questioner to the Sun 
Servlet forum for more assistance.


Glen


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



Re: Dynamic charts issues in batch PDF generation

2006-01-19 Thread Glen Mazza

Clay Leeds escribió:

On Jan 19, 2006, at 10:30 AM, Glen Mazza wrote:


Jeremias Maerki wrote:


Or you need to simply make sure that the URLs are unique. You can  use a
dummy parameter in the URL to fake uniqueness:
http://localhost/MyChartServlet?dummy=1234



Hmmm...my guess is that for any servlet-related problem for which a  
dummy parameter to fake uniqueness would solve it, that the  servlet 
itself can be rewritten to fix the problem instead.  (In  this case, 
have it coded to regenerate the image for every call,  with no dummy 
parameter needed.)  If I'm correct, I would refer the  questioner to 
the Sun Servlet forum for more assistance.


Glen



In my experience (mainly coming from a background where the user- agent 
tends to be a web browser), if you call the same thing twice,  there are 
a number of places where the object being served can be  'cached':

- server
- proxy
- client



Oh.  My interpretation of the problem was that a different PDF document 
*was* indeed being returned each time, but that the charts within the 
PDF document were incorrectly not being regenerated to account for the 
new data specific to each document.  If my assumption was the case, that 
would tend to rule out caching at the client or the proxy, because AFAIK 
they would just have a PDF document to cache (not inner parts, such a 
graphics within the PDF).


But if it is the case that the *same* PDF document is being sent each 
time to the browser, then yes, the caching may be at the client or 
proxy-level, and the URL modifying may be necessary.


Glen

In some cases, the server itself also might have some sort of  'caching' 
system as well, which is external to the server.


If someone is calling a cacheable resource, I've found it safest to  
somehow modify the name (even slightly) to ensure there's no caching  
involved. IMO, this alleviates the potential of cacheability (making  
words up can be fun!).


Web Maestro Clay

-
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]



Re: problem with FOP 0.91.beta and gif images

2006-01-10 Thread Glen Mazza

Jeremias Maerki wrote:


If I'm thinking about it, it is probably a bad idea to use the XML file
as base URL source when a stylesheet is used. Normally, you'd place the
resources for a stylesheet relative to the stylesheet, not the source
XML file. fop-devs, what do you think? It would be easy to fix. On the
other side, 0.20.5 seems to do the same (see
Options.setCommandLineOptions).



Hmmm...that's a good point, it depends on the scenario.  If the graphics 
are common for all generations using that stylesheet (say, a graphical 
masthead of a newsletter), your suggestion makes the most amount of sense.


But imagine a stylesheet used to print a one page biography for an 
arbitrary person, and that the stylesheet displays a photo.gif picture 
of the person in a certain area.  I could imagine each person for which 
we would want to use the stylesheet having his own directory with a 
bio.xml and photo.gif. Then, the stylesheet would use the specific 
photo.gif in the directory where the specified bio.xml file is.


Perhaps an option allowing for either scenario would be best.

Glen


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



Re: OT: How to send report directly to the printer.. Sorry thought it was obvious but haven't found... please give a clue :-)

2006-01-10 Thread Glen Mazza

David Gagnon wrote:


Hi all,

 I have a web application with a background thread that check for a 
condition and then this condition is meet needs to generates a report 
with fop and send it directly to a  printer.


snip/



Any help, or code example will be appreciated ..


http://www.javaworld.com/javaworld/jw-03-2005/jw-0328-xmlprinting.html?

Glen

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



Re: Embedding PDF documents?

2006-01-06 Thread Glen Mazza

David Elliot wrote:


Hi Glen,

Sure that makes sense, FOP looks to be conceived as an Apache strength
XSL-FO - PDF formatting utility/library that implements W3C's XSL-FO
standard - the end result being a library which task specific
applications can then confidently leverage.  Although, currently FOP
supports a variety of input formats - notionally image/graphic data
(BMP, EPS, GIF, JPEG, PNG, SVG or TIFF) - for inclusion during a
render.  Did this list of supported data formats evolve via
contribution, or is it strictly specified by standard ?

Many thanks,
David

 



I think we're talking two different things.  FOP's input is still an XML 
document in the XSL namespace, those types above are graphics 
incorporated via fo:external-graphic or fo:instream-foreign-object.  You 
would apparently like a new extension element then, possibly under 
fo:instream-foreign-object, that will allow for incorporating a PDF 
document.


PDF is not a graphic though.  It is an output type, a document--so I 
guess you would need to write a parser for FOP to be able to translate 
the PDF document into XSL-namespace events that can subsequently be 
rendered on FOP's standard output types--PDF, PS, AWT, RTF, etc.  That 
is out of scope for FOP.  But if someone wanted it to contribute it to 
FOP, I would defer that to the rest of the team (I haven't been coding 
for awhile), but it would need to be pretty robust and solid -- not just 
a partly working system that will fill up the Bugzilla list with errors 
from people trying to use FOP just to concatenate PDF documents, or to 
convert PDF documents into other output formats.  (Then again, that's 
how open source works...  ;-)


Also, AFAICT the W3C XSL Working Group does not allow for embedding XSL 
documents within other XSL documents (i.e, placing an fo:root within an 
fo:root).  Whatever their philosophical concerns are about such 
embedding may also be relevant for embedding PDF documents here.


Glen



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



Re: How to pass input of xml tranfs. to xslt transf. ?

2005-12-07 Thread Glen Mazza

Don't use XSLTInputHandler.  Use JAXP[1] instead.

Glen

[1] http://xmlgraphics.apache.org/fop/0.20.5/embedding.html#examples

[EMAIL PROTECTED] wrote:


Hello,

I struggling to create a webapps that creates pdf's for xml documents. The
problem is: I can't pipe the output of my SAX transformation to the 
XSLTInputHandler. 


My code uses a static xsl document and dynamic xml documents. For
demonstration purposes I create the xml file on the local filesystem but
that'S not very good for my webapplication :o/

Here the code:

File xmlfile = new File(session.getServletContext().getRealPath(/xml/),
nbw.xml);
OutputStream out = new java.io.FileOutputStream(xmlfile);
StreamResult streamResult = new StreamResult(out);
SAXTransformerFactory tf = (SAXTransformerFactory)
SAXTransformerFactory.newInstance();
TransformerHandler hd = tf.newTransformerHandler();
Transformer serializer = hd.getTransformer();
serializer.setOutputProperty(OutputKeys.ENCODING, ISO-8859-1);
serializer.setOutputProperty(OutputKeys.INDENT, yes);
hd.setResult(streamResult);

//Custom transformation with SAX
XmlTransformer xmlt = new XmlTransformer(hd);
String xslParam = session.getServletContext().getRealPath(/xml/nbw.xsl);
String xmlParam = session.getServletContext().getRealPath(/xml/nbw.xml);

File xmlFile = new File(xmlParam);

//XSLT Transformation
XSLTInputHandler input = 
new XSLTInputHandler(xmlFile, new File((xslParam)));


renderXML(input, response);



cheers,
Pete

 





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



Re: Apache Question

2005-12-06 Thread Glen Mazza
No, FOP doesn't need Apache HTTP Server to run.  FOP is a Java program, 
while the HTTP Server is in C (or C++) anyway.


FOP needs just a Java Runtime Environment and the JARs kept in the FOP 
lib directory that comes with its download.


Glen

Charles Murphy wrote:

I have successfully installed and run FoP 0.20.5 on systems which already
had an installed OS and Apache 2.X. FoP runs fine with the Apache HTTP
server turned off. Before going through a clean install or removal of Apache
HTTP server, I was wondering if there were any shared library or other
requirements which require the install of Apache for FoP to run.

thanks in advance
Charley Murphy 





-
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]



Re: Page Sequences

2005-12-05 Thread Glen Mazza


Clifton Craig wrote:

I'm writing a report transform usinf XSLT for XSL-FO and I have some basic 
questions. What's the best way to code for multiple page sequences. For 
example I have some static content that I like to keep in the header and 
footers and I guess it doesn't matter but I'd like to reuse chunks of XML-FO 
for that purpose rather than replicating it to the result tree. 


I may be misunderstanding your question, but it seems like you just need 
one fo:page-sequence, with predefined fo:static-contents for the header 
and footer (fo:static-contents will get automatically printed on each 
page.)  Next, put all the content that will be placed on each page in 
the one fo:flow for the fo:page-sequence.




Now from within that template I want to start new page sequences and spit out 
the following using a new-page XSLT-template:




The page handling is done by FOP -- you won't know the number of pages 
needed, that is done by FOP's layout process.




What bothers me even more is since I'm 
programmatically controlling new pages is there a better way to handle this 
type of processing? Right now it looks like I'll have to keep a line count in 
my stylesheet to detect when I should programmatically start new pages. Is 
there a better way? How do most people do multipage reports with variable 
data? Iss everybody line counting in there stylesheets? 


I don't think anybody does that.  Place all your content (except for the 
header and footer) in the single fo:flow of the fo:page-sequence, and 
that should work.


Glen

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



Re: Page Sequences

2005-12-05 Thread Glen Mazza

David Frankson wrote:


However, if you were to
take the latest source and put it into a 20.5.1, we'd probably
enthusiastically take it, and it might solve a lot of the
performance/memory issues that are posted to the list.



No doubt.  But 0.90alpha1 will be getting better.  Very few if any 
committers really understand 0.20.5 anymore, the committers who worked 
on it are mostly gone today.


Glen

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



Re: Fw: Using Docbook stylesheets in FOP

2005-12-04 Thread Glen Mazza

Simon Pepping wrote:



Another issue I have with FOP and Docbook is that FOP out of the box
does not use catalogs. 


ignorance/ I'm unsure what you mean by catalogs.


I think we should do something about this. It
is unrealistic to expect Docbook users to write their own startup Java
file. They want something that works from the command line. 


With my job, we use Ant build scripts for online PDF and HTML help 
sites.  Our technical writer rather easily works with the build.xml, 
understands its contents pretty well and knows how to modify it when 
needed.  (She uses JEdit for editing the XML and to activate the build 
scripts, but I have been thinking of having her try Eclipse because it 
has better CVS functionality.)


IMHO document publishing has too many moving parts to remember 
everything on the command-line.  Also, there are many aspects common 
(CSS stylesheets, FOP customization layer overrides, etc.) for 
publishing multiple documents that can be factored out and shared in the 
build script.  As a bonus, Ant can also take care of other portions of 
the publishing pipeline, such as FTP'ing the results to the website when 
everything is done.


Glen

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



Re: Long Table repeat header

2005-11-22 Thread Glen Mazza
There's a nice new critter in XSL 1.1, fo:retrieve-table-marker[1][2], 
that appears to be the legal way of doing what is wanted here.  But 
that will need to wait for implementation in the new version.


Glen

[1] http://www.w3.org/TR/xsl11/#fo_retrieve-table-marker
[2] http://www.w3.org/TR/xsl11/#d0e14560


Jeremias Maerki wrote:

static-content is usually layed out after the region-body. Only after a
region-body is fully processed do you know which elements are on the
page and therefore which markers apply. Since markers can contain
content of variable height, different content would have an influence on
the layout in the region-body and could then trigger a relayout of the
region-body, possibly causing changes in active markers etc. etc. The
worst case is an infinite loop. :-)

On 22.11.2005 21:44:01 Sascha Schmidt wrote:


I wonder, why fo:retrieve-marker is restricted to static content and not
allowed in the flow. Does anybody has an explanation?




Jeremias Maerki


-
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]



Re: XSL Question

2005-11-21 Thread Glen Mazza

http://www-128.ibm.com/developerworks/library/x-xslfo2app/#b?

Read the Notice that the select attribute... blurb at the end of the 
b discussion here.


Glen

Dirk Bromberg wrote:

Hi,

i've a short xml-xsl-fo question.

my xml is:

textHere is some textB with bold B/Iand italicI/BI and 
bothI/B/ elements in it.text/


when i've a template for text, B and I how can i get the real text 
in the right order?




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



Re: generated pdf page is in iso-8859-1

2005-11-16 Thread Glen Mazza
What happens when you open the PDF file with Adobe Acrobat directly, and 
not using the browser?  Are you getting the same result opening the PDF 
with both IE and Firefox?


Is this just an annoying message, or is a corrupted/unusable PDF returned?

It very well could be, but I was unaware that the encoding in the source 
FO file somehow makes its way to the PDF document.  If the PDF is being 
returned from a web app, my suspicion is that a wrong response header 
value is being sent to the browser.


Glen

Myriam Delperier wrote:

hi,
i've got a .fo file like this
?xml version=1.0 encoding=UTF-8?
fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;

/fo:root

I transform it in pdf with fop and myweb browser tells me the encoding 
is iso-8859-1 but for some url links reasons,

I need the file to be in utf-8.

is there something I can do ?

-
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]



Re: Compiled FOP versions

2005-11-16 Thread Glen Mazza
Without servlets and JSPs, what will your provider allow you use to 
execute programs on the server--ASP, PHP, or cgi?  A pure HTTP server 
will not be able to activate programs, regardless of what you can 
compile FOP into.  Is the provider using IIS or Apache as the web server?


My thinking, along with Jeremias', is that it would be probably best to 
somehow distribute/install the Java VM with your application.  The JVM 
is, after all, already compiled into an executable that the server can 
run.  I can't see the reason why you would not be allowed to run the JVM 
executable but you would be allowed to run another compiled executable 
instead (what you are trying to do to FOP)--they would both be programs 
running on the server.


Glen

Manuel Strehl wrote:

Hi there.

I didn't find any post in the last months concerning my point. If it was 
discussed earlier, I'd like to apologize.


My Problem: My provider doesn't offer a Java VM on the servers. So I'm 
looking for another possibility to run FOP. I found out (at Wikipedia) 
that you can compile Java written programs to machine code (e.g., with 
the Gnu CJ). Well, actually I'm still using Windows and I have no clue 
where to compile it for Linux.


I am looking for:
- already compiled versions of FOP (for Linux; SuSe, I think)
- any tips or hints how I could use FOP on a server without having a 
Java VM.


Does anyone have an idea?

Best Regards
Manuel

-
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]



Re: Running FOP using shell command yields Permission Problems

2005-11-14 Thread Glen Mazza

Sash Wiener wrote:



Hi,
 
Running FOP Successfully for years on Windows servers using Shell 
Command to execute from client side ie.
 
shell(fopString)
 
However according to hosting company the new security updates in Windows 
Server 2005 are causing this error message.
 


To better isolate the problem, I would create a simple.bat file that 
just has this command:  dir.  Then try to run simple.bat instead of 
fopString.  If you get a directory listing, we know the problem is with 
fopString; but if simple.bat fails with the same security error, then 
this is a Microsoft security question best asked on one of their mailing 
lists.


Glen

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



Re: FOP PDF content height calculations

2005-11-02 Thread Glen Mazza

Rachel C. Rusinski wrote:



I need FOP to render a dummy PDF upon save of a question group and return
to me the exact height in inches of that question group.



FOP doesn't do that.  It returns documents as its output.  You may wish 
to send a suggestion to the W3C's XSL Editors list to have the XSL 
recommendation expanded to support that functionality.  Or, look at 
commercial alternatives.


Glen


Thank You,
Rachel Rusinski
Human Resources Systems Development
Global IT Solutions - Global Customer Solutions
Ext. 4-6571



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



Re: Convert HTML to PostScript or PDF

2005-11-01 Thread Glen Mazza

This article may be of help:
http://www-128.ibm.com/developerworks/library/x-xslfo2app/

Glen

Jimmy Dixon wrote:
no - you would need to have your HTML in XHTML format so you can convert 
it to XSL-FO using XSLT, FOP can then be used to convert XSL-FO to PDF 
or (I think) Postscript.


Leon Pu wrote:


Hi all,

is it possible to use FOP to convert a HTML file to PostScript or PDF?


Best regards,
Leon



   
__ Yahoo! Mail - PC Magazine Editors' 
Choice 2005 http://mail.yahoo.com


-
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]



Re: Convert HTML to PostScript or PDF

2005-11-01 Thread Glen Mazza
Yes, that is standard--Docbook does that (maintains two separate 
stylesheets for HTML and FO.)


Glen

[EMAIL PROTECTED] escribió:
Your best bet is to use XSLT to go from your source XML to XSL:FO and skip 
trying to convert HTML into XSL:FO.


Jay Bryant
Bryant Communication Services
(presently consulting at Synergistic Solution Technologies)




Leon Pu [EMAIL PROTECTED] 
11/01/2005 11:08 AM

Please respond to
fop-users@xmlgraphics.apache.org


To
fop-users@xmlgraphics.apache.org
cc

Subject
Re: Convert HTML to PostScript or PDF






My HTML's source is XML, I use Xalan to transform XML to HTML. Is the
result HTML ok for FOP? Or there is other shortcut to generate
PostScript or PDF from XML directly?

Thanks for your reply.


Best regards,
Leon

--- Glen Mazza [EMAIL PROTECTED] wrote:



This article may be of help:
http://www-128.ibm.com/developerworks/library/x-xslfo2app/

Glen

Jimmy Dixon wrote:


no - you would need to have your HTML in XHTML format so you can


convert 


it to XSL-FO using XSLT, FOP can then be used to convert XSL-FO to


PDF 


or (I think) Postscript.

Leon Pu wrote:



Hi all,

is it possible to use FOP to convert a HTML file to PostScript or


PDF?



Best regards,
Leon




__ Yahoo! Mail - PC Magazine


Editors' 


Choice 2005 http://mail.yahoo.com




-


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]







 
 
__ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com


-
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]




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



Re: Alternating Header/Footer on Odd and Even pages

2005-10-31 Thread Glen Mazza

Ross Nicholls wrote:

 Hi there,

 Maybe this is an easy one, in which case I apologise!
 I have an alternating page sequence that simply switches the left and 
right hand margins (for binding). However, I also need the header (a 2 
cell table placed in xsl-region-before) to be mirrored on alternating 
pages. i.e. The 2 cells consist of a logo image on the left and a 
heading text block on the right. This is correct for Left-hand (Odd) 
pages, but needs to be the other way round for Right-hand pages (Even) - 
so that the logo is always on the outside edge. Does anyone have any 
ideas how to achieve this?


 Thanks in advance for any assistance.

 Ross


Oh, this is a fun problem.  I think you want to define two 
fo:static-contents in the fo:page-sequence, with different 
flow-names--given them the values of region-before-left and 
region-before-right or similar.  Within these two fo:static-contents 
define the different header layouts desired.


Next, create two fo:simple-page-masters, identical in every way except 
they have a different region-name property for the fo:region-before. 
One's region-name is called region-before-left and the other 
region-before-right.


Finally, create an fo:repeatable-page-master-alternatives, with 
different odd-or-even properties, as here[1].  Have the odd one 
reference the fo:s-p-m with a region-body w/region-name of 
region-before-right, and the even one reference the fo:s-p-m with 
region-before-left.


This will result in the fo:static-content with flow-name of r-b-r being 
ignored on even pages (and hence not rendered), and the one with r-b-l 
being ignored on odd ones.  Or something like that.  ;-)


Glen

[1] 
http://svn.apache.org/viewcvs.cgi/xmlgraphics/fop/trunk/examples/fo/pagination/franklin_alt.fo?rev=197515view=markup



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



Re: odd-or-even AND page-position in fo:conditional-page-master-reference

2005-10-28 Thread Glen Mazza

Daniel Brown wrote:

Thank you all for your help. I have an unknown number of page sequences 
which all needed to start with Page 1 so I did the following:


I added the blank-or-not-blank to the conditional-page-master-reference 
and also set the force-page-count=end-on-even  on my page-sequences. 
That did the trick. Now, it will print my new page-seq on the front of 
2-sided pages. If the previous sequence ends on an odd number, it will 
force the additional page (which will tell the conditional will to print 
out the Report_Blank_###).




I guess I'm missing something here.  Since you want each page to start 
on 1, and also to start on the front of the page, it seems like you can 
just set initial-page-number to 1 and force-page-count=end-on-even 
for each fo:page-sequence without all the fo:c-p-m-r's you have below.


Glen




fo:page-sequence-master
   xsl:attribute name=master-nameReport_Layout_xsl:value-of 
select=$report_number //xsl:attribute

   fo:repeatable-page-master-alternatives

fo:conditional-page-master-reference 
page-position=first blank-or-not-blank=not-blank
 xsl:attribute name=master-nameReport_FirstPage_xsl:value-of 
select=$report_number //xsl:attribute

   /fo:conditional-page-master-reference

  fo:conditional-page-master-reference blank-or-not-blank=blank
 xsl:attribute name=master-nameReport_Blank_xsl:value-of 
select=$report_number //xsl:attribute

   /fo:conditional-page-master-reference

fo:conditional-page-master-reference page-position=rest
   xsl:attribute 
name=master-nameReport_OtherPages_xsl:value-of 
select=$report_number //xsl:attribute

   /fo:conditional-page-master-reference

/fo:repeatable-page-master-alternatives
/fo:page-sequence-master

 
*Glen Mazza [EMAIL PROTECTED]*

10/28/2005 02:35 PM ASTPlease respond [EMAIL PROTECTED]

To   fop-users@xmlgraphics.apache.org
cc  
bcc  
Subject   Re: odd-or-even AND page-position in 
fo:conditional-page-master-reference
 


I think all you need is to set initial-page-number to even on the
fo:page-sequence:
http://www.w3.org/TR/2001/REC-xsl-20011015/slice7.html#initial-page-number

and just use a simple fo:single-page-master-reference instead of fo:c-p-m-r.

Glen

Daniel Brown wrote:
  Shouldn't it be possible to use both the odd-or-even AND the
  page-position within the fo:conditional-page-master-reference? I'm
  finding (0.20.5) that one or the other works but not both. In the case
  of both being entered, it simply takes the first defined.
 
  What I'm trying to do it insert a page sequence which will add a blank
  page before a page which is EVEN numbered. I need to have all my new
  page-sequence start with an ODD page number so that when printed on
  2-sided paper they will always appear on the front of a sheet of paper.
  any ideas??
 
  Regards,
  
Daniel-


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



Re: RTF output

2005-10-22 Thread Glen Mazza
I wonder if setting the margins on the fo:region-body (instead of the 
fo:external-graphic) would also have solved this.  The example you gave 
 had an empty  fo:region-body/ without dimensions, but you may have 
been just abbreviating the sample by removing those dimensions.


Glen


Tony Morris escribió:
Thanks, by explicitly setting a width and height, the problem 
disappeared - it only occurred for the RTF renderer (though I only tried 
the PDF one as well). The sizes themselves seem to be a tad obscure though.


At 07:32 PM 22/10/2005, Andreas L Delmelle wrote:


On Oct 22, 2005, at 11:12, Tony Morris wrote:

Hi,


I attempt to generate RTF using the Ant task:
fop format=application/rtf fofile=in.fo outfile=out.rtf
force=true/

I receive the following error:
[fop] 22/10/2005 19:04:42 org.apache.fop.fo.properties.EnumLength
getValue
[fop] SEVERE: getValue() called on AUTO length
[fop] 22/10/2005 19:04:42 org.apache.fop.fo.properties.EnumLength
getValue
[fop] SEVERE: getValue() called on AUTO length

Can anyone provide any pointers to what might be the issue?



I'm not absolutely sure, but most likely, this message is caused by
the default values of height/content-height/content-width... on
fo:external-graphic. All these properties default to a value of
auto and somewhere the property is being queried for its value
without checking first whether it has an enum value.

Have you tried different output targets? Same problem? If not, the
cause of this would be somewhere in the RTFRenderer.
To remove these errors, I guess you could try specifying explicit
values for height/content-height etc. It's not ideal, but should
suffice as a workaround until we manage to track down the unchecked
call to getValue().


Greetz,

Andreas


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



--
Tony Morris
http://www.tmorris.net/


-
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]



Re: Problem with fox:outline in FOP Trunk (was: Hello)

2005-10-21 Thread Glen Mazza

Jeremias Maerki wrote:



XSL 1.0, 6.4.19, fo:static-content says:
http://www.w3.org/TR/xsl/slice6.html#fo_static-content

Contents:
(%block;)+

So you must at least have one block as a child for fo:static-content (It
can be empty). The redesigned FOP is much more strict about the
interpretation of the specification.



The reason why XSL is strict about this is to guard against XSLT 
errors--i.e., a erroneously un-activated XSLT template causing your 
fo:static-content element to be empty on (say) page 240, and you not 
knowing that because your XSL processor silently kept running (or just 
giving a warning message among several screens of other output.)  By 
halting, it allows you to go back and fix the template error instead of 
submitting an erroneously built document to someone else.


Glen

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



Re: marking some elements by same @id

2005-10-14 Thread Glen Mazza

Andreas L Delmelle wrote:



(Jay's suggestion just rolled in --I'm not 100% sure, but I think FOP 
will complain if it encounters attributes in the fo: namespace that are 
not properties as defined in the Rec. FOP 0.20.5 may turn out to be 
forgiving... Just to be on the safe side, I'd use a separate namespace.)




Looking at the Rec to determine this, I found two possible problems with 
the current way that the rules are written, and have submitted them to 
the XSL-Editors ML for the working group to look over.[1]


Glen

[1] http://lists.w3.org/Archives/Public/xsl-editors/2005OctDec/

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



Re: getting rid of collapsed border painting warning

2005-10-14 Thread Glen Mazza

Instead of full, make that the simplest...   ;-)

Glen

Jeremias Maerki wrote:


Ok, so now that we know that you're really on FOP Trunk and not FOP
0.20.5 (it's always good to tell what version you're working on!),
please send a full FO sample file that allows us to reproduce your
problem with the warnings.

On 14.10.2005 00:12:40 Daniel Brownell wrote:



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



Re: NullPointerException while trying to run FOP servlet

2005-10-05 Thread Glen Mazza

Jeremias Maerki wrote:


Was there a nested exception further down the stack trace? If not, this
is not enough information for us help you. Please run this document
through FOP from the command-line. This might help you track down the
problem. Maybe it's not even caused by FOP.



If your FO (or XML/XSLT stylesheet) works fine from FOP command-line, 
you may also wish to try using Xerces and Xalan instead of the Oracle 
parsing libraries and see if the problem still occurs.  (Ideally, even 
if there were an error in the input FO, I would think the Oracle 
JXTransformer should be robust enough to not throw an NPE but a 
meaningful error message instead.)


Glen



On 05.10.2005 10:11:12 Mohammed Amin wrote:


I'm trying to instantiate FOP servlet but i got this exception:

java.lang.NullPointerException
at 
oracle.xml.jaxp.JXTransformer.reportXSLException(JXTransformer.java:776)
at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:343)
at 
oracle.xml.jaxp.JXTransformerHandler.endDocument(JXTransformerHandler.java:141)
at 
oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:286)
at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:184)


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



Re: border-bottom not working

2005-10-05 Thread Glen Mazza
IIRC these properties don't work in 0.20.5 at the table-row level.  Try 
placing the properties on each fo:table-cell instead.  If needing to 
duplicate each of these properties on every fo:table-cell becomes overly 
irritating, using XSLT templates to create the fo:table-cells or XSLT 
attribute sets[1] may help somewhat.


[1] http://xml.sys-con.com/read/40601.htm

Glen


Singhal, Ramneek (Exchange) escribió:

Hi All,

I need a table row having some data and a border at the bottom. It
should look like

CAPITAL
-


My fo for the same is 



fo:block
  fo:table table-layout=fixed width=100%
fo:table-column column-width=proportional-column-width(1)/
fo:table-body font-family=Times New Roman font-size=11 font-
weight=bold font-style=italic
  fo:table-row border-bottom-style=solid
border-bottom-color=black border-bottom-width=0.5pt
fo:table-cell
  fo:blockCAPITAL/fo:block
/fo:table-cell
  /fo:table-row
/fo:table-body
  /fo:table
/fo:block

This fo does not generate a border at the bottom of the row. Is there
any problem in the fo



**
Please be aware that, notwithstanding the fact that the person sending
this communication has an address in Bear Stearns' e-mail system, this
person is not an employee, agent or representative of Bear Stearns.
Accordingly, this person has no power or authority to represent, make
any recommendation, solicitation, offer or statements or disclose
information on behalf of or in any way bind Bear Stearns or any of its
affiliates.
**


-
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]



Re: hide header/footer

2005-10-04 Thread Glen Mazza

Prakash R wrote:


Is there a way to hide the header/footer for a
particular page within a page-sequence? I just want to
hide the header/footer for a particular page not the
last or any alternate page. I know there are ways to
do that. But is there a way to hide header/footer for
a random page in between?

Thank you.
Prakash



I'm unsure what you mean by hide--have the fo:region-body occupy the 
space allocated for the fo:region-before and fo:region-after areas, or 
have the fo:region-before and fo:region-after just be blank space, or?


But at any rate, I think what you would like is another fo:page-sequence 
for the page that you want to have no header and footer.  Place it 
between two other fo:page-sequences with the normal fo:static-content 
information.


Glen

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



Re: watermark

2005-10-04 Thread Glen Mazza

Daniel Brown wrote:



How can I create a watermark? I've read the documentation/FAQ about 
watermarks. I need an Image which will fit being the center of the text 
on the page in the body and continue to remain centered on all the 
following pages in that sequence.




I'm not sure of FOP's capabilities in this regard, and the European 
committers who do know are probably counting sheep right now, but 
watermark is highly searchable:


http://marc.theaimsgroup.com/?l=fop-userw=2r=1s=watermarkq=b

Glen

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



Re: more than one fo:flow in fo:page-sequence

2005-09-27 Thread Glen Mazza

Andreas L Delmelle wrote:


Sorry, but I disagree. The content-model of fo:page-sequence is:

(title?,static-content*,flow)



Or maybe you're referring to the XSL-FO 1.1 Rec, which FOP currently 
does not implement.


There indeed, more than one flow may be put inside a page-sequence, and 
mapped to the regions using fo:flow-map...




I think the XSL WG will be increasing the amount of documentation in the 
1.1 WD that describes how multiple flows and flow-maps will work.


Alongside multiple fo:flows, in the 1.1 WD, fo:simple-page-master has 
been expanded to allow multiple fo:region-bodies (although perhaps it 
would have been nicer if they kept fo:s-p-m unchanged and created a new 
fo:page-master that would have this advanced functionality.)  I am 
guessing an fo:flow-map would not really be needed for multiple flows; 
just have one fo:flow refer to one fo:region-body and a second fo:flow 
refer to another fo:region-body within the fo:s-p-m.


The fo:flow-map (again, my guess), is for when you want the contents of 
one fo:flow to flow from one fo:region-body to another within the same 
fo:simple-page-master.  Anyway, this will be fun 1.1 stuff for the FOP 
team and user community.


Glen

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



Re: more than one fo:flow in fo:page-sequence

2005-09-27 Thread Glen Mazza

Matthias Treitler wrote:


Ok, i want to make a head, a body  and a foot part of my site! So i have to 
implement a xsl-region-before, xsl-region-body and xsl-region-after part on 
my site! You understand?!?
But i can only implement a fo:flow flow-name=xsl-region-before or  a 
fo:flow flow-name=xsl-region-body but not both! So what should i do in 
that case?!




(site = Seite = page?)  I don't understand why you just don't use 
fo:static-content for your header and footer.  I guess I'm missing 
something from your problem that Jay is apparently picking up.


Glen

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



open-source eXtremeTable: combined HTML, PDF, and Excel output

2005-06-07 Thread Glen Mazza

FOP community,

Jeff Johnston has developed an open source (Apache License) 
eXtremeTable [1] that combines HTML, PDF (using FOP), and Excel (using 
Jakarta POI) output for the same data.  I have not used it yet, but the 
U.S. Presidents table example [2] on the companion site looks quite 
good, and I am passing this on to the mailing list in case there are 
others in the community who are looking for this type of functionality 
in web applications.  Hopefully this can reduce some wheel 
reinventions.  It is downloadable from the SourceForge site available 
from the first link below.


Regards,
Glen

[1]http://sourceforge.net/projects/extremecomp/
[2]http://extremecomponents.org/extremesite/presidents.run

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



Re: XML2PDF formatting progress

2005-05-28 Thread Glen Mazza
I would think, in order to give a progress indicator, FOP while running 
would need to know where the end of the input is (how else could FOP 
declare itself to be 25% done, 50% done, etc.).  But FOP does not do 
such preprocessing, it processes the data as it gets it (well, starting 
at the end of each fo:page-sequence it finds), without knowledge of the 
number of future fo:page-sequences to be found.  So I don't think FOP 
would ever know itself how much finished it is with its input, and hence 
would not be able to report on it.


Also I believe the two parts you mention are not discrete, but happen 
simultaneously (we use SAX processing internally.)


But in the future 1.0 version (not 0.20.5), you will be able to 
programmatically override the FOEventHander (which signals the start/end 
of most FO's occured while processing), and I think here you would be 
able to set a counter/fire an event for the end of each 
fo:page-sequence as it occurs, before calling the default processing.  
If you were to preprocess the document separately and get a count of 
fo:page-sequences to begin with--you can get a % done that way.  Problem 
is, however, it would be time consuming to run the first part 
mentioned below another time just to get that total count.  Also, 
differing sizes of the fo:page-sequences would make that percentage 
questionable.


Glen


alex wrote:


Hi,

I'm using FOP 0.20.5 embedded in a formatting project, where I have
XML + XSL = FO = PDF. Everything works fine, but I would like to
display a progress bar indicating transformation progress from
XML to XSL-FO (first part) and from XSL-FO to PDF (second part).

I have searched very intensively for a solution, but couldn't find
any way to determine the progress.

Does anyone have an idea on how to approach my problem ?

I thought about modifying the fop source at the point, where the
System.out gets the [INFO] about whats going on, so as to notify
my application thereof. But I haven't found that point yet.
Anyone a suggestion ?

thx for the help
Alex Dima





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



Re: area contents overflows area in line

2005-05-17 Thread Glen Mazza
Luis Cañas wrote:
Hi all,
I'm trying to compile[1] a valid [2] Docbook document (it works fine
with docbook2pdf). But after a while appears this error eternally:
[INFO] area contents overflows area in line
[INFO] area contents overflows area in line
[INFO] area contents overflows area in line

Some weeks ago, one of you suggest me that this error was provoked by
something is too big to fit in its allocated space.
 

But is it really an error though?  How does the output look?  FOP 0.20.5 
is very chatty when you run Docbook, and those are just [INFO] 
statements.  It could be something internally (and erroneously) 
prompting those messages unrelated to your input FO document.

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


Re: Uncommon NoClassDefFoundError exception

2005-05-01 Thread Glen Mazza
Thanks for the information.
Glen
Peter B. West wrote:
Glen Mazza wrote:
(BTW, does anyone know if FOP runs--or runs well--on Gentoo[5]?  That 
distribution is becoming increasingly of interest to me.)

Glen,
An ebuild of fop 0.20.5 is available on gentoo.
Peter

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


Re: Uncommon NoClassDefFoundError exception

2005-04-30 Thread Glen Mazza
Looking at the source file in question[1, line 1520], it is complaining 
that it can't find the (graphics-related) java.awt.Rectangle class.  [2] 
is the Sun error description (indeed, the exception means it can't find 
a class), the bottom of [3] indicates that the problem may be with your 
X Windowing system, but if not, a search on NoClassDefFoundError and 
AWT returns 6000+ hits [4] (add FOP to the search to get down to 140.)

(BTW, does anyone know if FOP runs--or runs well--on Gentoo[5]?  That 
distribution is becoming increasingly of interest to me.)

HTH,
Glen
[1] 
http://cvs.apache.org/viewcvs.cgi/xml-fop/src/org/apache/fop/layout/LineArea.java?annotate=1.53.2.19hideattic=0
[2] 
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/NoClassDefFoundError.html
[3] 
http://www.myjavaserver.com/exec/YKtoYetpKLwzNf2CZvwBFfNjLDwyZnxzT9vB1j3BM1JBPfwBMuwBVHwp0f2y
[4] 
http://www.google.com/search?hl=enlr=q=java.lang.NoClassDefFoundError+awtbtnG=Search
[5] http://www.gentoo.org/

Warren Young wrote:
I'm running the latest released version of FOP on a Fedora Core 3 
system with JDK 1.4.2_08, and am getting a very odd 
NoClassDefFoundError exception.  It isn't the standard one mentioned 
in the FAQ where the program doesn't run at all.  Instead, fop runs 
for about 20 seconds, clearly processing the document (it gives the 
same set of warnings as I see on other systems up to the trouble 
point) and then it says this:

Exception in thread main java.lang.NoClassDefFoundError
at 
org.apache.fop.layout.LineArea.addSpacedWord(LineArea.java:1520)
at org.apache.fop.layout.LineArea.addText(LineArea.java:683)
at org.apache.fop.fo.FOText.addRealText(FOText.java:278)
at org.apache.fop.fo.FOText.addText(FOText.java:252)
at org.apache.fop.fo.FOText.layout(FOText.java:161)
at org.apache.fop.fo.flow.BasicLink.layout(BasicLink.java:178)
at org.apache.fop.fo.FObjMixed.layout(FObjMixed.java:139)
at org.apache.fop.fo.flow.Block.layout(Block.java:257)
at org.apache.fop.fo.flow.Block.layout(Block.java:257)
 etc.

Why would the program be running, and then suddenly fail to find one 
of its classes?

This same version of FOP is working on another of my FC3 systems, but 
there are too many differences between the two systems to easily pin 
any one thing down.

If you want to try processing the document yourself, it's the MySQL++ 
user guide, available in the source tarball here:

http://tangentsoft.net/mysql++/
The command I'm giving is:
/usr/local/fop/fop.sh -q -xml userman.xml -xsl fo.xsl \
userman.pdf
fo.xsl is just a wrapper around the fo/docbook.xsl file that came 
with the system, to set a few local preferences.  Again, this is all 
working on another FC3 system, as well as on a Red Hat Linux 9 
system.  It's something specific to this one machine, and I don't see 
what it is.

-
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]


RE: FOPException: The id N1056F already exists in this document

2005-04-05 Thread Glen Mazza
I don't know about the 0.20.5 code base, but the
upcoming 1.0 code base raises the duplicate-id error
message only while parsing the input stream (before
any breaking up the formatting object into blocks
occurs) so this error should not occur in future
releases.  In 1.0, ID's can (and are) subsequently
attached to multiple layout blocks--that is not an XSL
error.  ID's just cannot be duplicated on multiple
FO's in the input.

Glen


--- Riz Virk [EMAIL PROTECTED] wrote:
 I've actually noticed that problem (id xxx already
 exists) even when we have been able to manually
 verify that an id hasn't been used twice in the
 document. 
  
 fop seems to have a bug that if a block spans
 pages,and that block has an id associated with it,
 then fop  tries to create two destinations with the
 same id, which triggers the error above.   
  
 The only way were able to resolve it was to hack the
 fop source code to fix it ...
  
 Thanks
 Riz
  


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