You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by David Kim <xm...@yahoo.ca> on 2005/06/14 17:32:54 UTC

RE: Overlapping Data?

Hi Andreas,

Your advices are good to me!. I got an good overlap
result that I desired through <fo:block-container> as
you said.

And while I was testing, I found limitation of
<fo:block-container> in FOP. 
When I put the code under other tag(s) (i.e even
block), I got an error like follow,

-- follow (summary)--
tag-name      :<fo:block-container>
FOP limitation:FOP says that it should be 'direct'
child of flow.
Error         :'[ERROR] java.lang.ClassCastException'

-- My problem --
In my case, if xml data tags are overlapped each other
in xsl(i.e GUI), I want to display itself(overlapped
data) in pdf.
In order to do that, I think it should be able to be
used wherever data are displayed. Is there any other
way?.
(For example, template --> template -->template ..
overlapped data..)

Thanks a lot.

David.

--- "Andreas L. Delmelle" <a_...@pandora.be>
wrote:

> > -----Original Message-----
> > From: David Kim [mailto:xmlcorba@yahoo.ca]
> >
> 
> Hi David,
> 
> > 2 My problem
> > I think it is a kind of position|location problem.
> > I want to set absolute position to object(indent?)
> in
> > order to make overlap in a flow.Is it possible?
> 
> I think so. Try experimenting with
> fo:block-container, setting
> absolute-position="absolute" and then specify the
> desired
> offsets/co-ordinates with the left/right/top/bottom
> properties.
> 
> 
> HTH!
> 
> Greetz,
> 
> Andreas
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail:
> fop-users-help@xmlgraphics.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: Arabic Character

Posted by Jeremias Maerki <de...@greenmail.ch>.
Please have a look into the mailing list archives:
http://marc.theaimsgroup.com/?l=fop-user&w=2&r=1&s=arabic&q=b

We're still looking for developers who know about the specialities of
non-latin languages. We currently don't have that kind of knowledge in
the team.

On 16.06.2005 09:55:26 Renan Collin wrote:
> Hello, has somebody already generated any Arabic PDF file with FOP ?



Jeremias Maerki


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


Arabic Character

Posted by Renan Collin <re...@cybertech.fr>.
Hello, has somebody already generated any Arabic PDF file with FOP ?

Thanks

Renan



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


Re: Overlapping Data?

Posted by "Peter B. West" <li...@pbw.id.au>.
Andreas L. Delmelle wrote:
> 
> One thing I also noticed:
> If you plan on using future FOP versions, you will need to put the
> fo:region-body as the first region in the fo:simple-page-master. (I can't
> immediately find the constraint in the XSL-FO Rec that enforces this, but
> I'm pretty sure it has a good reason...)
> 

 From fo:simple-page-master:

Contents:

(region-body+,region-before?,region-after?,region-start?,region-end?)

Peter
-- 
Peter B. West <http://cv.pbw.id.au/>
Folio <http://defoe.sourceforge.net/folio/>
<http://folio.bkbits.net/> <- the atTridged version

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


RE: Overlapping Data?-Finish-Thanks

Posted by David Kim <xm...@yahoo.ca>.
Hi Andreas,

I tested belows what you wrote.
.TEST CASE1:usage of (x)path
.TEST CASE2:position of region-body
.TEST CASE3:position of fo:block-container 
.TEST CASE4:limitation of fo:block-container 

TEST CASE1,2 will be good part of my own xsl foramt.
TEST CASE3,4 helped me to decide direction of my
project. 

You helped me too much. Thank you very much.

David.


TEST CASE1:
>   <xsl:apply-templates
> select="body/resultset/result" />
> or:
>   <xsl:apply-templates select="*/*/result" />

TEST CASE2:
> One thing I also noticed:
> If you plan on using future FOP versions, you will
> need to put the
> fo:region-body as the first region in the
> fo:simple-page-master. (I can't
> immediately find the constraint in the XSL-FO Rec
> that enforces this, but
> I'm pretty sure it has a good reason...)
 
TEST CASE3:
> Other than that, the current development version
> still chokes on the
> absolute-positioned fo:block-container inside an
> fo:inline. Since the
> fo:inline here has no children other than that
> fo:b-c, I would suggest
> removing it entirely, and moving the fo:b-c one
> level up.

TEST CASE4:
> Still having to use FOP 0.20.5, you're out of luck,
> and will have to find
> some way to make sure the block-containers are
> created as direct children of
> the fo:flow... (i.e. by terminating the fo:block
> before inserting the
> fo:block-container --theoretically, it should make
> no difference, but in
> practice, I admit, it can turn out to be a real
> pain)



__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


RE: Overlapping Data?

Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: Andreas L. Delmelle [mailto:a_l.delmelle@pandora.be]
>

Hi David,

>
> I'll have a look as soon as I find the time, but
> this won't be today/tonight. Stay tuned.
>

First of all: no offence and no big deal, but I asked for the result of the
main XSL transformation, while you posted the XML and the XSL... maybe that
didn't come through clearly enough. We encourage posting the intermediate FO
result, as that could already lead you to discover possible errors in the
XSL transformation step yourself. If there are issues in there, questions
belong either on Mulberry's XSLT list or the ML for the XSLT processor
you're using (Xalan, Saxon...), but they have nothing to do with FOP. (This
is intended as a hint for future inquiries. No need to worry right now...)

Some free XSLT advice:
In your XSL, you have this somewhere:
   <xsl:apply-templates select="//result" />
Generally, this is considered bad practice. If your source XML gets larger
and more complicated, this will cause a lot of unnecessary tree traversals
(since the XSLT processor --quite correctly-- assumes you want to look at
*every* level in the source tree to see if there are *any* 'result' nodes
there...)
Don't use this unless you absolutely don't have a clue where these nodes
will be located in the document.
Instead, in this case you can use a path like:
  <xsl:apply-templates select="body/resultset/result" />
or:
  <xsl:apply-templates select="*/*/result" />

(That said, I don't know exactly what you have learned about XSLT, but
judging from what you posted, it seems that you would benefit very much from
taking --or giving yourself-- a crash course in pure XSLT. Again, no
offence, but it will help you understand better what can or cannot be
achieved, and make the separation between pure XSLT and XSL-FO a bit
clearer, so you get a better picture of what part is handled by FOP.)

One thing I also noticed:
If you plan on using future FOP versions, you will need to put the
fo:region-body as the first region in the fo:simple-page-master. (I can't
immediately find the constraint in the XSL-FO Rec that enforces this, but
I'm pretty sure it has a good reason...)

Other than that, the current development version still chokes on the
absolute-positioned fo:block-container inside an fo:inline. Since the
fo:inline here has no children other than that fo:b-c, I would suggest
removing it entirely, and moving the fo:b-c one level up.

Still having to use FOP 0.20.5, you're out of luck, and will have to find
some way to make sure the block-containers are created as direct children of
the fo:flow... (i.e. by terminating the fo:block before inserting the
fo:block-container --theoretically, it should make no difference, but in
practice, I admit, it can turn out to be a real pain)


HTH!

Greetz,

Andreas


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


RE: Overlapping Data?

Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: David Kim [mailto:xmlcorba@yahoo.ca]
> 

Hi David,

> Did you get my message? Oh, God. I lost my head for a
> while. 

Well, don't we all from time to time. Right, Jay? ;-)

Anyway: yes I did receive it, and...

> > 
> > I'll have a look as soon as I find the time, but
> > this won't be today/tonight. Stay tuned.
> > 


Cheers,

Andreas

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


RE: Overlapping Data?

Posted by David Kim <xm...@yahoo.ca>.
Hi Andreas,

Did you get my message? Oh, God. I lost my head for a
while. 

Thanks a lot.

David.

--- "Andreas L. Delmelle" <a_...@pandora.be>
wrote:

> > -----Original Message-----
> > From: JBryant@s-s-t.com [mailto:JBryant@s-s-t.com]
> >
> 
> Hi Jay / David,
> 
> > The XSL List does not accept attachments
> (something I like personally).
> 
> Well, Mulberry indeed doesn't, but we do...
> Too many lists to handle, ay Jay? :-)
> 
> FTR: Me personally, I have nothing against
> attachments, as long as they're
> not too large (a few KB at the most). One always has
> to take into account
> that *all* subscribers will have to download it.
> 
> But anyway, David didn't attach any files. He just
> c&p'ed parts of them into
> his message, which I do prefer.
> 
> >
> > You'll need to communicate with Andreas off the
> list to be able to send
> > files.
> 
> Nope, not over here he doesn't.
> 
> 
> David,
> 
> I'll have a look as soon as I find the time, but
> this won't be
> today/tonight. Stay tuned.
> 
> 
> 
> Greetz,
> 
> Andreas
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> fop-users-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail:
> fop-users-help@xmlgraphics.apache.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


RE: Overlapping Data?

Posted by JB...@s-s-t.com.
> Too many lists to handle, ay Jay? :-)

