Document Questions

2005-01-10 Thread Luke Shannon
Hello;

I am working on creating all the various layouts our product supports in FO.

Having some issues.

The code below runs when it is time to get the FO input:

!-- fo root: all document properties go inside this tag --
fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
!-- configure the page attributes --
fo:layout-master-set
fo:simple-page-master master-name=simple page-height=29.7cm
page-width=21cm margin-top=1cm margin-bottom=2cm margin-left=2.5cm
margin-right=2.5cm
fo:region-body margin-top=3cm/
fo:region-before extent=3cm/
fo:region-after extent=1.5cm/
/fo:simple-page-master
/fo:layout-master-set
!-- ouput the content --
fo:page-sequence master-reference=simple
xsl:call-template name=s2_pdf /
/fo:page-sequence
/fo:root


Here is the template it calls:

xsl:template name=s2_pdf
fo:flow flow-name=xsl-region-start
fo:block 
IMG SRC={$spacepath} WIDTH=9 HEIGHT=1 /
/fo:block
/fo:flow
fo:flow flow-name=xsl-region-body
!-- text 1 --
fo:block font-family=Arial font-size=12pt font-weight=bold
break-after=auto space-after=10pt text-align=left
xsl:call-template name=text_display_and_edit
xsl:with-param name=text_number select=number('1') /
xsl:with-param name=text_firstname select=string('TEXT') /
xsl:with-param name=texttype select=string('norich') /
/xsl:call-template
/fo:block
!-- text 2 --
fo:block font-family=Arial font-size=12pt font-weight=normal
text-align=left
xsl:call-template name=text_display_and_edit
xsl:with-param name=text_number select=number('2') /
xsl:with-param name=text_firstname select=string('TEXT') /
xsl:with-param name=texttype select=string('norich') /
/xsl:call-template
/fo:block
/fo:flow

I have 2 problems.

1. With the image tag the way that it is, I get an error claiming the tag
needs an accompaning /img. This is confusing to me because the tag above
contains a /.
2. If I take the image tag out I get a message complaining about more than
one flow in a page sequence. How else can I write to different xsl: regions
of the same page? Should I just use tables for this?

Thanks,

Luke


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



Re: Document Questions

2005-01-10 Thread Christopher Milton
Where is the closing /xsl:template?

--- Luke Shannon [EMAIL PROTECTED] wrote:
 Hello;
 
 I am working on creating all the various layouts our product supports in FO.
 
 Having some issues.
 
 The code below runs when it is time to get the FO input:
 
 !-- fo root: all document properties go inside this tag --
 fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
 !-- configure the page attributes --
 fo:layout-master-set
 fo:simple-page-master master-name=simple page-height=29.7cm
 page-width=21cm margin-top=1cm margin-bottom=2cm margin-left=2.5cm
 margin-right=2.5cm
 fo:region-body margin-top=3cm/
 fo:region-before extent=3cm/
 fo:region-after extent=1.5cm/
 /fo:simple-page-master
 /fo:layout-master-set
 !-- ouput the content --
 fo:page-sequence master-reference=simple
 xsl:call-template name=s2_pdf /
 /fo:page-sequence
 /fo:root
 
 
 Here is the template it calls:
 
 xsl:template name=s2_pdf
 fo:flow flow-name=xsl-region-start
 fo:block 
 IMG SRC={$spacepath} WIDTH=9 HEIGHT=1 /
 /fo:block
 /fo:flow
 fo:flow flow-name=xsl-region-body
 !-- text 1 --
 fo:block font-family=Arial font-size=12pt font-weight=bold
 break-after=auto space-after=10pt text-align=left
 xsl:call-template name=text_display_and_edit
 xsl:with-param name=text_number select=number('1') /
 xsl:with-param name=text_firstname select=string('TEXT') /
 xsl:with-param name=texttype select=string('norich') /
 /xsl:call-template
 /fo:block
 !-- text 2 --
 fo:block font-family=Arial font-size=12pt font-weight=normal
 text-align=left
 xsl:call-template name=text_display_and_edit
 xsl:with-param name=text_number select=number('2') /
 xsl:with-param name=text_firstname select=string('TEXT') /
 xsl:with-param name=texttype select=string('norich') /
 /xsl:call-template
 /fo:block
 /fo:flow
 
 I have 2 problems.
 
 1. With the image tag the way that it is, I get an error claiming the tag
 needs an accompaning /img. This is confusing to me because the tag above
 contains a /.
 2. If I take the image tag out I get a message complaining about more than
 one flow in a page sequence. How else can I write to different xsl: regions
 of the same page? Should I just use tables for this?
 
 Thanks,
 
 Luke
 
 
 -
 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: Document Questions

