changing font sizes

2003-09-25 Thread Holk, David A
I am having trouble changing font sizes within a page. 

Given this:

fo:page-sequence master-reference=page format=a overflow=hidden
font-family=Helvetica font-size=7pt
fo:static-content flow-name=xsl-region-before font-size=8


I would expect font-size=8 in the static content to override the
font-size=7pt declared in the page-sequence. When I generate my pdf the
font remains the same (7pt) throughout. Why isn't the font-size=7pt
overridden by the font-size=8?

Any insight appreciated.

Dave


LEGAL NOTICE
Unless expressly stated otherwise, this message is confidential and may be 
privileged. It is intended for the addressee(s) only. Access to this E-mail by 
anyone else is unauthorized. If you are not an addressee, any disclosure or 
copying of the contents of this E-mail or any action taken (or not taken) in 
reliance on it is unauthorized and may be unlawful. If you are not an 
addressee, please inform the sender immediately.

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



RE: changing font sizes

2003-09-25 Thread Holk, David A
Yes, I am an idiot. DOH!

Thanks J.

-Original Message-
From: J.Pietschmann [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 25, 2003 2:25 PM
To: [EMAIL PROTECTED]
Subject: Re: changing font sizes


Holk, David A wrote:
 I am having trouble changing font sizes within a page. 
 
 Given this:
 
 fo:page-sequence master-reference=page format=a overflow=hidden
 font-family=Helvetica font-size=7pt
   fo:static-content flow-name=xsl-region-before font-size=8
 
 
 I would expect font-size=8 in the static content to override the
 font-size=7pt declared in the page-sequence. When I generate my pdf the
 font remains the same (7pt) throughout. Why isn't the font-size=7pt
 overridden by the font-size=8?

Hard to say. Perhaps you meant to write font-size=8pt?

J.Pietschmann


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


LEGAL NOTICE
Unless expressly stated otherwise, this message is confidential and may be 
privileged. It is intended for the addressee(s) only. Access to this E-mail by 
anyone else is unauthorized. If you are not an addressee, any disclosure or 
copying of the contents of this E-mail or any action taken (or not taken) in 
reliance on it is unauthorized and may be unlawful. If you are not an 
addressee, please inform the sender immediately.

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



problem with entity characters - lt;

2003-09-12 Thread Holk, David A
I would expect this:

fo:block font-size=7ptlt;/= 1.5%/fo:block

to be rendered as:

/= 1.5%

in my pdf. But instead I am getting this:

lt;/= 1.5%

How can I get my expected output?

Thanks,

Dave





LEGAL NOTICE
Unless expressly stated otherwise, this message is confidential and may be 
privileged. It is intended for the addressee(s) only. Access to this E-mail by 
anyone else is unauthorized. If you are not an addressee, any disclosure or 
copying of the contents of this E-mail or any action taken (or not taken) in 
reliance on it is unauthorized and may be unlawful. If you are not an 
addressee, please inform the sender immediately.

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



RE: problem with entity characters - lt;

2003-09-12 Thread Holk, David A
I am creating an XML input file as a string in Java and then send it to fop
as a StreamSource. I convert '' to 'lt;' when I am creating the XML. If I
don't, the XSLT engine chokes.

If I look at the .fo that is created when I run my stylesheet I find:
fo:block font-size=7ptlt;/= 1.5%/fo:block

Which expect FOP To render as '/= 1.5%', but it doesn't. The 'lt;' does
not get converted to ''.

Here's my code that operates FOP:

public class PDFGenerator {
 
   public PDFGenerator() {
super();
}

public static byte[] toPDF(String xmlIn, byte[] xsltIn)
throws TableEngineException {


ByteArrayOutputStream pdfStream = new ByteArrayOutputStream();

Driver driver = new Driver();

Logger logger = new
org.apache.avalon.framework.logger.ConsoleLogger();
driver.setLogger(logger);
MessageHandler.setScreenLogger(logger);

driver.setRenderer(Driver.RENDER_PDF);

OutputStream out = pdfStream;

try {
driver.setOutputStream(out);

TransformerFactory factory = TransformerFactory.newInstance();

Transformer transformer = factory.newTransformer(new
StreamSource(
new ByteArrayInputStream(xsltIn)));

Source src = new StreamSource(new java.io.StringReader(xmlIn));

Result res = new SAXResult(driver.getContentHandler());

transformer.transform(src, res);

} catch (Exception e) {
throw new TableEngineException(FOP Error);
}

return pdfStream.toByteArray();
}
}

-Original Message-
From: J.Pietschmann [mailto:[EMAIL PROTECTED]
Sent: Friday, September 12, 2003 2:55 PM
To: [EMAIL PROTECTED]
Subject: Re: problem with entity characters - lt;


Holk, David A wrote:

 I would expect this:
 fo:block font-size=7ptlt;/= 1.5%/fo:block
 to be rendered as:
 /= 1.5%
 in my pdf. But instead I am getting this:
 lt;/= 1.5%
 How can I get my expected output?

You are probably confusing XML documents and XML APIs. In a
XML document you'll have to encode a less sign as lt;. If
you put text in a DOM tree, you just use ''. You don't have
markup in DOM tree text nodes, therefore no escaping of
special characters is necesary. Same for SAX character
events.
Another possiblity is that you've some doubel escaping
somewhere. It's hard to say without knowing how you feed
input to the FO processor and how your data is generated.

J.Pietschmann


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


LEGAL NOTICE
Unless expressly stated otherwise, this message is confidential and may be 
privileged. It is intended for the addressee(s) only. Access to this E-mail by 
anyone else is unauthorized. If you are not an addressee, any disclosure or 
copying of the contents of this E-mail or any action taken (or not taken) in 
reliance on it is unauthorized and may be unlawful. If you are not an 
addressee, please inform the sender immediately.

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



RE: problem with entity characters - lt;

2003-09-12 Thread Holk, David A
This is what is in my XML before FOP gets it:

attributeamp;lt;/= 1.5%/attribute

Looks like the double escaping you mentioned.

Here is the total flow:
---
Retrieve data from Oracle as string using XML SQL utility

Parse into java classes using SAX (at this point I replace '' with 'lt;'
in my SAX event handler's end Element event)

Manipulate java classes/perform business logic

Serialize java classes to XML string

Send XML to FOP
---

I almost seems like I don't need to do the '' to 'lt;' replacement, in the
EventHandler. But FOP was choking if I didn't. SAX must be doing some
additional transformation, maybe after endDocument?

-Original Message-
From: J.Pietschmann [mailto:[EMAIL PROTECTED]
Sent: Friday, September 12, 2003 3:38 PM
To: [EMAIL PROTECTED]
Subject: Re: problem with entity characters - lt;


Holk, David A wrote:
 I am creating an XML input file as a string in Java and then send it to
fop
 as a StreamSource. I convert '' to 'lt;' when I am creating the XML. If
I
 don't, the XSLT engine chokes.
 
 If I look at the .fo that is created when I run my stylesheet I find:
 fo:block font-size=7ptlt;/= 1.5%/fo:block
 
 Which expect FOP To render as '/= 1.5%', but it doesn't. The 'lt;' does
 not get converted to ''.

The lt; should be converted by the parser reading from your XML
string, before it even gets into the XSLT processor.

Try the following:
1. Dump the result of the transformation and run it through the
FOP command line.
2. Dump the XML string into a file and run it and the style sheet
through the FOP command line.
3. Are you using disable-output-escaping anywhere? Remove it and
try again.
4. Run the dumped XML string through a stand-alone XSLT processor
and check the result.

J.Pietschmann


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


LEGAL NOTICE
Unless expressly stated otherwise, this message is confidential and may be 
privileged. It is intended for the addressee(s) only. Access to this E-mail by 
anyone else is unauthorized. If you are not an addressee, any disclosure or 
copying of the contents of this E-mail or any action taken (or not taken) in 
reliance on it is unauthorized and may be unlawful. If you are not an 
addressee, please inform the sender immediately.

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



fo:table-header - Currently only Table Rows are supported

2003-06-23 Thread Holk, David A
When I try to load my table header dynamically using apply-templates, I get
the error below. The row/cell/block construct works fine if I enter the
table-headers manually in the stylesheet.

Any ideas or comments appreciated.

David 


[ERROR] org.apache.fop.apps.FOPException: Currently only Table Rows are
supported in table body, header and footer

FOP 0.20.4

###
fo:flow flow-name=xsl-region-body
fo:table
fo:table-column
column-width=73mm/
fo:table-column
column-width=15mm/
fo:table-column
column-width=24mm/
fo:table-column
column-width=24mm/
fo:table-column
column-width=24mm/
fo:table-column
column-width=24mm/
fo:table-column
column-width=24mm/
fo:table-column
column-width=24mm/
fo:table-column
column-width=24mm/
fo:table-column
column-width=24mm/
fo:table-column
column-width=24mm/
fo:table-header
xsl:apply-templates
mode=column-header/
/fo:table-header
fo:table-body

xsl:apply-templates/
/fo:table-body
/fo:table
/fo:flow

xsl:template match=body mode=column-header
xsl:apply-templates/
/xsl:template
xsl:template match=column-titles mode=column-header
fo:table-row
xsl:apply-templates/
/fo:table-row
/xsl:template
xsl:template match=title mode=column-header
fo:table-cell border-width=0.5mm
fo:block font-size=7pt font-weight=bold
xsl:value-of select=./
/fo:block
/fo:table-cell
/xsl:template
#

This works fine:

fo:table-header
fo:table-row

fo:table-cell border-width=0.5mm

fo:block font-size=7pt font-weight=bold
 Method Name
 /fo:block

/fo:table-cell

fo:table-cell border-width=0.5mm

fo:block font-size=7pt font-weight=bold
 Procedure
 /fo:block

/fo:table-cell

fo:table-cell border-width=0.5mm

fo:block font-size=7pt font-weight=bold
Attribute
 /fo:block

/fo:table-cell

fo:table-cell border-width=0.5mm

fo:block font-size=7pt font-weight=bold
Specification
 /fo:block

/fo:table-cell

fo:table-cell border-width=0.5mm

fo:block font-size=7pt font-weight=bold
1 Month
 /fo:block

/fo:table-cell

fo:table-cell border-width=0.5mm

fo:block font-size=7pt font-weight=bold
3 Months
 /fo:block

/fo:table-cell

fo:table-cell border-width=0.5mm

fo:block font-size=7pt font-weight=bold
1 Month
 /fo:block

/fo:table-cell

fo:table-cell border-width=0.5mm

fo:block font-size=7pt font-weight=bold
3 Months
 /fo:block

/fo:table-cell

fo:table-cell border-width=0.5mm

fo:block font-size=7pt font-weight=bold
1 Month
 /fo:block

/fo:table-cell

fo:table-cell border-width=0.5mm

fo:block font-size=7pt font-weight=bold
3 Months
 /fo:block

/fo:table-cell
/fo:table-row
/fo:table-header



LEGAL NOTICE
Unless expressly stated otherwise, this message is confidential and may be 
privileged. It is intended 

RE: table-header - Currently only Table Rows are supported

2003-06-23 Thread Holk, David A
Very stupid error...I didn't consistently set the mode on my
apply-templates.

-Original Message-
From: Holk, David A [mailto:[EMAIL PROTECTED]
Sent: Monday, June 23, 2003 12:14 PM
To: '[EMAIL PROTECTED]'
Subject: fo:table-header -  Currently only Table Rows are supported 


When I try to load my table header dynamically using apply-templates, I get
the error below. The row/cell/block construct works fine if I enter the
table-headers manually in the stylesheet.

Any ideas or comments appreciated.

David 


[ERROR] org.apache.fop.apps.FOPException: Currently only Table Rows are
supported in table body, header and footer

FOP 0.20.4

###
fo:flow flow-name=xsl-region-body
fo:table
fo:table-column
column-width=73mm/
fo:table-column
column-width=15mm/
fo:table-column
column-width=24mm/
fo:table-column
column-width=24mm/
fo:table-column
column-width=24mm/
fo:table-column
column-width=24mm/
fo:table-column
column-width=24mm/
fo:table-column
column-width=24mm/
fo:table-column
column-width=24mm/
fo:table-column
column-width=24mm/
fo:table-column
column-width=24mm/
fo:table-header
xsl:apply-templates
mode=column-header/
/fo:table-header
fo:table-body

xsl:apply-templates/
/fo:table-body
/fo:table
/fo:flow

xsl:template match=body mode=column-header
xsl:apply-templates/
/xsl:template
xsl:template match=column-titles mode=column-header
fo:table-row
xsl:apply-templates/
/fo:table-row
/xsl:template
xsl:template match=title mode=column-header
fo:table-cell border-width=0.5mm
fo:block font-size=7pt font-weight=bold
xsl:value-of select=./
/fo:block
/fo:table-cell
/xsl:template
#

This works fine:

fo:table-header
fo:table-row

fo:table-cell border-width=0.5mm

fo:block font-size=7pt font-weight=bold
 Method Name
 /fo:block

/fo:table-cell

fo:table-cell border-width=0.5mm

fo:block font-size=7pt font-weight=bold
 Procedure
 /fo:block

/fo:table-cell

fo:table-cell border-width=0.5mm

fo:block font-size=7pt font-weight=bold
Attribute
 /fo:block

/fo:table-cell

fo:table-cell border-width=0.5mm

fo:block font-size=7pt font-weight=bold
Specification
 /fo:block

/fo:table-cell

fo:table-cell border-width=0.5mm

fo:block font-size=7pt font-weight=bold
1 Month
 /fo:block

/fo:table-cell

fo:table-cell border-width=0.5mm

fo:block font-size=7pt font-weight=bold
3 Months
 /fo:block

/fo:table-cell

fo:table-cell border-width=0.5mm

fo:block font-size=7pt font-weight=bold
1 Month
 /fo:block

/fo:table-cell

fo:table-cell border-width=0.5mm

fo:block font-size=7pt font-weight=bold
3 Months
 /fo:block

/fo:table-cell

fo:table-cell border-width=0.5mm

fo:block font-size=7pt font-weight=bold
1 Month
 /fo:block

/fo:table-cell

fo:table-cell border-width=0.5mm

fo:block font-size=7pt font-weight=bold
3 Months

RE: table in xsl-region-before

2003-05-21 Thread Holk, David A
Title: RE: table in xsl-region-before



As 
Johannes pointed out, I just missed my fo:table-row declaration (doh!). 


The 
"mode=" attribute of apply-templates has worked perfectly so far for directing 
matches to a particular table (of several in the page).I hope I am not 
grossly misusing it.

  -Original Message-From: Rob Stote 
  [mailto:[EMAIL PROTECTED]Sent: Wednesday, May 21, 2003 
  11:49 AMTo: '[EMAIL PROTECTED]'Subject: RE: table 
  in xsl-region-before
  David: 
   Are you 
  "xsl:apply-templates mode="header"/" or do you want to 
   "xsl:call-template name=""/" try 
  naming you template and calling  from within the 
  table.
  Just a guess 
  Rob 
  -Original Message- From: Holk, 
  David A [mailto:[EMAIL PROTECTED]] 
  Sent: Wednesday, May 21, 2003 11:36 AM 
  To: '[EMAIL PROTECTED]' Subject: fo:table in xsl-region-before 
  The code below causes FOP to throw this exception: 
  "Currently only table rows are supported in table body, 
  header, and footer." 
  I am using the same technique in another table in the 
  xsl-region-body without a problem. Does FOP have a 
  problem with tables in the region-before? 
  Any comments or suggestions appreciated. 
  Dave 
   fo:static-content flow-name="xsl-region-before" 
   
   fo:table  
   
   fo:table-column 
  column-width="80mm"/  
   
   fo:table-column 
  column-width="80mm"/  
   
   fo:table-column 
  column-width="80mm"/  
   
   fo:table-body 
   
   
   
   xsl:apply-templates mode="header"/ 
   
   
   /fo:table-body 
   
   /fo:table  
  /fo:static-content 
   xsl:template 
  match="header-column" mode="header" 
   
   fo:table-cell 
  border-width="0.5mm"  
   
   fo:block 
  font-size="9pt"  
   
   
   xsl:value-of 
  select="."/  
   
   /fo:block  
   /fo:table-cell 
   /xsl:template 
  LEGAL NOTICE Unless expressly stated 
  otherwise, this message is confidential and may be privileged. It is intended 
  for the addressee(s) only. Access to this E-mail by anyone else is 
  unauthorized. If you are not an addressee, any disclosure or copying of the 
  contents of this E-mail or any action taken (or not taken) in reliance on it 
  is unauthorized and may be unlawful. If you are not an addressee, please 
  inform the sender immediately.
  - 
  To unsubscribe, e-mail: 
  [EMAIL PROTECTED] For additional 
  commands, e-mail: [EMAIL PROTECTED] 



FOP in production app

2003-03-10 Thread Holk, David A
Is anyone using FOP in a production app? 

Should I expect a commercial product like XEP or XSLFormatter to be more
robust in a production application?

Any experiences/comments appreciated.

David Holk


LEGAL NOTICE
Unless expressly stated otherwise, this message is confidential and may be 
privileged. It is intended for the addressee(s) only. Access to this E-mail by 
anyone else is unauthorized. If you are not an addressee, any disclosure or 
copying of the contents of this E-mail or any action taken (or not taken) in 
reliance on it is unauthorized and may be unlawful. If you are not an 
addressee, please inform the sender immediately.

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