Yup, combined with too much to do. My bad. Sorry for any confusion that 
may have arisen.

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

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


RE: Overlapping Data?

Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: JBryant@s-s-t.com [mailto:JBryant@s-s-t.com]
>

Hi Jay / David,

> The XSL List does not accept attachments (something I like personally).

Well, Mulberry indeed doesn't, but we do...
Too many lists to handle, ay Jay? :-)

FTR: Me personally, I have nothing against attachments, as long as they're
not too large (a few KB at the most). One always has to take into account
that *all* subscribers will have to download it.

But anyway, David didn't attach any files. He just c&p'ed parts of them into
his message, which I do prefer.

>
> You'll need to communicate with Andreas off the list to be able to send
> files.

Nope, not over here he doesn't.


David,

I'll have a look as soon as I find the time, but this won't be
today/tonight. Stay tuned.



Greetz,

Andreas


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


RE: Overlapping Data?

Posted by JB...@s-s-t.com.
The XSL List does not accept attachments (something I like personally).

You'll need to communicate with Andreas off the list to be able to send 
files.

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




David Kim <xm...@yahoo.ca> 
06/14/2005 02:01 PM
Please respond to
fop-users@xmlgraphics.apache.org


To
fop-users@xmlgraphics.apache.org
cc

Subject
RE: Overlapping Data?






Hi Andreas,

I hope it is not a problem. Here are my files.

1. My xsl file (full)
2. My data xml file (full)

I wrote comments that I want in those files.

Thanks a lot.

David.

====================================================
> > -- My problem --
> > In my case, if xml data tags are overlapped each
> other
> > in xsl(i.e GUI), I want to display
> itself(overlapped
> > data) in pdf.
> > In order to do that, I think it should be able to
> be
> > used wherever data are displayed. Is there any
> other
> > way?.
> > (For example, template --> template -->template ..
> > overlapped data..)
> 
> I think your problem shouldn't be a problem at all
> --in theory, but I don't
> know *exactly* what your FO code looks like...
> 
===================================================

1. My xsl file (full)
--------------------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
                                 xmlns:fo="
http://www.w3.org/1999/XSL/Format" 
                                 exclude-result-prefixes="fo" 
version="1.1">
 

  <xsl:template match="data">
    <xsl:value-of select="language" />
 
    <fo:root>
 

      <fo:layout-master-set>
        <fo:simple-page-master           master-name="contents"
margin-top="1cm" 
 margin-bottom="1.0581001cm"