2005-01-10 Thread Luke Shannon
Hi;

I have scrapped the code I originally posted in favour of tables.

My code runs without error now, but the document is blank?

Any tips would be appreciated:

Code starts here:

!-- fo root: all document properties go inside this tag --
fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
!-- configure the page attributes --
fo:layout-master-set
fo:simple-page-master master-name=simple page-height=29.7cm
page-width=21cm margin-top=1cm margin-bottom=2cm margin-left=2.5cm
margin-right=2.5cm
fo:region-body margin-top=3cm/
fo:region-before extent=3cm/
fo:region-after extent=1.5cm/
/fo:simple-page-master
/fo:layout-master-set
!-- ouput the content --
fo:page-sequence master-reference=simple
xsl:call-template name=s2_pdf /
/fo:page-sequence
/fo:root

Template Defined Here:

xsl:template name=s2_pdf
fo:flow flow-name=xsl-region-body
fo:table
fo:table-body
fo:table-row
!-- image cell --
fo:table-cell number-columns-spanned=2
fo:block
fo:external-graphic src=url({$spacepath})/
/fo:block
/fo:table-cell
/fo:table-row
fo:table-row
!-- text number one cell --
fo:table-cell
fo:block font-family=Arial font-size=12pt font-weight=bold
break-after=auto space-after=10pt text-align=left
xsl:call-template name=text_display_and_edit
xsl:with-param name=text_number select=number('1') /
xsl:with-param name=text_firstname select=string('TEXT') /
xsl:with-param name=texttype select=string('norich') /
/xsl:call-template
/fo:block
/fo:table-cell
!-- text number two cell --
fo:table-cell
fo:block font-family=Arial font-size=12pt font-weight=bold
break-after=auto space-after=10pt text-align=left
xsl:call-template name=text_display_and_edit
xsl:with-param name=text_number select=number('2') /
xsl:with-param name=text_firstname select=string('TEXT') /
xsl:with-param name=texttype select=string('norich') /
/xsl:call-template
/fo:block
/fo:table-cell
/fo:table-row
/fo:table-body
/fo:table
/fo:flow
/xsl:template

Thanks,

Luke



