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 "Andreas L. Delmelle" <a_...@pandora.be> on 2003/08/14 00:06:30 UTC

FW: Annoying 'ArrayIndexOutOfBoundsException'? - Progress??

OK, seems to work just fine with the projectteam xml/xsl example that comes
with the fop release, so I guess I need to run a few tests with my xml/xsl
combo...

( I have a vague feeling it will turn out to be a ridiculously small detail
I've overlooked, so I'll definitely share it with you guys - if I succeed in
finding it... ;-) )

BTW: can anybody point me to a download location for the 1.4.1_03? (
'java -version' tells me current version is '1.4.1_01' )
Been looking w.o. success. Doesn't seem to be available from Apple Developer
Connection, and I'm not sure whether any of the SDK's available from Sun's
website will run properly... ( theoretically, I guess one of the
unix-versions should run. I might have a go at it in the near future, but if
anyone of you is sure, perhaps this could save me some trouble. )

Greetz,

Andreas Delmelle

-----Original Message-----
From: Andreas L. Delmelle [mailto:a_l.delmelle@pandora.be]
Sent: woensdag 13 augustus 2003 23:20
To: fop-user@xml.apache.org
Subject: FW: Annoying 'ArrayIndexOutOfBoundsException'?



Doesn't solve the problem...

Going to try a few things I probably should have tried first ( like
rendering a very basic .fo; perhaps
the problem lies in my xml or xsl ). Will keep you updated if I get anything
new.

Greetz,

Andreas Delmelle

-----Original Message-----
From: Andreas L. Delmelle [mailto:a_l.delmelle@pandora.be]
Sent: woensdag 13 augustus 2003 22:54
To: fop-user@xml.apache.org
Subject: RE: Annoying 'ArrayIndexOutOfBoundsException'?


> You have JDK 1.4 installed?

Yup! ( 1.4.1 is currently the latest release afaik )

Get the most recent release, or get
> the most recent Xalan and install the jar in the lib/endorsed
> directory of the JDK.

Thought I did ( 2.4.1, distributed with fop 0.20.5 ), but going to try 2.5.1
...


Thx for the input.

Greetz,

Andreas Delmelle



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




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




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


RE: FW: Annoying 'ArrayIndexOutOfBoundsException'? - Progress??

Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
Thx for the warning ( & the news about the upcoming update )!

Respect,

Andreas

-----Original Message-----
From: Ben Galbraith [mailto:bgalbraith@amirsys.com]
Sent: donderdag 14 augustus 2003 0:23
To: fop-user@xml.apache.org
Subject: Re: FW: Annoying 'ArrayIndexOutOfBoundsException'? - Progress??


Andreas L. Delmelle wrote:
> BTW: can anybody point me to a download location for the 1.4.1_03? (
> 'java -version' tells me current version is '1.4.1_01' )
> Been looking w.o. success. Doesn't seem to be available from Apple
Developer
> Connection, and I'm not sure whether any of the SDK's available from Sun's
> website will run properly... ( theoretically, I guess one of the
> unix-versions should run. I might have a go at it in the near future, but
if
> anyone of you is sure, perhaps this could save me some trouble. )

No no no.  Apple uses the PowerPC architecture.  Sun's distros are
compiled for Intel's architecture.  Apple manufactures its own JDK, and
it's *considerably* different than Sun's in many details.

You might check out Apple's developer website, but otherwise, if the
update ain't in Software Update, it's probably not available.  It took
*ages* for Apple to release a 1.4 implementation (over a year after Sun,
maybe two years; I forget), but I've heard that they've restructured
their code to be able to track Sun within weeks.  So look for a 1.4.2 in
the coming months.

Ben



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




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


Re: FW: Annoying 'ArrayIndexOutOfBoundsException'? - Progress??

Posted by Ben Galbraith <bg...@amirsys.com>.
Andreas L. Delmelle wrote:
> BTW: can anybody point me to a download location for the 1.4.1_03? (
> 'java -version' tells me current version is '1.4.1_01' )
> Been looking w.o. success. Doesn't seem to be available from Apple Developer
> Connection, and I'm not sure whether any of the SDK's available from Sun's
> website will run properly... ( theoretically, I guess one of the
> unix-versions should run. I might have a go at it in the near future, but if
> anyone of you is sure, perhaps this could save me some trouble. )

No no no.  Apple uses the PowerPC architecture.  Sun's distros are 
compiled for Intel's architecture.  Apple manufactures its own JDK, and 
it's *considerably* different than Sun's in many details.

You might check out Apple's developer website, but otherwise, if the 
update ain't in Software Update, it's probably not available.  It took 
*ages* for Apple to release a 1.4 implementation (over a year after Sun, 
maybe two years; I forget), but I've heard that they've restructured 
their code to be able to track Sun within weeks.  So look for a 1.4.2 in 
the coming months.