margin-left="1cm" 
 margin-right="1.0581001cm">
          <fo:region-before
region-name="xsl-region-before" extent="1.7cm" />
          <fo:region-after
region-name="xsl-region-after" extent="1.7cm" />
          <fo:region-start
region-name="xsl-region-start" extent="1.7cm" />
          <fo:region-end region-name="xsl-region-end"
extent="1.7cm" />
          <fo:region-body
region-name="xsl-region-body" margin-top="1cm" 
 margin-bottom="1.7cm" margin-left="1.7cm"

 margin-right="1.7cm" />
        </fo:simple-page-master>
      </fo:layout-master-set>
 
      <!--..********************************.......-->
      <!--..****** page-sequence      ******.......-->
      <!--..********************************.......-->
      <fo:page-sequence master-reference="contents">
 
 
 
<!--...********************************.......-->
       <!--...****** static-content 
******.......-->
 
<!--...********************************.......-->
       <fo:static-content
flow-name="xsl-region-before">
<!--.....................................******define
Title in region-before
*****.................................-->
                   <fo:block>
                                 <fo:retrieve-marker
retrieve-class-name="data-title"
                         retrieve-boundary="page-sequence"
 
retrieve-position="first-starting-within-page" />
                   </fo:block>
<!--.....................................******define
Title in region-before
*****end..............................-->
        </fo:static-content>
 
 
        <fo:static-content
flow-name="xsl-region-after">
          <fo:block font-family="Times"
font-size="20pt" font-weight="bold"
font-style="italic" text-align="right">
          <fo:page-number />     / 
<fo:page-number-citation ref-id="16491778" /> 
          </fo:block>
        </fo:static-content >
 
        <fo:static-content
flow-name="xsl-region-start" />
        <fo:static-content flow-name="xsl-region-end"
/>
 
        <fo:flow flow-name="xsl-region-body">
          <fo:block />
          <fo:block start-indent="3cm"
space-before="2.4cm" font-family="Times"
font-size="37pt" font-weight="bold">
            TITLE
          </fo:block>

 
<!--.....................................******
overlap test
*****.................................................-->
                   <!--  CASE 1 : OK
          <fo:block-container position="absolute" top="2.4cm"
left="4.5cm" height="1cm" width="5cm">
                <fo:block>
                TITLE2
                </fo:block>
          </fo:block-container>
          -->
                   <!--  CASE 2 : OK -->
                   <xsl:call-template name="overlap"/> 
                   <!--  -->
<!--.....................................******
overlap test *****
end.............................................-->


          <fo:block>
<!--........................................*****start
TITLE in region-before
*****..............................-->
              <fo:marker
marker-class-name="data-title">

                    <fo:block font-weight="bold"
font-style="" font-family="Times" font-size="13pt">
                                       NAME-title, 
                      REGION-title, 
                      SALARY-title, 
                      BONUS-title, 
                    </fo:block>
<!-- 
.......................................................................................................
  --> 
                                     <xsl:call-template name="dotline" 
/><!--
decorate -->
 
                                 </fo:marker >
                         <fo:block>
                <xsl:apply-templates select="//result"
/> 
                </fo:block>
<!--........................................*****start
TITLE in region-before
*****end...........................-->
          </fo:block>
          <fo:block id="16491778" />
                   <!--  CASE 3 : OK -->
                   <xsl:call-template name="overlap"/> 
                   <!--  -->
        </fo:flow>
      </fo:page-sequence>
    </fo:root>
  </xsl:template> <!--* data *-->
 
 
  <!-- ***************************** -->
  <!--        template mathch        -->
  <!-- ***************************** -->
  <!-- ............................. -->
  <!--        'result'               -->
  <!-- ............................. -->
 
  <xsl:template
match="result"><!--match=data/body/resultset/result-->
 
 
        <fo:block font-weight="bold"
font-family="Times" font-size="13pt">
          <xsl:value-of select="NAME" /> 
        </fo:block>

        <fo:block font-weight="bold"
font-style="italic" font-family="Times"
font-size="13pt">
          <xsl:value-of select="REGION" />
        </fo:block>

        <fo:block font-weight="bold"
font-style="italic" font-family="Times"
font-size="13pt">
          <xsl:value-of select="SALARY" />
        </fo:block>

        <fo:block font-weight="bold"
font-style="italic" font-family="Times"
font-size="13pt">
          <xsl:value-of select="BONUS" /> 
 
        </fo:block>
 
           <xsl:apply-templates select="SUB/REPEAT"/> 
 
  </xsl:template> 
 
 
   <!-- ............................. -->
   <!--        'REPEAT'               -->
   <!-- ............................. -->
   <xsl:template match="SUB/REPEAT" >

                 <fo:block>


                                 <xsl:if 
test='not(preceding-sibling::REPEAT[1])'>
                                                         <fo:block 
font-weight="bold" font-style=""
font-family="Times" font-size="10pt">
                                                           SUB1-title, 
                                                         </fo:block>

                                                         <fo:block 
font-weight="bold"
font-style="italic" font-family="Times"
font-size="10pt">
                                                           SUB2-title, 
                                                         </fo:block>

                                                         <fo:block 
font-weight="bold"
font-style="italic" font-family="Times"
font-size="10pt">
                                                           SUB3-title, 
                                                         </fo:block>

                                 </xsl:if>
 

                          <fo:block font-weight="bold"
font-style="italic" font-family="Times"
font-size="13pt">
                            <xsl:value-of select="SUB1" />
                          </fo:block>

                          <fo:block font-weight="bold"
font-style="italic" font-family="Times"
font-size="13pt">
                            <xsl:value-of select="SUB2" />
                          </fo:block>
 
                          <fo:block font-weight="bold"