- Original Message - 
From: Luke Shannon [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 10, 2005 2:43 PM
Subject: Document Questions


 Hello;

 I am working on creating all the various layouts our product supports in
FO.

 Having some issues.

 The code below runs when it is time to get the FO input:

 !-- fo root: all document properties go inside this tag --
 fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
 !-- configure the page attributes --
 fo:layout-master-set
 fo:simple-page-master master-name=simple page-height=29.7cm
 page-width=21cm margin-top=1cm margin-bottom=2cm margin-left=2.5cm
 margin-right=2.5cm
 fo:region-body margin-top=3cm/
 fo:region-before extent=3cm/
 fo:region-after extent=1.5cm/
 /fo:simple-page-master
 /fo:layout-master-set
 !-- ouput the content --
 fo:page-sequence master-reference=simple
 xsl:call-template name=s2_pdf /
 /fo:page-sequence
 /fo:root


 Here is the template it calls:

 xsl:template name=s2_pdf
 fo:flow flow-name=xsl-region-start
 fo:block 
 IMG SRC={$spacepath} WIDTH=9 HEIGHT=1 /
 /fo:block
 /fo:flow
 fo:flow flow-name=xsl-region-body
 !-- text 1 --
 fo:block font-family=Arial font-size=12pt font-weight=bold
 break-after=auto space-after=10pt text-align=left
 xsl:call-template name=text_display_and_edit
 xsl:with-param name=text_number select=number('1') /
 xsl:with-param name=text_firstname select=string('TEXT') /
 xsl:with-param name=texttype select=string('norich') /
 /xsl:call-template
 /fo:block
 !-- text 2 --
 fo:block font-family=Arial font-size=12pt font-weight=normal
 text-align=left
 xsl:call-template name=text_display_and_edit
 xsl:with-param name=text_number select=number('2') /
 xsl:with-param name=text_firstname select=string('TEXT') /
 xsl:with-param name=texttype select=string('norich') /
 /xsl:call-template
 /fo:block
 /fo:flow

 I have 2 problems.

 1. With the image tag the way that it is, I get an error claiming the tag
 needs an accompaning /img. This is confusing to me because the tag above
 contains a /.
 2. If I take the image tag out I get a message complaining about more than
 one flow in a page sequence. How else can I write to different xsl:
regions
 of the same page? Should I just use tables for this?

 Thanks,

 Luke


 -
 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: Document Questions

2005-01-10 Thread J.Pietschmann
Luke Shannon wrote:
fo:region-body margin-top=3cm/
fo:region-before extent=3cm/
fo:region-after extent=1.5cm/
Minor problem here: your body region overlaps region-after.
fo:table
fo:table-body
No fo:table-columns here. Bad. FOP 0.20.5 can't do table auto
layout.
Also, you should have got a warning about using a fixed table
layout. Look carefully.
xsl:with-param name=text_number select=number('1') /
Utterly redundant XPath type conversion.
xsl:with-param name=text_firstname select=string('TEXT') /
xsl:with-param name=texttype select=string('norich') /
More redundant XPath type conversions.
J.Pietschmann
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Re: Document Questions

2005-01-10 Thread Luke Shannon
Thanks. It was the missing column declarations. I don't know all of the
pieces of this system, I am guessing this was giving an error but somewhere
in the code that exception was being caught and not reported.

My issue now is getting the document to find the image source I want to use.

fo:block
fo:external-graphic src=url(hockey_canada0104.jpg)/
/fo:block

What path should I be putting before the image name? One from the tomcat bin
directory to the location of the image on the server? Right now the image
gets dumped in the same place the PDF is saved to.

Thanks for the help,

Luke
- Original Message - 
From: J.Pietschmann [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Monday, January 10, 2005 5:12 PM
Subject: Re: Document Questions


 Luke Shannon wrote:
  fo:region-body margin-top=3cm/
  fo:region-before extent=3cm/
  fo:region-after extent=1.5cm/

 Minor problem here: your body region overlaps region-after.

  fo:table
  fo:table-body

 No fo:table-columns here. Bad. FOP 0.20.5 can't do table auto
 layout.
 Also, you should have got a warning about using a fixed table
 layout. Look carefully.

  xsl:with-param name=text_number select=number('1') /
 Utterly redundant XPath type conversion.

  xsl:with-param name=text_firstname select=string('TEXT') /
  xsl:with-param name=texttype select=string('norich') /
 More redundant XPath type conversions.

 J.Pietschmann

 -
 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: Document Questions

2005-01-10 Thread The Web Maestro
On Jan 10, 2005, at 3:14 PM, Luke Shannon wrote:
snip
My issue now is getting the document to find the image source I want 
to use.

fo:block
fo:external-graphic src=url(hockey_canada0104.jpg)/
/fo:block
What path should I be putting before the image name? One from the 
tomcat bin
directory to the location of the image on the server? Right now the 
image
gets dumped in the same place the PDF is saved to.

Thanks for the help,
Luke
Not seeing the set up your using (userconfig.xml? OS platform, etc.), 
here're a few links which could provide the answer

http://xml.apache.org/fop/faq.html#cannot-find-external-graphics
http://xml.apache.org/fop/fo.html#external-resources
http://xml.apache.org/fop/graphics.html
HTH!
Web Maestro Clay
--
[EMAIL PROTECTED] - http://homepage.mac.com/webmaestro/
My religion is simple. My religion is kindness.
- HH The 14th Dalai Lama of Tibet
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]