Ben



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


RE: FW: Annoying 'ArrayIndexOutOfBoundsException'? - Progress??

Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
just to let you know, this did indeed solve the problem.

everything up & running on the mac : powered by ... apache!

greetz,

ald

-----Original Message-----
From: J.Pietschmann [mailto:j3322ptm@yahoo.de]
Sent: donderdag 14 augustus 2003 21:03
To: fop-user@xml.apache.org
Subject: Re: FW: Annoying 'ArrayIndexOutOfBoundsException'? - Progress??


Andreas L. Delmelle wrote:
> the xml contains the employer data and some general info (once) and the
data
> from each employees' salary, and I have it structured like :
>
> <employer ref="999999">
> 	<name>...</name>
> 	<addr>...</addr>
> ...
> </employer>
> <general>
> 	<date-printed>14-08-2003</date-printed>
> 	... [ some other info ]
> </general>
>
> <employee ref="0000001">
> 	<name>...</name>
> 	...
> </employee>
...
> Now, what happens is that the data from the employer-element and the
> general-element appear untagged in the .fo, right between the <fo:flow>
and
> the first <fo:block> (actually it's a <fo:table>).

Sounds like you have something like
  <xsl:template match="parent-of-employer-and-general-and-employees">
     <fo:flow>
         <xsl:apply-templates>
     </fo:flow>
  </xsl:template>

  <xsl:template match="employee">
    ...

You probably want the first template to be
  <xsl:template match="parent-of-employer-and-general-and-employees">
     <fo:flow>
         <xsl:apply-templates select="employee">
                              ^^^^^^^^^^^^^^^^^^
          ...
See
  http://www.w3.org/TR/xslt#built-in-rule
why this is so.

> Another weird detail (maybe there's a perfectly valid explanation):
although
> the xslt and xml have the "ISO-8859-1" encoding, the resulting .fo is
> "UTF-8"-encoded.

Why do you think this is weird? Read what the spec tells you about
the default output encoding:
   http://www.w3.org/TR/xslt#section-XML-Output-Method

For these kind of questions, reagarding pure XSLT, you should ask on
the XSL list:
  http://www.mulberrytech.com/xsl/xsl-list/

J.Pietschmann



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




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


RE: FW: Annoying 'ArrayIndexOutOfBoundsException'? - Progress??

Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> You probably want the first template to be
>  <xsl:template match="parent-of-employer-and-general-and-employees">
>    <fo:flow>
>         <xsl:apply-templates select="employee">
>                              ^^^^^^^^^^^^^^^^^^
>          ...
> See
>  http://www.w3.org/TR/xslt#built-in-rule
> why this is so.

Indeed, this is exactly what I'm thinking... Already thought about this a
few weeks ago, but only now does it seem really necessary ( still funny that
it produced the desired result on the m$-platform, or does this have to do
with the xalan version? )

>> Another weird detail (maybe there's a perfectly valid explanation):
although
>> the xslt and xml have the "ISO-8859-1" encoding, the resulting .fo is
>> "UTF-8"-encoded.

> Why do you think this is weird? Read what the spec tells you about
> the default output encoding:
>   http://www.w3.org/TR/xslt#section-XML-Output-Method

Didn't know this at all... probably because I haven't used a 'pure' xml/xslt
to fo transformation before ( so this was happening all the time, but since
I never really paid much attention to the intermediate .fo, I never
noticed. )

> For these kind of questions, reagarding pure XSLT, you should ask on
> the XSL list:
>  http://www.mulberrytech.com/xsl/xsl-list/

Again, my thanks for the info!

Greetz,

Andreas Delmelle

ps : Most agree that l-o-v-e is the primary motor in life. Take it from me,
the second one is named ... A-p-p-l-e!
( On what machine can one watch a dvd one moment - in less than five seconds
... for the first time -, and a few seconds later edit a tcsh-script with
vi? Only on mac, I guess... The future is now! If you ever have some spare
cash left & are not sure what to do with it, don't hesitate... )


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


Re: FW: Annoying 'ArrayIndexOutOfBoundsException'? - Progress??

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Andreas L. Delmelle wrote:
> the xml contains the employer data and some general info (once) and the data
> from each employees' salary, and I have it structured like :
> 
> <employer ref="999999">
> 	<name>...</name>
> 	<addr>...</addr>
> ...
> </employer>
> <general>
> 	<date-printed>14-08-2003</date-printed>
> 	... [ some other info ]
> </general>
> 
> <employee ref="0000001">
> 	<name>...</name>
> 	...
> </employee>
...
> Now, what happens is that the data from the employer-element and the
> general-element appear untagged in the .fo, right between the <fo:flow> and
> the first <fo:block> (actually it's a <fo:table>).

Sounds like you have something like
  <xsl:template match="parent-of-employer-and-general-and-employees">
     <fo:flow>
         <xsl:apply-templates>
     </fo:flow>
  </xsl:template>

  <xsl:template match="employee">
    ...

You probably want the first template to be
  <xsl:template match="parent-of-employer-and-general-and-employees">
     <fo:flow>
         <xsl:apply-templates select="employee">
                              ^^^^^^^^^^^^^^^^^^
          ...
See
  http://www.w3.org/TR/xslt#built-in-rule
why this is so.

> Another weird detail (maybe there's a perfectly valid explanation): although
> the xslt and xml have the "ISO-8859-1" encoding, the resulting .fo is
> "UTF-8"-encoded.

Why do you think this is weird? Read what the spec tells you about
the default output encoding:
   http://www.w3.org/TR/xslt#section-XML-Output-Method

For these kind of questions, reagarding pure XSLT, you should ask on
the XSL list:
  http://www.mulberrytech.com/xsl/xsl-list/

J.Pietschmann



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


RE: FW: Annoying 'ArrayIndexOutOfBoundsException'? - Progress??

Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
Well, the latest Xalan ( 2.5.1 ) is in place, and when I run its
EnvironmentCheck, everything seems to be ok (in fact, even more than ok, but
maybe this is just a gimmick from the Xalan-developers :-) ). So this
already works.
The problem itself isn't solved though... I made the transformation with
Xalan, to have a look at the intermediate .fo, and now at least I see what's
causing the exception.

Here's a short description :

think of the xslt as a template for payslips, and it should produce a single
pdf per employer (or per group of employees)
the xml contains the employer data and some general info (once) and the data
from each employees' salary, and I have it structured like :

<employer ref="999999">
	<name>...</name>
	<addr>...</addr>
...
</employer>
<general>
	<date-printed>14-08-2003</date-printed>
	... [ some other info ]
</general>

<employee ref="0000001">
	<name>...</name>
	...
</employee>
<employee ref="0000002">
	<name>...</name>
	...
</employee>

Now, what happens is that the data from the employer-element and the
general-element appear untagged in the .fo, right between the <fo:flow> and
the first <fo:block> (actually it's a <fo:table>). The rest of the .fo seems
to be quite correct and ready to be fed to fop.
It's very likely that the problem would solve itself if I redesigned the
xslt and dtd, but it remains curious that this structure worked just fine on
win2k...

Another weird detail (maybe there's a perfectly valid explanation): although
the xslt and xml have the "ISO-8859-1" encoding, the resulting .fo is
"UTF-8"-encoded.

The search continues...

Cheerz,

Andreas Delmelle

-----Original Message-----
From: J.Pietschmann [mailto:j3322ptm@yahoo.de]
Sent: donderdag 14 augustus 2003 1:17
To: fop-user@xml.apache.org
Subject: Re: FW: Annoying 'ArrayIndexOutOfBoundsException'? - Progress??


Andreas L. Delmelle wrote:
> ( I have a vague feeling it will turn out to be a ridiculously small
detail
> I've overlooked, so I'll definitely share it with you guys - if I succeed
in
> finding it... ;-) )
>
Google a bit for something like "Java endorsed libs".
Look where your JRE stores the big RT jars (like, ahem, rt.jar).
Check $JAVA_HOME/lib first. Create a directory called 'endorsed'
there, unless it already exists. Grab the newest Xalan jar
and put it there. You should be set, if Apple followed the same
architecture as Sun. If this isn't the case, check your JVM's
docs on how to add a jar to the bootclasspath, and apply this
to said newest Xalan jar.

On most lists dealing with Java+XSLT this is a VFAQ. I think
the Cocoon docs have a quite extensive treatment.

J.Pietschmann


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




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


Re: FW: Annoying 'ArrayIndexOutOfBoundsException'? - Progress??

Posted by "J.Pietschmann" <j3...@yahoo.de>.
Andreas L. Delmelle wrote:
> ( I have a vague feeling it will turn out to be a ridiculously small detail
> I've overlooked, so I'll definitely share it with you guys - if I succeed in
> finding it... ;-) )
> 
Google a bit for something like "Java endorsed libs".
Look where your JRE stores the big RT jars (like, ahem, rt.jar).
Check $JAVA_HOME/lib first. Create a directory called 'endorsed'
there, unless it already exists. Grab the newest Xalan jar
and put it there. You should be set, if Apple followed the same
architecture as Sun. If this isn't the case, check your JVM's
docs on how to add a jar to the bootclasspath, and apply this
to said newest Xalan jar.

On most lists dealing with Java+XSLT this is a VFAQ. I think
the Cocoon docs have a quite extensive treatment.

J.Pietschmann


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