font-style="italic" font-family="Times"
font-size="13pt">
                            <xsl:value-of select="SUB3" /> 
                          </fo:block>
 
                                                 <xsl:apply-templates
select="REPEATSUB/REPEAT"/> 

                 </fo:block>
 
   </xsl:template>

   <!-- ............................. -->
   <!--        'REPEATSUB             -->
   <!-- ............................. -->
   <xsl:template match="REPEATSUB/REPEAT" >

                 <fo:block>

                                 <xsl:if 
test='not(preceding-sibling::REPEAT[1])'>
                                                         <fo:inline 
font-weight="bold"
font-style="italic" font-family="Times"
font-size="10pt">
                                                           sub-SUB1-title, 

                                                         </fo:inline>
 <xsl:call-template name="space-1"/>
                                                         <fo:inline 
font-weight="bold"
font-style="italic" font-family="Times"
font-size="10pt">
                                                           sub-SUB2-title, 

                                                         </fo:inline>
 <xsl:call-template name="space-1"/>
                                                         <fo:inline 
font-weight="bold"
font-style="italic" font-family="Times"
font-size="10pt">
                                                           sub-SUB3-title, 

                                                         </fo:inline>
 <xsl:call-template name="space-1"/>
                                                         <fo:inline 
font-weight="bold"
font-style="italic" font-family="Times"
font-size="10pt">
                                                           sub-SUB4-title, 

                                                         </fo:inline>
                                                         <fo:block/>
                                 </xsl:if>
 
 
 
                          <fo:inline font-weight="bold"
font-style="italic" font-family="Times"
font-size="13pt">
                            <xsl:value-of select="SUB1" />
                          </fo:inline>
                                  <xsl:call-template name="space-1"/>
 
                          <fo:inline font-weight="bold"
font-style="italic" font-family="Times"
font-size="13pt">
                            <xsl:value-of select="SUB2" />
                          </fo:inline>
                                  <xsl:call-template name="space-1"/>

                          <fo:inline font-weight="bold"
font-style="italic" font-family="Times"
font-size="13pt">
                            <xsl:value-of select="SUB3" /> 
                          </fo:inline>
                                  <xsl:call-template name="space-1"/>

                          <!--
*********************************************************************************
-->
                          <!-- * Here, I want to overlap data with
each other (for example, sub3, sub4)        * -->
                          <!--
