Hi mates !

That's crazy, I was trying today to implement the <fo:marker> tag to solve 
my title problem, running fop-0.20.4, but I had NullPointerException at 
runtime (see bellow). I was about to write you one of my "borring mail" ;) 
but I decided to try with the new 0.20.5rc2 before annoying you... 

I tested on my workstation (using .bat in debug mode), ok, then I put 
(please notice the right use of the irregular verb, thanks to J.Pietschmann ;)) 
this 0.20.5rc2 in our apache/tomcat server and it's 
working perfectly with this version of fop !

I have no more problem... 

I pasted the mail I was writing before trying the rc2 bellow ! I hope 
that's not totally useless, if that's the case, just excuse me (again) for 
posting.

In fact, it stays one question... How can I test the value of a 
<fo:retrieve-marker retrieve-class-name="theme" /> tag (I understood now 
that it is not evaluated by the same process than the xsl stylesheet) ? 

I have to write a border with text from top to bottom, and the 
'writing-mode' properties is not implemented yet, so I just want to use a 
graphic to do that, but I need to test the marker value to choose the 
right graphic. 

Is that possible, or should I use something like another XSL 
transformation to put a &#160; after each character ?

Thanks again mates, I hope I'll be able to help people here like you help 
me soon.

Simon


----------------------------------------------------------------------------------------
-- Example of <fo:marker> usage working with 0.20.5rc2 but not with 0.20.4 
!
----------------------------------------------------------------------------------------

Here's the extracts from my xsl stylesheet :

My page sequence :

<fo:page-sequence-master master-name="document">
  <fo:repeatable-page-master-alternatives>
    <fo:conditional-page-master-reference odd-or-even="even" 
master-reference="even"/>
    <fo:conditional-page-master-reference odd-or-even="odd" 
master-reference="odd"/>
  </fo:repeatable-page-master-alternatives>
</fo:page-sequence-master>

My static content on the even pages :

<fo:static-content flow-name="margin-even">
  <fo:table table-layout="fixed">
    <fo:table-column column-width="6mm" />
    <fo:table-body>
      <fo:table-row height="297mm">
        <fo:table-cell border-style="solid" border-width="0pt" 
background-color="#CECCCB">
          <fo:block>
            <fo:retrieve-marker retrieve-class-name="theme" />
          </fo:block> 
        </fo:table-cell>
      </fo:table-row>
    </fo:table-body>
  </fo:table>
</fo:static-content>

Here's my body :

<fo:flow flow-name="xsl-region-body">
  <xsl:apply-templates select="FICHE">
    <xsl:sort select="SOUSTHEME" />
  </xsl:apply-templates>
</fo:flow> 

In my FICHE template, I have this tag for all titles : 
<xsl:apply-templates select="TITRE" />.
This is the template where I set the <fo:marker> to the current TITLE :

<xsl:template match="TITRE">
  <fo:marker marker-class-name="theme">
       <fo:block>
         <xsl:value-of select="."/> 
       </fo:block>
  </fo:marker>
  <fo:block font-size="13pt" 
            border-style="solid" 
            border-width="0pt"
            font-family="Helvetica Black"
            text-align="end"
            color="white">
    <xsl:value-of select="." />
  </fo:block>
  <xsl:apply-templates />
</xsl:template>


Here's the error returned by Tomcat in run mode :

java.lang.RuntimeException: java.lang.NullPointerException
        at 
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3231)
        at java.lang.Thread.run(Thread.java:484)

I am currently running FOP 0.20.4 with the 1.3.1_04 JDK.

Many thanks for your help, I hope I was clear enought.

Simon


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

Reply via email to