*********************************************************************************
-->
                          <!-- * Data(i.e (..SUB3, SUB4): (..33,44),
(..33A,44A),(..33B,44B)...ref:data xml.   * -->
                          <!--
*********************************************************************************
-->
                          <fo:inline font-weight="bold"
font-style="italic" font-family="Times"
font-size="13pt">

                            <!-- **
                   <fo:block-container position='absolute'
top='16cm' left='2cm' height='3in' width='2in'
border='3px solid yellow'>
                   <fo:block>
                   ** -->
                            <xsl:value-of select="SUB4" /> 
                            <!-- block>
                   </fo:block-container >-->

                          </fo:inline>

 
                 </fo:block>
 
   </xsl:template>

<!--
..................................................................call-template
dotline....-->
   <xsl:template name="dotline">
                 <fo:block text-align="left"><!-- decorate -->
                                 <fo:leader color="blue" 
leader-pattern="dots"
leader-length="550pt" /> 
                 </fo:block>
   </xsl:template>
<!--
..................................................................call-template
space1.....-->
   <xsl:template name="space-1">
                 <fo:leader leader-pattern="space"/>
                 <!--<fo:inline
white-space-collapse="false"><fo:character character='
'/></fo:inline>-->
   </xsl:template>
 
<!--
..................................................................call-template
overlap.....-->
   <xsl:template name="overlap">
                 <fo:block-container position="absolute" top="2.4cm"
left="4.5cm" height="1cm" width="5cm">
                                 <fo:block>
                                 TITLE2
                                 </fo:block>
                 </fo:block-container>
  </xsl:template>
 
 
 
 
</xsl:stylesheet>



2. My data xml file (full)
--------------------
<?xml version="1.0" encoding="UTF-8"?>
<data>
  <body>
    <resultset>
      <result>
        <NAME>PAUL3</NAME>
        <REGION>NS</REGION>
        <SALARY>9878787</SALARY>
        <BONUS>1111</BONUS>
        <SUB>
                         <REPEAT>
                                         <SUB1>1111</SUB1>
                                         <SUB2>2222</SUB2>
                                         <SUB3>3333</SUB3>
                         </REPEAT>
                         <REPEAT>
                                         <SUB1>1111A</SUB1>
                                         <SUB2>2222A</SUB2>
                                         <SUB3>3333A</SUB3>
                         </REPEAT>
                         <REPEAT>
                                         <SUB1>1111B</SUB1>
                                         <SUB2>2222B</SUB2>
                                         <SUB3>3333B</SUB3>
                                         <REPEATSUB>
 
                                         <!-- 
********************************** -->
                                         <!-- I want to overlap data 1 and 
data2 -->
                                         <!-- 
********************************** -->
                                                         <REPEAT>
 <SUB1>11</SUB1>
 <SUB2>22</SUB2>
 <SUB3>33</SUB3><!-- data 1-->
 <SUB4>44</SUB4><!-- data 2-->
                                                         </REPEAT>
                                                         <REPEAT>
 <SUB1>11A</SUB1>
 <SUB2>22A</SUB2>
 <SUB3>33A</SUB3><!-- data 1-->
 <SUB4>44A</SUB4><!-- data 2-->
                                                         </REPEAT>
                                                         <REPEAT>
 <SUB1>11B</SUB1>
 <SUB2>22B</SUB2>
 <SUB3>33B</SUB3><!-- data 1-->
 <SUB4>44B</SUB4><!-- data 2-->
                                                         </REPEAT>
                                                 </REPEATSUB>

                         </REPEAT>
        </SUB>
      </result>
 
      <result>
        <NAME>SubTotal</NAME>
        <REGION />
        <SALARY />
        <BONUS>2222</BONUS>
      </result>
      <result>
        <NAME>PAUL4</NAME>
        <REGION>PEI</REGION>
        <SALARY>98732187</SALARY>
        <BONUS>3333</BONUS>
        <SUB>
                         <REPEAT>
                                         <SUB1>1111C</SUB1>
                                         <SUB2>2222C</SUB2>
                                         <SUB3>3333C</SUB3>
                         </REPEAT>
                         <REPEAT>
                                         <SUB1>1111D</SUB1>
                                         <SUB2>2222D</SUB2>
                                         <SUB3>3333D</SUB3>
                         </REPEAT>
                         <REPEAT>
                                         <SUB1>1111E</SUB1>
                                         <SUB2>2222E</SUB2>
                                         <SUB3>3333E</SUB3>
                         </REPEAT>
                 </SUB>

      </result>
      <result>
        <NAME>SubTotal</NAME>
        <REGION />
        <SALARY />
        <BONUS>4444</BONUS>
        <SUB>
                         <REPEAT>
                                         <SUB1>w111</SUB1>
                                         <SUB2>w222</SUB2>
                                         <SUB3>w333</SUB3>
                         </REPEAT>
                         <REPEAT>
                                         <SUB1>w111A</SUB1>
                                         <SUB2>w222A</SUB2>
                                         <SUB3>w333A</SUB3>
                         </REPEAT>
                         <REPEAT>
                                         <SUB1>w111B</SUB1>
                                         <SUB2>w222B</SUB2>
                                         <SUB3>w333B</SUB3>
                         </REPEAT>
        </SUB>
      </result>
      <result>
        <NAME>PAUL5 PAUL5 PAUL5 PAUL5 PAUL5 </NAME>
        <REGION>QUEBEC QUEBEC QUEBEC QUEBEC
QUEBEC</REGION>
        <SALARY>5768787</SALARY>
        <BONUS>5555</BONUS>
        <SUB>
                         <REPEAT>
                                         <SUB1>x111</SUB1>
                                         <SUB2>x222</SUB2>
                                         <SUB3>x333</SUB3>
                         </REPEAT>
                         <REPEAT>
                                         <SUB1>x111A</SUB1>
                                         <SUB2>x222A</SUB2>
                                         <SUB3>x333A</SUB3>
                         </REPEAT>
                         <REPEAT>
                                         <SUB1>x111B</SUB1>
                                         <SUB2>x222B</SUB2>
                                         <SUB3>x333B</SUB3>
                         </REPEAT>
        </SUB>
      </result>
      <result>
        <NAME>SubTotal</NAME>
        <REGION />
        <SALARY />
        <BONUS>6666</BONUS>
        <SUB>
                         <REPEAT>
                                         <SUB1>y111</SUB1>
                                         <SUB2>y222</SUB2>
                                         <SUB3>y333</SUB3>
                         </REPEAT>
                         <REPEAT>
                                         <SUB1>y111A</SUB1>
                                         <SUB2>y222A</SUB2>
                                         <SUB3>y333A</SUB3>
                         </REPEAT>
                         <REPEAT>
                                         <SUB1>y111B</SUB1>
                                         <SUB2>y222B</SUB2>
                                         <SUB3>y333B</SUB3>
                         </REPEAT>
        </SUB>
      </result>
      <result>
        <NAME>SubTotal</NAME>
        <REGION/>
        <SALARY />
        <BONUS>7777</BONUS>
        <SUB>
                         <REPEAT>
                                         <SUB1>z111</SUB1>
                                         <SUB2>z222</SUB2>
                                         <SUB3>z333</SUB3>
                         </REPEAT>
                         <REPEAT>
                                         <SUB1>z111A</SUB1>
                                         <SUB2>z222A</SUB2>
                                         <SUB3>z333A</SUB3>
                         </REPEAT>
                         <REPEAT>
                                         <SUB1>z111B</SUB1>
                                         <SUB2>z222B</SUB2>
                                         <SUB3>z333B</SUB3>
                         </REPEAT>
        </SUB>
      </result>
      <total>
        <BONUS>6578752</BONUS>
      </total>
    </resultset>
  </body>
</data>


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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




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


RE: Overlapping Data?

Posted by David Kim <xm...@yahoo.ca>.
Hi Andreas,

I hope it is not a problem. Here are my files.

1. My xsl file (full)
2. My data xml file (full)

I wrote comments that I want in those files.

Thanks a lot.

David.

====================================================
> > -- My problem --
> > In my case, if xml data tags are overlapped each
> other
> > in xsl(i.e GUI), I want to display
> itself(overlapped
> > data) in pdf.
> > In order to do that, I think it should be able to
> be
> > used wherever data are displayed. Is there any
> other
> > way?.
> > (For example, template --> template -->template ..
> > overlapped data..)
> 
> I think your problem shouldn't be a problem at all
> --in theory, but I don't
> know *exactly* what your FO code looks like...
> 
===================================================

1. My xsl file (full)
--------------------
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
		xmlns:fo="http://www.w3.org/1999/XSL/Format" 
		exclude-result-prefixes="fo" version="1.1">
		

  <xsl:template match="data">
    <xsl:value-of select="language" />
    
    <fo:root>
    

      <fo:layout-master-set>
        <fo:simple-page-master 	master-name="contents"
margin-top="1cm" 
        			margin-bottom="1.0581001cm"
margin-left="1cm" 
        			margin-right="1.0581001cm">
          <fo:region-before
region-name="xsl-region-before" extent="1.7cm" />
          <fo:region-after
region-name="xsl-region-after" extent="1.7cm" />
          <fo:region-start
region-name="xsl-region-start" extent="1.7cm" />
          <fo:region-end region-name="xsl-region-end"
extent="1.7cm" />
          <fo:region-body
region-name="xsl-region-body" margin-top="1cm" 
          			margin-bottom="1.7cm" margin-left="1.7cm"

          			margin-right="1.7cm" />
        </fo:simple-page-master>
      </fo:layout-master-set>
      
      <!--..********************************.......-->
      <!--..****** page-sequence      ******.......-->
      <!--..********************************.......-->
      <fo:page-sequence master-reference="contents">
      
        
      
<!--...********************************.......-->
       <!--...****** static-content    
******.......-->
      
<!--...********************************.......-->
       <fo:static-content
flow-name="xsl-region-before">
<!--.....................................******define
Title in region-before
*****.................................-->
    	  <fo:block>
      		<fo:retrieve-marker
retrieve-class-name="data-title"
          	retrieve-boundary="page-sequence"
          
retrieve-position="first-starting-within-page" />
    	  </fo:block>
<!--.....................................******define
Title in region-before
*****end..............................-->
        </fo:static-content>
      
      
        <fo:static-content
flow-name="xsl-region-after">
          <fo:block font-family="Times"
font-size="20pt" font-weight="bold"
font-style="italic" text-align="right">
          <fo:page-number />     / 	   
<fo:page-number-citation ref-id="16491778" /> 
          </fo:block>
        </fo:static-content >
        
        <fo:static-content
flow-name="xsl-region-start" />
        <fo:static-content flow-name="xsl-region-end"
/>
        
        <fo:flow flow-name="xsl-region-body">
          <fo:block />
          <fo:block start-indent="3cm"
space-before="2.4cm" font-family="Times"
font-size="37pt" font-weight="bold">
            TITLE
          </fo:block>

	
<!--.....................................******
overlap test
*****.................................................-->
	  <!--  CASE 1 : OK
	  <fo:block-container position="absolute" top="2.4cm"
left="4.5cm" height="1cm" width="5cm">
	  	<fo:block>
		TITLE2
		</fo:block>
	  </fo:block-container>
	  -->
	  <!--  CASE 2 : OK -->
	  <xsl:call-template name="overlap"/> 
	  <!--  -->
<!--.....................................******
overlap test *****
end.............................................-->


          <fo:block>
<!--........................................*****start
TITLE in region-before
*****..............................-->
              <fo:marker
marker-class-name="data-title">

                    <fo:block font-weight="bold"
font-style="" font-family="Times" font-size="13pt">
		      NAME-title, 
                      REGION-title, 
                      SALARY-title, 
                      BONUS-title, 
                    </fo:block>
<!--  
.......................................................................................................
  --> 
  		    <xsl:call-template name="dotline" /><!--
decorate -->
                
    		</fo:marker >
              	<fo:block>
                <xsl:apply-templates select="//result"
/> 
                </fo:block>
<!--........................................*****start
TITLE in region-before
*****end...........................-->
          </fo:block>
          <fo:block id="16491778" />
	  <!--  CASE 3 : OK -->
	  <xsl:call-template name="overlap"/> 
	  <!--  -->
        </fo:flow>
      </fo:page-sequence>
    </fo:root>
  </xsl:template> <!--* data *-->
  
  
  <!-- ***************************** -->
  <!--        template mathch        -->
  <!-- ***************************** -->
  <!-- ............................. -->
  <!--        'result'               -->
  <!-- ............................. -->
  
  <xsl:template
match="result"><!--match=data/body/resultset/result-->
              	
  
        <fo:block font-weight="bold"
font-family="Times" font-size="13pt">
          <xsl:value-of select="NAME" /> 
        </fo:block>

        <fo:block font-weight="bold"
font-style="italic" font-family="Times"
font-size="13pt">
          <xsl:value-of select="REGION" />
        </fo:block>

        <fo:block font-weight="bold"
font-style="italic" font-family="Times"
font-size="13pt">
          <xsl:value-of select="SALARY" />
        </fo:block>

        <fo:block font-weight="bold"
font-style="italic" font-family="Times"
font-size="13pt">
          <xsl:value-of select="BONUS" /> 
          
        </fo:block>
    
           <xsl:apply-templates select="SUB/REPEAT"/> 
    
  </xsl:template> 
  
 
   <!-- ............................. -->
   <!--        'REPEAT'               -->
   <!-- ............................. -->
   <xsl:template match="SUB/REPEAT" >

	<fo:block>


 		<xsl:if test='not(preceding-sibling::REPEAT[1])'>
			        <fo:block font-weight="bold" font-style=""
font-family="Times" font-size="10pt">
			          SUB1-title, 
			        </fo:block>

			        <fo:block font-weight="bold"
font-style="italic" font-family="Times"
font-size="10pt">
			          SUB2-title, 
			        </fo:block>

			        <fo:block font-weight="bold"
font-style="italic" font-family="Times"
font-size="10pt">
			          SUB3-title, 
			        </fo:block>

 		</xsl:if>
 		

        	 <fo:block font-weight="bold"
font-style="italic" font-family="Times"
font-size="13pt">
        	   <xsl:value-of select="SUB1" />
        	 </fo:block>

        	 <fo:block font-weight="bold"
font-style="italic" font-family="Times"
font-size="13pt">
        	   <xsl:value-of select="SUB2" />
        	 </fo:block>
        	 
        	 <fo:block font-weight="bold"
font-style="italic" font-family="Times"
font-size="13pt">
        	   <xsl:value-of select="SUB3" /> 
        	 </fo:block>
        	 
     			<xsl:apply-templates
select="REPEATSUB/REPEAT"/> 

	</fo:block>
 
   </xsl:template>

   <!-- ............................. -->
   <!--        'REPEATSUB             -->
   <!-- ............................. -->
   <xsl:template match="REPEATSUB/REPEAT" >

	<fo:block>

 		<xsl:if test='not(preceding-sibling::REPEAT[1])'>
			        <fo:inline font-weight="bold"
font-style="italic" font-family="Times"
font-size="10pt">
			          sub-SUB1-title, 
			        </fo:inline>
			          <xsl:call-template name="space-1"/>
			        <fo:inline font-weight="bold"
font-style="italic" font-family="Times"
font-size="10pt">
			          sub-SUB2-title, 
			        </fo:inline>
			          <xsl:call-template name="space-1"/>
			        <fo:inline font-weight="bold"
font-style="italic" font-family="Times"
font-size="10pt">
			          sub-SUB3-title, 
			        </fo:inline>
			          <xsl:call-template name="space-1"/>
			        <fo:inline font-weight="bold"
font-style="italic" font-family="Times"
font-size="10pt">
			          sub-SUB4-title, 
			        </fo:inline>
			        <fo:block/>
 		</xsl:if>
		
		
		
        	 <fo:inline font-weight="bold"
font-style="italic" font-family="Times"
font-size="13pt">
        	   <xsl:value-of select="SUB1" />
        	 </fo:inline>
		 <xsl:call-template name="space-1"/>
        	 
        	 <fo:inline font-weight="bold"
font-style="italic" font-family="Times"
font-size="13pt">
        	   <xsl:value-of select="SUB2" />
        	 </fo:inline>
		 <xsl:call-template name="space-1"/>

        	 <fo:inline font-weight="bold"
font-style="italic" font-family="Times"
font-size="13pt">
        	   <xsl:value-of select="SUB3" /> 
        	 </fo:inline>
		 <xsl:call-template name="space-1"/>

        	 <!--
*********************************************************************************
-->
        	 <!-- * Here, I want to overlap data with
each other (for example, sub3, sub4)        * -->
        	 <!--
*********************************************************************************
-->
        	 <!-- * Data(i.e (..SUB3, SUB4): (..33,44),
(..33A,44A),(..33B,44B)...ref:data xml.   * -->
        	 <!--
*********************************************************************************
-->
        	 <fo:inline font-weight="bold"
font-style="italic" font-family="Times"
font-size="13pt">

        	   <!-- **
        	   <fo:block-container position='absolute'
top='16cm' left='2cm' height='3in' width='2in'
border='3px solid yellow'>
        	   <fo:block>
        	   ** -->
        	   <xsl:value-of select="SUB4" /> 
        	   <!-- block>
        	   </fo:block-container >-->

        	 </fo:inline>

 		
	</fo:block>
 
   </xsl:template>

<!--
..................................................................call-template
dotline....-->
   <xsl:template name="dotline">
 	<fo:block text-align="left"><!-- decorate -->
  		<fo:leader color="blue" leader-pattern="dots"
leader-length="550pt" /> 
	</fo:block>
   </xsl:template>
<!--
..................................................................call-template
space1.....-->
   <xsl:template name="space-1">
	<fo:leader leader-pattern="space"/>
	<!--<fo:inline
white-space-collapse="false"><fo:character character='
'/></fo:inline>-->
   </xsl:template>
 
<!--
..................................................................call-template
overlap.....-->
   <xsl:template name="overlap">
	<fo:block-container position="absolute" top="2.4cm"
left="4.5cm" height="1cm" width="5cm">
		<fo:block>
		TITLE2
		</fo:block>
	</fo:block-container>
  </xsl:template>
 
 
 
 
</xsl:stylesheet>



2. My data xml file (full)
--------------------
<?xml version="1.0" encoding="UTF-8"?>
<data>
  <body>
    <resultset>
      <result>
        <NAME>PAUL3</NAME>
        <REGION>NS</REGION>
        <SALARY>9878787</SALARY>
        <BONUS>1111</BONUS>
        <SUB>
        	<REPEAT>
        		<SUB1>1111</SUB1>
        		<SUB2>2222</SUB2>
        		<SUB3>3333</SUB3>
        	</REPEAT>
        	<REPEAT>
        		<SUB1>1111A</SUB1>
        		<SUB2>2222A</SUB2>
        		<SUB3>3333A</SUB3>
        	</REPEAT>
        	<REPEAT>
        		<SUB1>1111B</SUB1>
        		<SUB2>2222B</SUB2>
        		<SUB3>3333B</SUB3>
        		<REPEATSUB>
        		
        		<!-- ********************************** -->
        		<!-- I want to overlap data 1 and data2 -->
        		<!-- ********************************** -->
			        <REPEAT>
			        	<SUB1>11</SUB1>
			        	<SUB2>22</SUB2>
			        	<SUB3>33</SUB3><!-- data 1-->
			        	<SUB4>44</SUB4><!-- data 2-->
			        </REPEAT>
			        <REPEAT>
			        	<SUB1>11A</SUB1>
			        	<SUB2>22A</SUB2>
			        	<SUB3>33A</SUB3><!-- data 1-->
			        	<SUB4>44A</SUB4><!-- data 2-->
			        </REPEAT>
			        <REPEAT>
			        	<SUB1>11B</SUB1>
			        	<SUB2>22B</SUB2>
			        	<SUB3>33B</SUB3><!-- data 1-->
			        	<SUB4>44B</SUB4><!-- data 2-->
			        </REPEAT>
			</REPEATSUB>

        	</REPEAT>
        </SUB>
      </result>
      
      <result>
        <NAME>SubTotal</NAME>
        <REGION />
        <SALARY />
        <BONUS>2222</BONUS>
      </result>
      <result>
        <NAME>PAUL4</NAME>
        <REGION>PEI</REGION>
        <SALARY>98732187</SALARY>
        <BONUS>3333</BONUS>
        <SUB>
	        <REPEAT>
	        	<SUB1>1111C</SUB1>
	        	<SUB2>2222C</SUB2>
	        	<SUB3>3333C</SUB3>
	        </REPEAT>
	        <REPEAT>
	        	<SUB1>1111D</SUB1>
	        	<SUB2>2222D</SUB2>
	        	<SUB3>3333D</SUB3>
	        </REPEAT>
	        <REPEAT>
	        	<SUB1>1111E</SUB1>
	        	<SUB2>2222E</SUB2>
	        	<SUB3>3333E</SUB3>
	        </REPEAT>
	</SUB>

      </result>
      <result>
        <NAME>SubTotal</NAME>
        <REGION />
        <SALARY />
        <BONUS>4444</BONUS>
        <SUB>
        	<REPEAT>
        		<SUB1>w111</SUB1>
        		<SUB2>w222</SUB2>
        		<SUB3>w333</SUB3>
        	</REPEAT>
        	<REPEAT>
        		<SUB1>w111A</SUB1>
        		<SUB2>w222A</SUB2>
        		<SUB3>w333A</SUB3>
        	</REPEAT>
        	<REPEAT>
        		<SUB1>w111B</SUB1>
        		<SUB2>w222B</SUB2>
        		<SUB3>w333B</SUB3>
        	</REPEAT>
        </SUB>
      </result>
      <result>
        <NAME>PAUL5 PAUL5 PAUL5 PAUL5 PAUL5 </NAME>
        <REGION>QUEBEC QUEBEC QUEBEC QUEBEC
QUEBEC</REGION>
        <SALARY>5768787</SALARY>
        <BONUS>5555</BONUS>
        <SUB>
        	<REPEAT>
        		<SUB1>x111</SUB1>
        		<SUB2>x222</SUB2>
        		<SUB3>x333</SUB3>
        	</REPEAT>
        	<REPEAT>
        		<SUB1>x111A</SUB1>
        		<SUB2>x222A</SUB2>
        		<SUB3>x333A</SUB3>
        	</REPEAT>
        	<REPEAT>
        		<SUB1>x111B</SUB1>
        		<SUB2>x222B</SUB2>
        		<SUB3>x333B</SUB3>
        	</REPEAT>
        </SUB>
      </result>
      <result>
        <NAME>SubTotal</NAME>
        <REGION />
        <SALARY />
        <BONUS>6666</BONUS>
        <SUB>
        	<REPEAT>
        		<SUB1>y111</SUB1>
        		<SUB2>y222</SUB2>
        		<SUB3>y333</SUB3>
        	</REPEAT>
        	<REPEAT>
        		<SUB1>y111A</SUB1>
        		<SUB2>y222A</SUB2>
        		<SUB3>y333A</SUB3>
        	</REPEAT>
        	<REPEAT>
        		<SUB1>y111B</SUB1>
        		<SUB2>y222B</SUB2>
        		<SUB3>y333B</SUB3>
        	</REPEAT>
        </SUB>
      </result>
      <result>
        <NAME>SubTotal</NAME>
        <REGION/>
        <SALARY />
        <BONUS>7777</BONUS>
        <SUB>
        	<REPEAT>
        		<SUB1>z111</SUB1>
        		<SUB2>z222</SUB2>
        		<SUB3>z333</SUB3>
        	</REPEAT>
        	<REPEAT>
        		<SUB1>z111A</SUB1>
        		<SUB2>z222A</SUB2>
        		<SUB3>z333A</SUB3>
        	</REPEAT>
        	<REPEAT>
        		<SUB1>z111B</SUB1>
        		<SUB2>z222B</SUB2>
        		<SUB3>z333B</SUB3>
        	</REPEAT>
        </SUB>
      </result>
      <total>
        <BONUS>6578752</BONUS>
      </total>
    </resultset>
  </body>
</data>


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


RE: Overlapping Data?

Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: David Kim [mailto:xmlcorba@yahoo.ca]
>

Hi David,

> And while I was testing, I found limitation of
> <fo:block-container> in FOP.
> When I put the code under other tag(s) (i.e even
> block), I got an error like follow,
>
> -- follow (summary)--
> tag-name      :<fo:block-container>
> FOP limitation:FOP says that it should be 'direct'
> child of flow.
> Error         :'[ERROR] java.lang.ClassCastException'

Well, that is indeed a FOP-specific limitation (for FOP 0.20.5).

All I can say is that in the current development version, the example file
that comes with FOP --you can find it in your own FOP-dir under
'examples/fo/basic/blockcontainer.fo'-- which contains a number of
fo:block-containers that aren't direct children of the fo:flow, is rendered
without errors.

If you feel like it, check out the trunk from CVS, and report questions or
errors back to fop-dev. Any help testing the development code with real
world examples will be much appreciated, just don't expect miracles from it
yet, and don't expect fop-dev to immediately correct any problems --all in
due time :-)

> -- My problem --
> In my case, if xml data tags are overlapped each other
> in xsl(i.e GUI), I want to display itself(overlapped
> data) in pdf.
> In order to do that, I think it should be able to be
> used wherever data are displayed. Is there any other
> way?.
> (For example, template --> template -->template ..
> overlapped data..)

I think your problem shouldn't be a problem at all --in theory, but I don't
know *exactly* what your FO code looks like...

If you can post a small sample --not the XSL code itself, but rather the
result of the XSL transformation-- I'd be happy to take a closer look.


HTH!

Greetz,

Andreas


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