RE: br in XSLFO

2005-03-29 Thread Andreas L. Delmelle
 -Original Message-
 From: Gang Li [mailto:[EMAIL PROTECTED]


Hi,

 Anybody know how can I get a line break like br in HTML? Thanks.

Ending the current fo:block should work fine... Another option would be to
insert an explicit line-feed character
(numeric character reference #x0A; [*]), although in some cases, this might
get converted into a space.

I'd go with the first option... I'm guessing, right now, you're trying to do
sth like:

fo:block
  some text goes here !-- here you need br / --
  some other text
/fo:block

So, the simplest would be to make it

fo:blocksome text goes here/fo:block
fo:blocksome other text/fo:block

The second option would be

fo:blocksome text goes here #x0A; some other text/fo:block



HTH!

Andreas

[*] http://xml.apache.org/fop/fo.html#xml-special-chars


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



RE: Article in JAVAWORLD.

2005-03-28 Thread Andreas L. Delmelle
 -Original Message-
 From: Glen Mazza [mailto:[EMAIL PROTECTED]
 

snip /

 FOP can really do Japanese?  I didn't know that. 
 Anyway--well done!  

I second that. I don't remember personally helping Manoj out, but anyway:

Big THANKS for the publicity!

Greetz,

Andreas


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



RE: How can I rotate text for a 90o sidebar?

2005-03-27 Thread Andreas L. Delmelle
 -Original Message-
 From: Tommy Reynolds [mailto:[EMAIL PROTECTED]


Hi,

 I'm trying to insert some text into xsl-region-start and I'd
 like it rotated 90-degrees to you'd have to tilt your head
 sideways to read it.  I think the reference-orientation
 property is the right approach but it isn't implemented in FOP.

 Is there a work-around?

The only workaround I know of would be to use SVG to draw the rotated
text...


HTH!

Greetz,

Andreas


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



RE: encoding space in xsl:fo

2005-03-23 Thread Andreas L. Delmelle
 -Original Message-
 From: Peter B. West [mailto:[EMAIL PROTECTED]

 If you are on a linux system, man utf-8 explains it well.  The Unicode
 manual has an appendix on transformations, which is probably available
 online.

snip /

Big 'THANKS' for the clarification! (Although I should've been able to come
up with that myself... Well, too early for you, way past midnight for me :-)


Greetz,

Andreas


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



RE: Embedding texts with different font size in a block...

2005-03-23 Thread Andreas L. Delmelle
 -Original Message-
 From: Patrick JUSSEAU [mailto:[EMAIL PROTECTED]


Hi,

 I would like to put, on the same line, several texts
 that have different font sizes. For example the word
 BIG in 60pt followed by the word SMALL in 40pt.
 The following FO code does not completely work since
 the text baseline is vertically centered in the parent
 block section and therefore the text gets out above
 the block!

If I get the problem correctly, the 'display-align' property[1] would solve
a lot of your problems, but... in FOP 0.20.5 it was only partially
implemented, and works only on table-cells and block-containers (not regular
blocks).

Should be enough to offer you a quite straightforward workaround though...

HTH!

Greetz,

Andreas

[1] http://www.w3.org/TR/xsl/slice7.html#display-align


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



RE: encoding space in xsl:fo

2005-03-22 Thread Andreas L. Delmelle
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

Hi,

 I set xsl:output encoding=ISO-8859-1/ in my xsl as encoding
 output but on a window system   is rendered as a space ; on unix
 system    is rendered as A^ (unique character)
 It look like the mapping is dependent by system.
 Possible?

In order to know for sure, a few more questions:

- Which JVMs are you using? (Which version on Windows, which one on Linux?)
- Are you using the same XSLT processor on both platforms? If so, is it the
same version? If not, maybe one of them doesn't fully support
xsl:output-encoding / (as I recall, it is not mandatory according to the
XSLT Spec.)

I'd also try posting this question on Xalan's user-list. If both XSLT
processors are Xalan, their development team is far more likely to offer you
an explanation...

Greetz,

Andreas


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



RE: Build FOP

2005-03-22 Thread Andreas L. Delmelle
 -Original Message-
 From: Gang Li [mailto:[EMAIL PROTECTED]


Hi,

 Dumb question asked again and again.

Reminds me of a saying:
There are no dumb questions, there are only dumb answers.
Sure, there *are* silly questions, but yours does not strike me as 'silly'.

Anyway...

 But I seem to have problems rebuilding 0.20.5 source code.
 Following is the error message I got.
...
 BUILD FAILED
 file:C:/AppDown/fop-0.20.5/build.xml:438:
 java.lang.ClassNotFoundException:
 org.apache.tools.ant.taskdefs.optional.TraXLiaison

It definitely seems to be a (version-)problem with Ant.
Which version of Ant are you using to perform the build? (A bit of browsing
leads me to conclude that for older versions --pre 1.5-- there was no
'TraXLiaison' taskdef.)

HTH!

Greetz,

Andreas


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



RE: Build FOP

2005-03-22 Thread Andreas L. Delmelle
 -Original Message-
 From: Andreas L. Delmelle [mailto:[EMAIL PROTECTED]

  java.lang.ClassNotFoundException:
  org.apache.tools.ant.taskdefs.optional.TraXLiaison
 
 (A bit of browsing leads me to conclude that for older 
 versions --pre 1.5-- there was no 'TraXLiaison' taskdef.)

Correction: there was, since 1.3.

AD

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



RE: Build FOP

2005-03-22 Thread Andreas L. Delmelle
 -Original Message-
 From: Gang Li [mailto:[EMAIL PROTECTED]


Hi,

 I thought it was an ANT problem. I am using ant 1.6.2 but the ant coming
 with source code and binary distribution is ant1.5.1. I didn't modify
 any of the build files (build.bat and build.xml) though I checked and
 made sure the files are under the right folder.

Just making sure: so you *are* using build.bat, and not your own version of
Ant?

In that case, well...
How exactly are you trying to add support for the 'Bookman Old Style' font?
It almosts seems like you want to have it compiled in in some way, and
you're trying to use the Base14 fonts as an example --correct?

Greetz,

Andreas


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



RE: Build FOP

2005-03-22 Thread Andreas L. Delmelle
 -Original Message-
 From: Gang Li [mailto:[EMAIL PROTECTED]
 
 Well, I just started on rebuilding FOP source code. Nothing has been
 done with fonts yet. Here is what I am going to do.

Ah, ok. (Phew! For a moment, things seemed needlessly complicated)

The build problem could be related to this FAQ:
http://ant.apache.org/faq.html#delegating-classloader



HTH!

Greetz,

Andreas

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



RE: encoding space in xsl:fo

2005-03-22 Thread Andreas L. Delmelle
 -Original Message-
 From: Peter B. West [mailto:[EMAIL PROTECTED]


Hi Peter,

 #160; is A0 in hex; 1100  in binary.

Slight adjustment... 160 = 2^7 + 2^5, so 1010 ? (Fresh out of bed, ay?
;-))

I was thinking along the same lines, but haven't discovered the mapping
yet...

 When this value is represented in UTF-8, it becomes
 the two-byte sequence

How exactly?

Greetz,

Andreas


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



RE: fop with lenya: how can I suppress the lenya:meta in a created pdf

2005-03-16 Thread Andreas L. Delmelle
 -Original Message-
 From: Sascha Teifke [mailto:[EMAIL PROTECTED]


Hi,

(*sigh*... Glen's right, you know. Question is actually more suited for
Mulberry, but here we go anyway...)

Normally, to keep the lenya:meta element from appearing in the ouput, all
you need to do is add an empty template like so:

xsl:template match=lenya:meta
xmlns:lenya=http://apache.org/cocoon/lenya/page-envelope/1.0; /

However, you will still run into trouble, since your source document is in
the XHTML namespace, and you only have templates for nodes that are in no
namespace...

 ?xml version=1.0 encoding=iso-8859-1?
 xsl:stylesheet
 xmlns:xsl=http://www.w3.org/1999/XSL/Transform; version=1.0
 xmlns:fo=http://www.w3.org/1999/XSL/Format;

You want to add these bindings:
  xmlns:h=http://www.w3.org/1999/xhtml;
  xmlns:lenya=http://apache.org/cocoon/lenya/page-envelope/1.0;

and to keep those namespaces from being repeated in the result:
  exclude-result-prefixes=h lenya
  

Then, the templates need to be slightly adjusted:

 xsl:template match=h:p
...
 xsl:template match=h:meta
...
 xsl:template match=h:s1
...
And an empty template:
  xsl:template match=lenya:meta /

Should work...

HTH!

Greetz,

Andreas


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



RE: text-indent issue

2005-03-16 Thread Andreas L. Delmelle
 -Original Message-
 From: Puppala, Kumar (LNG-DAY) [mailto:[EMAIL PROTECTED]

 Can anyone direct me to the code where I can prevent inheritance of the
 text-indent property in the scenario mentioned below?

I can point you to the code:

{your-fop-dir}/src/org/apache/fop/fo/flow/Block.java


Unfortunately, I have no precise idea on what exactly needs to be done to
solve your problem... My best guess is that it has something to do with the
'anythingLaidOut' member variable, so I'd start off by watching closely what
happens to that variable when a nested block is added...

HTH!

Greetz,

Andreas


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



RE: following

2005-03-14 Thread Andreas L. Delmelle
 -Original Message-
 From: Vojko [mailto:[EMAIL PROTECTED]


Hi,

For starters, since you already posted a purely XSLT-related question
yesterday:
Questions like these do not really belong on fop-user... Should be posted on
Mulberry (look on the FOP resources page)

Now, since I am weak and can't help but help you out here... (but if you try
to exploit that weakness one more time, you're on your own --no offence)

 Is there a way that I could call the next and previous chapter not by
 its name but by a generic function? Something like following node...so
 that I would know what is the next chapter and previous from the current
 one.

How about:

xsl:apply-templates select=preceding::chapter /
xsl:apply-templates select=following::chapter /

HTH!

Andreas


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



RE: Why xmlgraphics?

2005-03-14 Thread Andreas L. Delmelle
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]


Hi Jay,

 Hint received.

 However, I am too busy using it to spend any time developing it.

Well, it's not *only* a question of developing... What you are doing, for
example, by answering questions of other users already helps fop-dev a great
deal.

(Although I am officially fop-dev, lately, I don't have that much time to
spend on actually delving into the sources and fix problems, but I still try
to pop in and offer users a solution when I see the opportunity...)

Thanks for that!

Greetz,

Andreas


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



RE: calling specific XML child element

2005-03-13 Thread Andreas L. Delmelle
 -Original Message-
 From: Vojko Kercan @ Dhimahi [mailto:[EMAIL PROTECTED]


Hi,

 What is the method to call a specific child element...for example...I
 want to call in XSL value of root/h2 which is value h2? How is this
 done?

The following inserts the value of that element in the result tree:

xsl:value-of select=/root/h2 /

If your intention is to use what is an element value in the source tree as
an attribute value in the result tree, something like the following can be
used:

h2 val={/root/h2} /


HTH!

Andreas


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



RE: Problem with CDATA in the input XML-file

2005-03-04 Thread Andreas L. Delmelle
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

Hi,

 Everything works fine but I have one problem.

 1. I have a XML-file where some entity values is marked with CDATA
 ..
 helpText![CDATA[Some #¤%/()]]/helpText

That needs to be

![CDATA[...]]

(mind the markup! :-) )

Greetz,

Andreas


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



RE: [Newbie] html+svg+css to pdf workflow

2005-01-26 Thread Andreas L. Delmelle
 -Original Message-
 From: Eckbert P.Dollhofer [mailto:[EMAIL PROTECTED]
  
  Yeah! We like those :-)

Hi,

 So where can I find any hints to do

 HTML+CSS+SVG - XML-FO - PDF
|-- HTML with Bitmaps

 Or if this is to clumsy create the Layout in XML-FO and do

 XML-FO - PDF
  |- HTML with SVG
  |-- HTML with bitmaps


If the above is an option, maybe the following is also feasible (?)

Base XML (plain XML, no FO here)
  + plain XSLT templates - (via TrAX) HTML with SVG/Bitmaps
  + XSL-FO templates - (via TrAX through FOP) PDF with SVG

XSLT offers the possibility of outputting HTML (or plain text for that
matter) instead of XML, and it is, generally speaking, very much easier and
more straightforward to implement a transform from XML to HTML than it is to
go the other way around, since the HTML needs to be 'tidied' before it can
be used in an XML app (--unless the input is XHTML, of course...)
On top of that, coding a stylesheet to transform (X)HTML input to a given
XML structure is usually a bit of a pain, since you can basically only
distinguish two p elements either by looking at the content, or by looking
at their position in relation to another element. Since in XSLT, one defines
templates for sets of nodes satisfying a given set of conditions, if the
source is XHTML, one generally finds oneself either writing separate
templates for each different p element in the source, or writing one huge
template for all of them with a lot
xsl:if/xsl:choose/xsl:when/xsl:otherwise.
In XML *you* have control over what the 'tags' (better: 'element names')
stand for. If you choose them while keeping in mind that you yourself are
going to be designing the stylesheet --if that is the case--, you can avoid
a lot of difficulties and ambiguities in advance (e.g. it becomes much
easier to 'pull' the desired XML nodes you need out of the source and apply
their respective templates to them, as opposed to merely 'pushing' the
source tree as a whole through the templates and hoping that the match
patterns for the templates suffice to sort out the rest)

Countless possibilities, but in the end, all depends on your actual
constraints, I guess... To what extent are the framework, input and output
currently already 'fixed' --in the sense of: 'not permitted to change'?


Greetz,

Andreas


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



RE: first-including-carryover behavior?

2005-01-24 Thread Andreas L. Delmelle
 -Original Message-
 From: David P. Nesbitt [mailto:[EMAIL PROTECTED]


Hi,

snip /
 Does FOP fully support first-including-carryover?

Hmm... The compliance page(*) indicates that the support for properties for
markers isn't complete, so I'd guess not.

(*) http://xml.apache.org/fop/compliance.html#fo-property-markers


Greetz,

Andreas


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



RE: first-including-carryover behavior?

2005-01-24 Thread Andreas L. Delmelle
 -Original Message-
 From: David P. Nesbitt [mailto:[EMAIL PROTECTED]


Hi David,

 Thanks for the clarification.  Believe it or not, I
 did look at the compliance page, but I only looked at
 the retrieve-marker formatting object support (6.11.4)
 shows extended support.

Yeah, I know... Same here --occurred to me just in time to look a bit
further down at the properties :-)

Still re-reading the related parts of the spec closely to try and understand
the requirements myself...

 I am interested in getting involved to add this
 support for the retrieve-position property.  How can I
 get involved?

First of all, check: http://xml.apache.org/fop/dev/index.html

Very important: development on FOP's maintenance branch (0.20.X) is frozen,
so if you're really serious about creating patches, you definitely want to
checkout the HEAD branch from CVS (= trunk development line ~1.0dev) and
delve into those sources --don't get too discouraged, as compliance is still
not near the level of 0.20.X, but it's definitely moving in the right
direction. Every helping hand is welcome!

Besides that... keep fop-dev informed about your progress, so join
[EMAIL PROTECTED] Also, feel free to post questions there about the
design --if they're not answered in the docs, on the website or in the
archive. Finally, when you think you have a working patch, enter it via a
Bugzilla report (+ maybe an accompanying e-mail to fop-dev with a short
description of the 'how-and-why'). If the team is happy, etc.

That's about it, I guess... Plain and simple.

If you have any other specific questions, just give us a yell.

Greetz,

Andreas


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



RE: Need a little help

2005-01-24 Thread Andreas L. Delmelle
 -Original Message-
 From: Luke Shannon [mailto:[EMAIL PROTECTED]


Hi Luke,

 Everything looks good except that my header is no
 longer showing up. I am not catching any errors
 thrown when FOP renders the PDF.
 I can't figure out why it is not being shown.

The cause seems to be here:
 fo:external-graphic
 src=url(file:///usr/tomcat/ac/images/topbanner/nakheel_BL_pdf_panel.gif)
 height=2.47cm width=20cm scaling=uniform /


IIRC that should be either:

  src=url('file:///...') (mind the quotes!)

or

  src=file:///...


HTH!

Greetz,

Andreas


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



RE: Need a little help

2005-01-24 Thread Andreas L. Delmelle
 -Original Message-
 From: Luke Shannon [mailto:[EMAIL PROTECTED]

 Thanks, I added single quotes, not sure how that was overlooked. Anyway
 still no header.

How are you running FOP? Command line? If so, have you tried the '-d' option
to turn on debugging... If you're running embedded, you can pass in a more
detailed log level (see:
http://xml.apache.org/fop/embedding.html#basic-logging )

Maybe that will give us more info?

HTH!

Greetz,

Andreas


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



RE: Need a little help

2005-01-24 Thread Andreas L. Delmelle
 -Original Message-
 From: Glen Mazza [mailto:[EMAIL PROTECTED]
 
 I may be missing something here, but shouldn't the
 flow-name be xsl-region-before[1]?
 

Nope! Dmmn' Right! :-P

Good catch.

Greetz,

Andreas


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



RE: FOP to SVG not including character references in conversion.

2005-01-18 Thread Andreas L. Delmelle
 -Original Message-
 From: Dave Austin [mailto:[EMAIL PROTECTED]


Hi,

 I am generating FO files from RTF files with a handy utility called
 RTF2FO.  I set the character encoding to ISO-8859-1 for linux.

 I have several character references in the FO file. For instance,
 #8226; is embedded as the bullet. However, the resultant SVG from the
 FO Processor does not include those references, just ?'s.

A character corresponding to Character Reference #8226; (or, as some like
it better: #x2022;) is not provided in the ISO-8859-1 charset. By itself,
this doesn't pose a problem --that's precisely what CR's are there for.
The problem lies most probably in the fact that the conversion is from an
ISO-8859-1 encoded FO to an ISO-8859-1 encoded SVG, and that somewhere in
between, the implementation converts the CR to a differently encoded
character...
Hmm... so:
a sequence of ISO-8859-1 characters ('','#','8','2','2','6',';') is
recognized as a numeric CR, converted to a java.lang.String --always Unicode
characters, so the sequence is converted into '\u2022'-- and, ideally it
should go back again to a sequence of ISO-8859-1 chars representing the CR,
but this doesn't happen.

following the trail:
fop.renderer.svg.SVGRenderer.renderWordArea( area )
  String s = area.getText();
  ...
  Element text = SVGUtilities.createText( ..., s )

fop.svg.SVGUtilities.createText( ..., s )
  org.w3c.dom.Text text = doc.createTextNode(s);

and, interestingly enough, in
fop.renderer.svg.SVGRenderer.startRenderer( OutputStream )
  the ISO-8859-1 encoding is hardcoded.

Not sure why, and up to here it doesn't really make a difference, but in
stopRenderer() the OutputStream *is* referenced, and wrapped inside an
OutputStreamWriter without explicit charset --default platform charset,
which happens to be the same ISO-8859-1 in this case.

From ISO-8859-1 to Unicode characters to an OSWriter outputting bytes
according to the default charset of your platform, starting off by
outputting an XML declaration with an encoding that may (or may not)
indicate otherwise... and, last but not least, if you're not bored to death
yet :-P
The question-mark has its roots in java.nio.charset.CharsetEncoder.
(see:
http://java.sun.com/j2se/1.4.2/docs/api/java/nio/charset/CharsetEncoder.html
)
The Unicode character '\u2022' doesn't have a corresponding ISO-8859-1
character, so the default value of '?' is never changed.

OK, now that you have the full story...

If you know your way around in Java, for a quick-fix, you can change the
hardcoded encoding declaration to UTF-8 or remove it, and change the
OSWriter's encoding to UTF-8, then recompile. The output won't contain the
Character Reference, but at least the bytes would be correctly written and
interpreted.

HTH!

Greetz,

Andreas


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



RE: Header

2005-01-17 Thread Andreas L. Delmelle
 -Original Message-
 From: The Web Maestro [mailto:[EMAIL PROTECTED]
 

Hi Luke / Clay,

 Probably, assuming there is an image at that location. 

Look at it this way: what location? (see below)

  fo:external-graphic
  src=url('//usr/tomcat/ac/images/topbanner/mainlogo.gif')/

http:// ? ftp:// ? file:// ?


Greetz,

Andreas


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



RE: Unbound Error

2005-01-07 Thread Andreas L. Delmelle
 -Original Message-
 From: Luke Shannon [mailto:[EMAIL PROTECTED]


Hi,

 I am getting the error:

 org.xml.sax.SAXParseException: The prefix fo for element
 fo:block is not bound.

Without seeing your FO source, difficult to say for sure, but it points to
an error in there.

Could be caused by something as simple as:

?xml version=1.0 standalone=yes?

fo:block /
fo:root xmlns:fo=http://www.w3.org/1999/XSL/Format;
 ...
/fo:root

Having a block outside of the root is, of course, a major error, but even if
it weren't the 'fo:' prefix is not yet bound to a namespace for the first
fo:block. This error would be encountered before the FO is
validated --'validation' being somewhat of an overstatement considering FOP
0.20.5, but you get the idea ;-)

HTH!

Greetz,

Andreas


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



RE: Need Some Help

2005-01-05 Thread Andreas L. Delmelle
 -Original Message-
 From: Luke Shannon [mailto:[EMAIL PROTECTED]


Hi,

I see you've already discovered it yourself, but here's a bit more info on
why I think it went wrong...

 Below is my code.

 When I run it in IE it get a Pop up message telling me the File does not
 begin with '%PDF-'. This is weird to me because I am not trying
 to send it back through the response object, I don't know why the browser
is even
 looking at it.


It may be weird, but it does point out one serious mistake:

 //get the content
 String pdfFileContent = out.toString();

PDF is not 'just text', so it's wrong to use a String to represent it. That
is not to say a PDF can't be opened in a text-editor --it can, but changing
a character and saving can seriously muck up the binary portions of the
file... not to mention prepend it with UTF-garbage.
The error message is Acrobat's IE-plugin complaining, and refers to the PDF
specification. A PDF file is supposed to start with:
%PDF-{version-number}
followed by a few (three or four... will have to look that up :-)) non-text
bytes.
These latter bytes will become 'characters' when you pass them through a
String, so the end-result is likely a corrupt PDF file, even if you're not
trying to display it.

 When I run it in FireFox I get my success message printed, and
 the document created. However when I trying and open it I am
 told there is a Sharing Violation.
 The writer was closed before I printed the success statement so I
 am not sure where the conflict came from.

Well... I don't fully agree. Keep in mind that in your initial code, the
physical PDF-file was referenced (for read/write access) by three different
objects: one File, and an OutputStream and a FileWriter wrapped around that
File. Only the latter of the three explicitly closed, which may have caused
the conflict to occur.
Open a PDF for writing in Acrobat, ask FOP to render that PDF and you'll
receive an error. Open it in Adobe Reader, ask FOP again, and it might work,
since the first handle on the file is read-only. (Since I tried the first
only on Windows, the latter only on Mac, this phenomenon could as well be
OS-dependent.)


Greetz,

Andreas


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



RE: Need Some Help

2005-01-05 Thread Andreas L. Delmelle
 -Original Message-
 From: Luke Shannon [mailto:[EMAIL PROTECTED]


Hi,

 My new issue is how to render the PDF with a string input containing the
 contents of the FO file.

From java.lang.String to java.io.StringReader to java.io.Reader to
org.xml.sax.InputSource?

HTH!

Greetz,

Andreas


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



RE: Xalan preceding-sibling problem

2004-12-20 Thread Andreas L. Delmelle
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]


Hi,

Just for the sake of completeness:

   xsl:variable name=lastCatxsl:value-of select=
 normalize-space(preceding-sibling::node()[2]/id)//xsl:variable
   xsl:variable name=lastTypexsl:value-of select=
 normalize-space(preceding-sibling::node()[2]/Type)//xsl:variable

It's a tiny bit more efficient to initialize xsl:variables using select,
like:

xsl:variable name=lastCat select=normalize-space(...) /

as mentioned in Xalan's FAQ:
http://xml.apache.org/xalan-j/faq.html#faq-N10148


Good Luck!

Greetz,

Andreas


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



RE: space between inline

2004-12-17 Thread Andreas L. Delmelle
 -Original Message-
 From: Thirugnanam, Kalusivalingam
[mailto:[EMAIL PROTECTED]


Hi,

 When I am using the following FO script for displaying
 15th (Expected), I am getting 15 th (Actual).

fo:inline font-family=Minion-Bold15/fo:inlinefo:inline
vertical-align=super font-family=Minion-Bold color=red
font-size=5ptth/fo:inline

Not sure why why you need two fo:inlines for this...
Just remember that the pieces of text can be considered inline areas even
when not surrounded by an explicit fo:inline.

The following code renders fine for me:

fo:block font-family=Courier
  15fo:inline vertical-align=super font-size=5ptth/fo:inline
/fo:block

So does:

fo:block font-family=Helvetica
  some other text
  fo:wrapper font-family=Courier15fo:inline vertical-align=super
  font-size=5ptth/fo:inline/fo:wrapper
/fo:block

HTH!

Greetz,

Andreas


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



RE: FOP and XInclude

2004-12-17 Thread Andreas L. Delmelle
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]


Hi,

 Thank you Lars. It worked perfectly. But what i don't unserstand
 is, can i perform a transformation from xml (using XInclude) to
 pdf via FOP in one step? And if so, how?

Why not try setting the SysProp in question before using FOP? Should work
(in theory), since FOP relies on Xalan for the XSL Transform...


HTH!

Greetz,

Andreas


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



RE: space between inline

2004-12-17 Thread Andreas L. Delmelle
 -Original Message-
 From: Thirugnanam, Kalusivalingam


Hi,

 Surprisingly if I move the create a new block with only 15th then it is
 working fine with inline/wrapper.

 But if I add this with some additional text, it still shows one character
 space between 15 and th.

Strange... the only thing I can think of would be that you have something
like:

fo:inline15
  fo:inline ...th

or

fo:inline15fo:inline ...
  th/fo:inline

in which case there's a line separator in the source --flattened to a space
during formatting.

If this is so, be sure to avoid it.

HTH!

Greetz,

Andreas


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



RE: Xalan preceding-sibling problem

2004-12-17 Thread Andreas L. Delmelle
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

Hi,

 I am attempting to compare the values in one node with the preceding node.
 When using the preceding-sibling on the first node, it retuns a
 null (which is good), but thereafter returns the value of the first
 node (only) as the tree is processed.

Not completely sure, but the problem might be that:

preceding-sibling::node()

returns the first node on the preceding-sibling axis, but 'first' here being
'in document order'... (as in: take the set of all preceding-siblings and of
that set, return the one that appears first in the source document)

 If I use the axisName following:: or following-sibling:: then it works
fine.

Yes, because here the immediately following (sibling) node is always also
first one following in the document as well.

Try:

self::node()[not(text()=preceding-sibling::node()[1]/text())]

IIC, the addition of '[1]' should make sure you return the immediately
preceding-sibling.

HTH!

Greetz,

Andreas


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



RE: FOP, JSP, TOMCAT, IE .. How to make it works!!! Please help!!

2004-12-17 Thread Andreas L. Delmelle
 Original Message-
 From: David Gagnon [mailto:[EMAIL PROTECTED]

Hi,

 Is there a way I can have the PDF displayed on the browser
 as it's generated on the server.

I think this obstacle isn't presented by FOP/TOMCAT... Actually, if you look
at what most browsers usually do with PDFs --even those that aren't
generated on-the-fly--, it isn't likely to be possible. Download first, then
use a plugin to display it.

Maybe a way to work around this is to not generate one huge PDF, but a lot
of small ones, linked by fo:basic-links. That way, only the documents
pointed to by the links the user visits will be generated (and will have to
be downloaded before the user can start reading).

HTH!

Greetz,

Andreas


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



RE: hyphenation

2004-12-15 Thread Andreas L. Delmelle
 -Original Message-
 From: robert frapples [mailto:[EMAIL PROTECTED]
 

Hi,

 Odd numbers represent an acceptable location for a hyphen, with
 higher values overriding lower inhibiting values. 

Sorry. Indeed! Don't know where my head was... Upside-down it seems :-)

 
 This leads me to believe that I should be using 7.  With 7 or with 1
 (and no other 1's), it still breaks:
 Frap-
 ples,Robert(Age-
 ncy)
 

Beats me... Anyone who can shed some light on this?

TIA!

Greetz,

Andreas

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



RE: hyphenation

2004-12-14 Thread Andreas L. Delmelle
 -Original Message-
 From: robert frapples [mailto:[EMAIL PROTECTED]


Hi,

 Just to make sure, if i added to classes:
 )
 (
 ,

 and to patterns:
 7(
 )7
 ,7

 And the text: Frapples,Robert(Agency) is split at 15
 characters, I should get:
 Frapples,-
 Robert(Agency)

 Right?

Not necessarily... '7' indicates an acceptable possibility for hyphenating,
but as long as there's a possibility of breaking it at a '3', the latter
will be chosen.

Besides that:
F-R-A-P-P-L-E-S-,-R-O-B-E-R-T

is 15 characters, so I'd expect it to break between 'Robert' and '('.

What result do you get?

Greetz,

Andreas


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



RE: Breaking between rows before breaking rows

2004-12-12 Thread Andreas L. Delmelle
 -Original Message-
 From: J.Pietschmann [mailto:[EMAIL PROTECTED]


Hi Joerg,

 Andreas L. Delmelle wrote:
  Try specifying: keep-together=always on the table-rows.

 Using both keep-together=always and keep-with-next=always
 on all rows of a table longet than a page will send FOP into
 an infinite loop.

Just wondering: is this only the case when both properties have a value of
'always'? The OP seemed to be using a (low) integer value for
'keep-with-next', so I concluded --perhaps mistakenly so-- that there was no
risk of ending up with an infinite loop... since 'keep-together' would
always have higher priority than 'keep-with-next' (?)


Greetz,

Andreas


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



RE: Breaking between rows before breaking rows

2004-12-10 Thread Andreas L. Delmelle
 -Original Message-
 From: robert frapples [mailto:[EMAIL PROTECTED]
 

Hi,

 I have a bunch of tables, each with a bunch of rows, each with some
 content.  I set keep-with-next='1' for each row, expecting it to
 page break between tables, which it does. . .
 for the most part.  If a single table is longer than one page, rather
 than breaking between rows, it breaks in the middle of a row.

Try specifying: keep-together=always on the table-rows.

IIC:
- keep-with-* props define a relation between sibling FOs
- keep-together OTOH bears relevance to the FO descendants


HTH!

Greetz,

Andreas


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



RE: align=justify in preformatting content

2004-12-07 Thread Andreas L. Delmelle
 -Original Message-
 From: Yann Bonnaillie [mailto:[EMAIL PROTECTED]


Hi,

 Yes I could, but it won't be very nice, and it would take a very long
 time to do that...

Aaahh... Blasted laziness! What do you mean exactly by 'not very nice'?
AFAICT, it would be:
a) far more 'appropriate' to enclose each paragraph in a fo:block. This
neatly complies with the spec stating that
The fo:block formatting object is commonly used for formatting paragraphs,
...
http://www.w3.org/TR/xsl/slice6.html#fo_block
For special cases, like blocks of code, you can always insert a nested
fo:block that overrides the alignment properties from the parent fo:block
(--should work, apart from a few nasty side-effects in quite exotic cases)
b) it can't be *that* difficult to make a slight adjustment to the module
creating the DOMs to end the node and start a new one whenever the CR-LF
char sequence is encountered

The problem would solve itself, because instead of having to worry about it,
you just let the formatter do what it was meant to do...

 I hope there is another way to solve my problem :)

I'm afraid I can't think of any solutions that are 'nice' (in terms of
XSL-FO idioms) :-)

Greetz,

Andreas


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



RE: align=justify in preformatting content

2004-12-06 Thread Andreas L. Delmelle
 -Original Message-
 From: Yann Bonnaillie [mailto:[EMAIL PROTECTED]


Hi,

 Well, I succeed to keep my new line after fop transformation,
 but now when I use text-align=justify on my fo:block, last line
 of each chapter (ie : before each new line) are expanded, what
 looks very bad.

Hmmm... Not really sure how to solve this, but I think you could avoid this
by terminating your DOM nodes at the newline character (or character
sequence)... That way, you would generate a separate fo:block for each
paragraph...?

May be a long shot, but HTH!

Greetz,

Andreas


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



RE: text-align

2004-12-05 Thread Andreas L. Delmelle
 -Original Message-
 From: Vojko Kercan [mailto:[EMAIL PROTECTED]


Hi,

 I tried it but it is not working. Can you help me with it? Am I using
 display-align correctly?


Sorry for not pointing this out, but the property needs to be specified on
the table-cell, so:

fo:table table-layout=fixed
fo:table-column column-width=5cm /
  fo:table-body
fo:table-row
  fo:table-cell height=5cm display-align=after
fo:blockWant to align bottom/fo:block
  /fo:table-cell
/fo:table-row
  /fo:table-body
/fo:table

HTH!

Greetz,

Andreas


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



RE: column-count

2004-12-05 Thread Andreas L. Delmelle
 -Original Message-
 From: Vojko [mailto:[EMAIL PROTECTED]


Hi,

 Is it possible to use column-count inside a table?

No, since the column-count property applies only to fo:region-body.
see: http://www.w3.org/TR/xsl/slice7.html#column-count

 Or to rephrase that...how can I use text in many columns just on one
 portion of a page and not on complete page?

The only immediate solution seems to constrain the region-body for the
page-master in question to the portion of the page you want to use columns
on...


Greetz,

Andreas


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



RE: font install error

2004-12-04 Thread Andreas L. Delmelle
 -Original Message-
 From: Mike Sierra [mailto:[EMAIL PROTECTED]

Hi,

 I'm trying to install a custom font for the first time, and am running
 this command as spec'ed in the doc:

 $ java -cp
 build/fop.jar:lib/avalon-framework.jar:lib/xml-apis.jar:lib/

Well... the example command on the website may be a bit simplified. Check
FOP's lib directory, and make sure avalon-framework.jar is not actually
named avalon-framework-{version}.jar or something like that.

HTH!

Greetz,

Andreas


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



RE: font install error

2004-12-04 Thread Andreas L. Delmelle
 -Original Message-
 From: Andreas L. Delmelle [mailto:[EMAIL PROTECTED]
  -Original Message-
  From: Mike Sierra [mailto:[EMAIL PROTECTED]

  $ java -cp
  build/fop.jar:lib/avalon-framework.jar:lib/xml-apis.jar:lib/

 Well... the example command on the website may be a bit simplified. Check
 FOP's lib directory, and make sure avalon-framework.jar is not actually
 named avalon-framework-{version}.jar or something like that.

And as an addition: same goes for the Xalan and Xerces jars --if you really
need them.

Greetz,

Andreas


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



RE: Can't generate Czech characters

2004-12-04 Thread Andreas L. Delmelle
 -Original Message-
 From: Santiago Crespo Calvo [mailto:[EMAIL PROTECTED]

Hi,

One question:

 The value of linea strings are written in
   xsl:value-of select=. disable-output-escaping=yes/

Do you really *need* to disable output escaping? If not, best to leave this
out, since your original:

 lineaDoporu#269;en#233; maloobchodn#237; ceny bez DPH/linea

will make the output of the XSL transform --FOP's input-- contain the
characters, not the entities. If, subsequently, your XML or XSL encoding (or
output-encoding) is ISO-8859-1 --a subset that doesn't have characters for
#x10D; or #x0E9;--, this is guaranteed to have undesired effects.


HTH!

Greetz,

Andreas


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



RE: text-align

2004-12-04 Thread Andreas L. Delmelle
 -Original Message-
 From: Vojko [mailto:[EMAIL PROTECTED]
 

Hi,

 How can I align the text to bottom of a row or table or a cell?
 

Setting 'display-align=after' should do the trick.


Greetz,

Andreas


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



RE: Font style problem

2004-11-30 Thread Andreas L. Delmelle
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]


Hi,

 I have all the fonts available in my System . But the fop does not pick up
 the right font while applying.
snip /
 Is there anything wrong in the code.

No. You probably want to take a closer look at:
http://xml.apache.org/fop/fonts.html

HTH!

Greetz,

Andreas


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



RE: How to set column-width dynamically

2004-11-29 Thread Andreas L. Delmelle
 -Original Message-
 From: Johannes Wolfgang Woger [mailto:[EMAIL PROTECTED]


Hi,

snip /
 How can I set column-width dynamic
 fo:table-column column-width=
proportional-column-width('${calculatedWidth}')
 Does not work.
 Can any values of FOP attributes be set dynamically?

Well, to this last question...

No, in the sense that an XSL-FO fed to FOP --so at the moment when it's
purely an XML document in the XSL-FO namespace-- can contain only fixed
values...

So, in your case, you need to make sure that what FOP gets as input is, for
example an element like:

fo:table-column column-width=proportional-column-width(2) /

All resolving of the 'calculatedWidth' variable needs to be done *before*
FOP tries to interpret the property value. This can be done by javascript,
or as it was designed to be, in the XSLT stage: somewhere in the stylesheet
you use to transform the source XML into XSL-FO.

Hope this explains it adequately (if not, just yell :-) )

Greetz,

Andreas



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



RE: starting a new page

2004-11-29 Thread Andreas L. Delmelle
 -Original Message-
 From: Osman inar Eren [mailto:[EMAIL PROTECTED]


Hi,

In theory, the addition of the attribute needs to be put somewhere over ...
   fo:table-row

... here.

Now you are of course faced with the challenge of determining what exactly
to put in your xsl:if test, since what I described earlier on won't work
here...

I'd suggest taking a minimized sample of your input XML and the desired
result, and post it on Mulberry's XSLT list[*]. I'm almost certain that
there is a much simpler way of achieving the result, but it's impossible to
tell based only on this part of the stylesheet.

Good luck!

Greetz,

Andreas

[*] http://www.mulberrytech.com/xsl/xsl-list/


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



RE: How to set column-width dynamically

2004-11-29 Thread Andreas L. Delmelle
 -Original Message-
 From: Andreas L. Delmelle [mailto:[EMAIL PROTECTED]
  -Original Message-
  From: Johannes Wolfgang Woger [mailto:[EMAIL PROTECTED]
 

Hi,

Slight addition/correction:
 No, in the sense that an XSL-FO fed to FOP --so at the moment when it's
 purely an XML document in the XSL-FO namespace-- can contain only fixed
 values...

'fixed' is somewhat misleading, as the value can also be an expression.

see: http://www.w3.org/TR/xsl/slice5.html#section-N6961-Expressions

for more info.

Greetz,

Andreas

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



RE: Internal Hyperlink

2004-11-26 Thread Andreas L. Delmelle
 -Original Message-
 From: Sven Waibel [mailto:[EMAIL PROTECTED]


Hi Sven,

 i need in my xsl an expression like that: id={concat(@id,../@id)}
 because i must combine the unique one with not unique one, so i
 get a unique combination.

In these cases (esp. when the id's are all numerics), I have found it much
safer to insert a dash in between them, so:

id={concat(../@id,'-',@id)}

would make sure that the concatenation of 1 and 11 (1-11) is actually
different than the concatenation of 11 and 1 (11-1).


Hope this helps! (If not, I have misunderstood the problem, so feel free to
ask again... :-) )

Greetz,

Andreas


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



RE: starting a new page

2004-11-26 Thread Andreas L. Delmelle
 -Original Message-
 From: Osman ?nar Eren [mailto:[EMAIL PROTECTED]


Hi,

 in the following body after the first template is applied, i want
 to start the second template in a new page.


Since you leave us guessing... the template probably currently looks like:

xsl:template match=elementlist
  fo:block ...

Adding this:

  xsl:if test=(key = 'pasif') and (position() = 1)
xsl:attribute name=break-beforepage/xsl:attribute
  /xsl:if

should be sufficient.

HTH!

Greetz,

Andreas


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



RE: Table Cell with height=100%...

2004-11-24 Thread Andreas L. Delmelle
 -Original Message-
 From: robert frapples [mailto:[EMAIL PROTECTED]


Hi,

 I want several cells in a single column with set widths, non-uniform
 amounts of text, identical borders, and vertically aligned text. I
 have done everything except for the borders.  I don't see how to make
 uniform borders using padding and background colors. If you can show
 me an example of that, I would be appreciative.

I'm a bit puzzled... It sounds like you want to use borders on the fo:block
and make them look like they are specified on the fo:table-cell? Why not
specify borders on the cells then?

Greetz,

Andreas


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



RE: Applying multiple styles using span tag problem

2004-11-24 Thread Andreas L. Delmelle
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

Hi,

First of all, it may be worth mentioning that this question is actually
better suited for an XSLT-related list.

Furtermore...

 I have a span tag which looks like

 span style=font-family:Times;text-decoration:underlineThank you for
 investing in our services/span

 In my xsl-fo I have templates as
   xsl:template match=html:[EMAIL 
 PROTECTED]'text-decoration:underline']
snip /
   xsl:template
match=html:[EMAIL PROTECTED]'font-family:Times;font-size:12pt']
   | html:[EMAIL PROTECTED]'font-size:Normalpt']
snip /

None of the above would be a match for the described span element. It would
help if you could provide us with a more complete picture of what you're
trying to do, but something like this may be of help:

xsl:template match=span
  fo:block
xsl:apply-templates select=@style
  xsl:with-param name=prop-string select=@style /
/xsl:apply-templates
  /fo:block
/xsl:template

xsl:template match=@style
  xsl:param name=prop-string select='' /

  xsl:choose
xsl:when test=contains($prop-string,';')
  xsl:attribute name={substring-before($prop-string,':')}
xsl:value-of select=substring-before(substring-after(
 $prop-string,':'),';') /
  /xsl:attribute
  xsl:apply-templates select=.
xsl:with-param name=prop-string
select=substring-after($prop-string,';') /
  /xsl:apply-templates
/xsl:when
xsl:otherwise
  xsl:attribute name={substring-before($prop-string,':')}
xsl:value-of select=substring-after($prop-string,':') /
  /xsl:attribute
/xsl:otherwise
  /xsl:choose
/xsl:template

Hope this helps!

Greetz,

Andreas


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



RE: Applying multiple styles using span tag problem

2004-11-24 Thread Andreas L. Delmelle
 -Original Message-
 From: Andreas L. Delmelle [mailto:[EMAIL PROTECTED]

[Slight adjustment + addition:]


 xsl:template match=span
   fo:block
 xsl:apply-templates select=@style /
   /fo:block
 /xsl:template


You can create an fo:block or an fo:inline here, depending on whether the
span has any span ancestors, or better even, create a separate matching
template for it.

 xsl:template match=@style
   xsl:param name=prop-string select=. /

And to make this latter template a bit more generic --and to add a level of
control over the generated property names/values--, you could provide a
mapping of some sort in a separate XML or in a different namespace in the
stylesheet...

Greetz,

Andreas


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



RE: OUTLINE QUESTION

2004-11-23 Thread Andreas L. Delmelle
 -Original Message-
 From: Nestor Martinez [mailto:[EMAIL PROTECTED]


Hi,

 Here is a little bit of the fo file, where it shows the block
 with the id, but it actually goes to the block right after the
 block with the leader inside of it, in other words, it points
 to two blocks down from where it is supposed to point at,
 any idea why this happens?

Aha, this looks like a familiar problem indeed... I'm not completely sure,
but it sounds like one of those pesky 'nested block' issues...

Is it in any way possible to leave out the surrounding fo:block?

I mean:
  fo:table-body
fo:table-row height=6.75in
  fo:table-cell

Leave the following fo:block out, and make the blocks containing the ID's
direct descendants of the fo:table-cell...
fo:block margin-right=0.5in margin-left=0.5in

... and move its margin-* properties to this fo:block.
  fo:block font-size=16pt font-weight=bold id=A1Title
1/fo:block

See if that works...

Hope this helps!

Greetz,

Andreas


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



RE: JCE present but not working

2004-11-23 Thread Andreas L. Delmelle
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]


Hi,

 * I have downloaded bcprov-jdk14-125.jar from Bouncy Castle
 and have put that jar file in fop-0.20.5\lib.

Wrong location (see also a thread from ... yesterday, I believe)

You have to put it in the lib\ext directory for the JVM used when running
FOP, so...

snip /
 * I have modified j2sdk1.4.1_02\jre\lib\security\java.security to include
 the
 following line:
  security.provider.6=org.bouncycastle.jce.provider.BouncyCastleProvider


... (probably) wrong location again. It's far more likely that you have a
separate Java Runtime under Program Files somewhere (--the one your
%JAVA_HOME% refers to). It's the java.security file from there that you need
to modify.

Hope this helps!

Greetz,

Andreas


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



RE: JCE present but not working

2004-11-23 Thread Andreas L. Delmelle
 -Original Message-
 From: Andreas L. Delmelle [mailto:[EMAIL PROTECTED]


 ... (probably) wrong location again. It's far more likely that you have a
 separate Java Runtime under Program Files somewhere (--the one your
 %JAVA_HOME% refers to).

Hmm... A bit more precise: the Java Runtime from which the 'bin' directory
appears first in your %PATH% environment var

Greetz,

Andreas


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



RE: References on same page

2004-11-22 Thread Andreas L. Delmelle
 -Original Message-
 From: Sven Waibel [mailto:[EMAIL PROTECTED]


Hi,

snip /
 But i get this error:

 internal-destination or external-destination must be specified in
 basic-link

This would mean that the attribute in question is empty, so the sketched
expression as I wrote it

../../../tables/tb[description=current()]/@id

returns an empty string.

You have to figure out where the 'tables' node is in relation to the
'combination' node in your source XML in order to get the correct results.
We really *have* to see the structure of the source XML to be of any help
here... (not as two separate fragments, but as a whole; or maybe they are
even in two different source files?)


 So i tried it with the extension fox, but i also get an error:

 fox:destination requires an internal-destination

This error occurs for the exact same reason.

Maybe it's best to perform the XSL transform to a FO-file standalone first,
and make sure the fo:basic-link elements are generated with a valid
internal-destination property/attribute.

Greetz,

Andreas


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



RE: OUTLINE QUESTION

2004-11-22 Thread Andreas L. Delmelle
 -Original Message-
 From: Nestor Martinez [mailto:[EMAIL PROTECTED]


Hi,

 Does any one know why the following code wouldn't work as expected.
 When I click on a bookmark link it takes me to the correct
 page but not the exact location, it always points to the block right
 below the one that actually contains the ID.  I have gone on the Internet
 and downloaded sample files which run great, bookmarks go where they are
 supposed to go.  Any ideas?

Errm... No.
The code you've shown us contains only the outlines. Based on that, we can
only assume that the ID's are in fact on the blocks below the ones that you
think contain the ID...

Can you post a minimized version of the FO demonstrating the problem?

Greetz,

Andreas


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



RE: Question about full page tables

2004-11-22 Thread Andreas L. Delmelle
 -Original Message-
 From: Jon Steeves [mailto:[EMAIL PROTECTED]
 
Hi,

  
 The problem I'm having is each item has a different amount of 
 text so that some rows are thinner than others.  Can anyone help me?
  

IIUC, the best way to solve this is by setting the row-height explicitly to the 
height necessary for the item with the largest content. If the row that 
contains the largest item is actually 20mm in height, set them all to 20mm, like

fo:table ...
  ...
  fo:table-body ...
fo:table-row height=20mm
...

Use the 'display-align' property on the individual fo:table-cells to make sure 
the smaller items are neatly centered, if necessary.

Hope this helps!

Greetz,

Andreas


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



RE: PDF encryption

2004-11-22 Thread Andreas L. Delmelle
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]


Hi,

 What I have done:

 - downloaded the bcprov-jdk14-125.jar from bouncycastle.org
 - copied it into C:\j2sdk1.4.2_06\jre\lib\ext
 - edited the file java.security and added the line
 security.provider.6=org.bouncycastle.jce.provider.BouncyCastleProvider
 - added C:\j2sdk1.4.2_06\jre\lib\ext\bcprov-jdk14-125.jar to
 the classpath
 - build fop, getting the message prepare-jce:

This should indeed be enough, but will only work if that is the JVM actually
used when running FOP... make sure this is verified.

Another possibility I see is that you may need this:
http://java.sun.com/products/jce/index-14.html#UnlimitedDownload

Hope this helps!

Greetz,

Andreas


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



RE: email links in pdf

2004-11-22 Thread Andreas L. Delmelle
 -Original Message-
 From: Roland Neilands [mailto:[EMAIL PROTECTED]
 
  [Tom Healy :]
  However, mailto: works without this problem if I use lowagie 
  iText to generate the pdf .
 
 Interesting. Well, they're both open source, it shouldn't be too 
 hard to find the difference. For someone who knows java anyway (not
 me unfortunately).
 

FYI:
I have put a reminder for this on Bugzilla: 32327.

Greetz,

Andreas


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



RE: email links in pdf

2004-11-22 Thread Andreas L. Delmelle
 -Original Message-
 From: Roland Neilands [mailto:[EMAIL PROTECTED]
 
 I couldn't find the extension mentioned on the FOP website - the 
 original poster might find it useful too.

Posted on fop-dev a few weeks ago:
http://wwwstud.ira.uka.de/~s_hecht/

Greetz,

Andreas


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



RE: Generate czech characters with PDF

2004-11-21 Thread Andreas L. Delmelle
 -Original Message-
 From: Santiago Crespo Calvo [mailto:[EMAIL PROTECTED]


Hi,


 Im trying to generate a pdf with czech characters: #269;
 but it does not work.How can I embed this chars?.
 Ive tried with hyphenation settings and configuring fonts
 (Arial o Helvetica) but it doesnt works

Should normally be no problem if the used font contains a glyph for the
desired character...
(I'm guessing it doesn't, and only a '#' character appears in your output?)

HTH!

Greetz,

Andreas


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



RE: Generate czech characters with PDF

2004-11-21 Thread Andreas L. Delmelle
 -Original Message-
 From: Santiago Crespo Calvo [mailto:[EMAIL PROTECTED]

 Yes, I see the # character and the ? character.

See:

http://xml.apache.org/fop/faq.html#pdf-characters
http://xml.apache.org/fop/fo.html#xml-special-chars


 Ii dont know the term glyph. Who's that?

http://dictionary.reference.com/search?q=glyph

Used for example in the term hiero-glyph, which may ring a bell (?).

In short:
All fonts have a set of these glyphs for a number of characters. The fonts
you use most likely are meant for Western languages, meaning they have no
glyph for Cyrillic / Chinese / Japanese ... characters.
So you need to find a font which *does* have a glyph for the character(s)
you want to have in your output.

Hope this helps!

Greetz,

Andreas


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



RE: fop 0.20.5 with batik 1.5.1

2004-11-20 Thread Andreas L. Delmelle
 -Original Message-
 From: news [mailto:[EMAIL PROTECTED] Behalf Of hilz

Hi,

 I have a program that uses fop 0.20.5.
 It used to work fine with an older version of batik(i don't know which
 version), but now when i updated to batik 1.5.1, and run fop, i get the
 following exception:

Quite common problem. See:
http://xml.apache.org/fop/graphics.html#batik


 is there a version of fop that works with batik 1.5.1 ?

Not that I'm aware of. As suggested, try to make sure that the Batik version
used when running FOP is the version in FOP's lib directory. That should
avoid this problem.

Greetz,

Andreas


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



FW: list overlapping

2004-11-19 Thread Andreas L. Delmelle
 (Correcting a mistake: see below)

  -Original Message-
  From: Andreas L. Delmelle [mailto:[EMAIL PROTECTED]
   -Original Message-
   From: Ganesh Babu Nallamothu, Integra-India
 
   ... the problem is when you convert to PDF the
   second text is overwriting on first one.
  ...
   When I try to adde label-end and body-start functions
   it showing an error that area is full.
 snip /
  So, in short, if you want to use the label-end()/body-start() functions,
  then you absolutely *need* to specify
  provisional-label-separation/provisional-distance-between-starts on the
  fo:list-block, or you'll get undesired results.

 Oops, it's almost the other way round, the mentioned props have
 no use *except* WRT to the calculation of body-start() / label-end().

 My mistake, sorry :-/

 Greetz,

 Andreas



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



RE: Page X/Y, forward references and iText

2004-11-19 Thread Andreas L. Delmelle
 -Original Message-
 From: FOUCAULT Séb [mailto:[EMAIL PROTECTED]

Hi,

 I read a lot of articles dealing with issues with
 forward references in long documents in the mailing
 list archives (page x / y). Using a third-party tool
 such as iText is a solution often suggested to tackle
 this kind of problems.
  
 Has anybody experienced such a solution ?

I haven't done it myself, but I'm guessing that this would be best achieved
by the following:
- leave all footers as you generate them now, except for the total number of
pages --the current page-number is not what's causing the problem, so this
can remain as is-- maybe you can add an empty block or block-container to
make sure this space remains blank
- only for the total number of pages, use iText to add a text box to each
page at the coördinates where this would appear if you had
computed/generated it via XSL-FO

 - Could the use of PDF templates be a good way to
 overcome the more general problem of forward
 references (maybe writing a FOP extension) ?
  

Could be. I'd certainly recommend looking at an extension that has been
posted recently on fop-dev:
http://wwwstud.ira.uka.de/~s_hecht/

This is an extension for PDF Forms --maybe you could also achieve the same
effect by adding the total number of pages through iText into a form-field
created with the forms extension... This could maybe avoid having to
generate a text box for every page separately, since the content is
identical for all pages after all.

Hope this helps!


Greetz,

Andreas


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



RE: References on same page

2004-11-19 Thread Andreas L. Delmelle
 -Original Message-
 From: Sven Waibel [mailto:[EMAIL PROTECTED]


Hi,

Oh, but you already have id attributes you can use... I think the following
would do it (rough sketch, supposing that the combination nodes are on the
same level as the tables node)

xsl:template match=combination/parameter/equival
  fo:basic-link internal-destination={../../../tables/tb[
   description=current()]/@id}
fo:block
  xsl:apply-templates /
/fo:block
  /fo:basic-link
/xsl:template

xsl:template match=tables/tb
  fo:block id=[EMAIL PROTECTED]
xsl:apply-templates /
  /fo:block
/xsl:template


HTH!

Greetz,

Andreas


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



RE: References on same page

2004-11-18 Thread Andreas L. Delmelle
 -Original Message-
 From: Sven Waibel [mailto:[EMAIL PROTECTED]



Hi Sven,

snip /
 My problem is that i don't know how many details i will have, so
 i can't say id=detail1, id=detail2.


The way I see it, the simplest solution would be to add a unique identifier
to each detail-node in the source XML. That way, you can simply copy them
from there without needing to know how much there are.

Don't know of this makes sense. If it doesn't, don't hesitate to ask again
(and if possible, add a small sample of your source XML --that will allow us
to answer a bit more to the point maybe...)


Greetz,

Andreas


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



RE: list overlapping

2004-11-18 Thread Andreas L. Delmelle
 -Original Message-
 From: Ganesh Babu Nallamothu, Integra-India


Hi,

First of all: I feel compelled to point out that what you are trying to do
and the way you seem to be going about it, is actually violating the concept
of a list-block IMHO (a two-column table seems far better suited for this).

A list-block is meant for things like:

A. Topic1
B. Topic2

Where the A. and B. correspond to the list-item-labels and Topic1 / Topic2
are the list-item-bodies.

However, if you insist...

(answering your questions a bit out of order)

 ... italic is not coming.

 duoList
 firstitalicThe Cambridge Companion to Greek Tragedy/italic/first

Well, having the content in a node named 'italic' in your source XML is
obviously not going to magically add the italics to the result, unless you
have the XSLT add the necessary property to the corresponding fo:block.

 xsl:for-each select=c:first
   fo:list-item
 fo:list-item-label
   fo:block

This should at least be: fo:block font-style=italic

A bit more elegant maybe --certainly more 'the XSLT way', would be to have
code like:

xsl:template match=c:italic
  fo:block font-style=italic
xsl:apply-templates select=c:paragraph /
  /fo:block
/xsl:template

That way, your original code can be rewritten as:

xsl:for-each select=c:first
  fo:list-item
fo:list-item-label
  xsl:apply-templates /
/fo:list-item-label
  /fo:list-item
  ...

 ... the problem is when you convert to PDF the
 second text is overwriting on first one.
...
 When I try to adde label-end and body-start functions
 it showing an error that area is full.

See:
http://www.w3.org/TR/xsl/slice7.html#provisional-label-separation
and
http://www.w3.org/TR/xsl/slice7.html#provisional-distance-between-starts

excerpt:
body-start() = the value of the start-indent
  + start-intrusion-adjustment
  + the value of the provisional-distance-between starts of the closest
 ancestor fo:list-block

So, in short, if you want to use the label-end()/body-start() functions,
then you absolutely *need* to specify
provisional-label-separation/provisional-distance-between-starts on the
fo:list-block, or you'll get undesired results.

I think the simplest way would be to add margin-* properties to the
fo:blocks inside the body. If I recall correctly, these margins are
determined WRT to the reference-area containing the enclosing list-block, so
something like:

fo:list-item-body
  fo:block margin-left=100mm
xsl:value-of select=../c:second/c:paragraph/
  /fo:block
/fo:list-item-body

might be more what you need.

HTH!

Greetz,

Andreas


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



RE: Current CVS - break-after/before=page not working?

2004-11-16 Thread Andreas L. Delmelle
 -Original Message-
 From: Tom Frey [mailto:[EMAIL PROTECTED]


Hi Tom,

 Everything would work fine in the HEAD CVS besides the page
 breaks. Is this something that is going to be fixed soon or
 is there anything I can do about that?


Well... ATM not 'everything' works fine in HEAD, although it's definitely
getting better-and-better every day --FO validation, for instance, has been
drastically improved compared to 0.20.5 (to the extent that one does not
necessarily have to run in debug-mode to get a meaningful error message).
Whether the page-breaks are going to fixed soon, I couldn't say, but if you
feel like it and are interested... please, have a look at the Layout-code
and if you come up with an idea, it will sure be welcomed. Feel free to
subscribe to fop-dev and join the discussions. Layout is currently the main
point we're focusing on, so, yes it *might* be quite soon.

Also, check the bugzilla bug-reports for fop-1.0dev. If you come across
something that hasn't been reported yet, enter a bug with minimized example
files demonstrating possible areas of improvement.

All help is welcome!

Greetz,

Andreas


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



RE: font weight style

2004-11-12 Thread Andreas L. Delmelle
 -Original Message-
 From: Mark Williams [mailto:[EMAIL PROTECTED]


Hi Mark,


 Where there are specific bold, italic and bold italic files does
 FOP need to have access to these or is it enough to convert
 the normal file and specify different font-triplets for the
 same xml file

It's the first. To get accurate results, you have to generate XML metrics
files for each of them, and the entries in the userconfig.xml should look
like (example for Verdana):

font metrics-file=fonts\ttverdana.xml kerning=yes
  embed-file=verdana.ttf
  font-triplet name=Verdana style=normal weight=normal/
/font
font metrics-file=fonts\ttverdanai.xml kerning=yes
  embed-file=verdanai.ttf
  font-triplet name=Verdana style=italic weight=normal/
/font
font metrics-file=fonts\ttverdanab.xml kerning=yes
  embed-file=verdanab.ttf
  font-triplet name=Verdana style=normal weight=bold/
/font
font metrics-file=fonts\ttverdanabi.xml kerning=yes
  embed-file=verdanaz.ttf
  font-triplet name=Verdana style=italic weight=bold/
/font

Greetz,

Andreas


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



RE: font weight style

2004-11-12 Thread Andreas L. Delmelle
 -Original Message-
 From: Mark Williams [mailto:[EMAIL PROTECTED]


Hi Mark,

 Regarding the example I posted of Century Gothic which has a normal font
 file and a bolditalic font file.  Would that look like this


That depends on what you want to achieve... AFAICT, there are also
GOTHICI.TTF and GOTHICB.TTF for the corresponding style and weight (--at
least they are present on my machine)

The first version you suggest, would lead to FOP using the metrics for
normal/normal in the following cases:

normal/normal
normal/bold
italic/normal

So, in fact, all three would lead to the same result in the output. (italic
or bold will look the same as the normal font).
Only normal/normal and italic/bold will look as they should, since you have
the appropriate metrics for them.

In the second version, the problem remains. That is, FOP will use
italic/bold metrics for:

normal/bold
italic/normal
italic/bold

So these three would all look like italic/bold.

Hope this makes it all a bit clear...

Greetz,

Andreas


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



RE: font weight style

2004-11-12 Thread Andreas L. Delmelle
 -Original Message-
 From: Mark Williams [mailto:[EMAIL PROTECTED]


Hi Mark,

 Incidentally, I did have specific font files for Century Gothic Bold and
 Century Gothic Italic, it's just that the very intelligent windows app I
 have written is deleting them after creating the font metrics file.  Uhm,
 seemed sensible at the time.

:-)

Just for the sake of completeness:
For those fonts that offer no bold or italic, it's always better to have no
specific entries in the userconfig.xml at all. That way, when the user tries
to use italic style or bold weight, FOP will at least warn that it is
defaulting to normal.

Best of luck!

Greetz,

Andreas


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



RE: [Error] null

2004-11-11 Thread Andreas L. Delmelle
 -Original Message-
 From: Agar, Robert [mailto:[EMAIL PROTECTED]


Hi Rob,

 I'm getting this rather less than helpful error message:
snip /

A couple of hints:

1. try running FOP with the '-d' command line switch. This should give you
more information, maybe even more helpful :-)

2. if the error still isn't obvious, try running the transformation
standalone (i.e. first run the XSL transform, using the supplied xalan.bat
to produce the FO). This will fail if the problem is in the stylesheet (so
not really a FOP error...)

And if after these two steps the error still persists, please attach the FO
file (not XML + XSLT, but the result of the transformation in step 2), and
we'll take a look at it.


Hope this helps!

Greetz,

Andreas


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



RE: hyphenation in single syllable language?

2004-11-11 Thread Andreas L. Delmelle
 -Original Message-
 From: Hoàng Tuân Nguy?n Ð?ng [mailto:[EMAIL PROTECTED]


Hi,

 i want to know about the capablity to disable spliting a word in fop ?
 hyphenation as i know!!

 i've build a Vietnamese pdf document with fop, but there is some
 problem with the result. Vietnamese is a single syllable language!

Well... I see the document in question uses Vietnamese as well as English. I
suspect you have hyphenation turned on for all of the document (?) So most
likely, FOP is using English hyphenation patterns for the Vietnamese parts
as well?

If that is the case, I see two options:
- activate hyphenation for all of the document, and disable it
(hyphenate=false) for the Vietnamese parts
- activate hyphenation (hyphenate=true) only for the English parts

Hope this helps!

Greetz,

Andreas


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



RE: [Error] null

2004-11-11 Thread Andreas L. Delmelle
 -Original Message-
 From: Agar, Robert [mailto:[EMAIL PROTECTED]


Hi Rob,

snip /
 ... tracked down the error to a null pointer exception at
 org.apache.fop.fo.pagination.PageSequence.init(PageSequence.java
 :173), caused by the fo:layout-master-set element being missing.


Well, it's not of much use right now, but in the current development
version, the reporting of such errors is greatly improved.

Something to look forward to :-)

Greetz,

Andreas


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



RE: Font Metrics

2004-11-11 Thread Andreas L. Delmelle
 -Original Message-
 From: Mark Williams [mailto:[EMAIL PROTECTED]
 
 Jarred the necessary classes for a TTF converter.  Just in case anyone
 refers to this thread in the future, you also need the tools\io classes.

Oops, my mistake --too quick again :(

Thanks for the correction.

Greetz,

Andreas


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



RE: hyphenation in single syllable language?

2004-11-11 Thread Andreas L. Delmelle
 -Original Message-
 From: Hoang Tuan Nguy?n D?ng [mailto:[EMAIL PROTECTED]


Hi,

snip /
 i've try your suggest but there is no change :(.
 fist at all, i've change my locale in docbook source from 'vi' to
 'en', the hyphenation is work well, my word isn't split !

 But when i try to copy en.xml to vi.xml and define hyphenation-dir in
 userconfig.xml; when fop-ing, there is no error messages about
 building hyphenation tree for language vi; but the word is split in
 PDF document 

I'm a bit confused here... So, you are 'copying' the XML containing the
English hyphenation patterns to a new file 'vi.xml'? :-/
As I see it, this will have exactly the effect I described as 'using English
hyph patterns for Vietnamese text'. Unless the 'vi.xml' is made to contain
information specifically about hyphenation in Vietnamese, it's always going
to lead to undesired results.


 When i add those lines:
 xsl:attribute-set name='hypenateText'
xsl:attribute name='hyphenate'false/xsl:attribute
xsl:attribute name='language'vi/xsl:attribute
 /xsl:attribute-set
 in my xsl stylesheet ang generate fo file with this; nothing change!!

All depends on where this attribute-set is used. If this set is in fact
being used on the Vietnamese parts, and hyphenation is still not disabled
for those blocks of text, this would be a bug.

If you were using two attribute-sets:

xsl:attribute-set name=hyph-English
  xsl:attribute name=languageen/xsl:attribute
  xsl:attribute name=hyphenatetrue/xsl:attribute
/xsl:attribute-set
and
xsl:attribute-set name=hyph-Vietnamese
  xsl:attribute name=languagevi/xsl:attribute
  xsl:attribute name=hyphenatefalse/xsl:attribute
/xsl:attribute-set

The XSL should look like:

fo:block use-attribute-sets=hyph-English
  !-- For English Text --
/fo:block

fo:block use-attribute-sets=hyph-Vietnamese
  !-- For Vietnamese Text --
/fo:block

IIC, it would even be sufficient to only use the first set, and for the
Vietnamese parts, just omit the hyphenation properties.

Hope this helps!

Greetz,

Andreas


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



RE: Font Metrics

2004-11-10 Thread Andreas L. Delmelle
 -Original Message-
 From: Mark Williams [mailto:[EMAIL PROTECTED]


Hi Mark,

 The fonts page on the apache fop web site contains the following info re
 generating font metrics files.

snip /
 I would like to jar up the necessary classes for doing this (to
 be packaged with an ActiveX).
 Does anyone have a list of the classes that are necessary?

IIC, then it should be sufficient to include (for FOP 0.20.5):
- all classes in the org.apache.fop.fonts package
- and of course the org.apache.fop.fonts.apps.TTFReader class

If you don't need the functionality for type1 fonts, you obviously don't
need to include that package, nor the PFMReader app.


HTH!

Greetz,

Andreas


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



RE: Footer placement...

2004-11-07 Thread Andreas L. Delmelle
 -Original Message-
 From: Anil Pinto [mailto:[EMAIL PROTECTED]


Hi,


 Can I get some more information or links on how this can be done
 with markers or footnotes ? I need to come up with a solution
 soon. Thanx in advance.


For the solution with markers, the explanation is:

- define fo:static-content for every page, and make them include
fo:retrieve-marker of a specific marker-class
- make sure that the footer-info required to appear on your last page only
appears in a fo:marker of the corresponding marker-class after the last
fo:block

Roughly, the XSL-FO has to look something like:

fo:page-sequence ...
  fo:static-content flow-name=xsl-region-after
fo:block
  fo:retrieve-marker retrieve-class-name=footer-last
 retrieve-boundary=page
 retrieve-position=last-ending-within-page /
/fo:block
  /fo:static-content
  fo:flow
  ...
  !-- put the following *only* after the last fo:block --
  fo:marker marker-class-name=footer-last
This text appears only on the page containing
the last fo:block
  /fo:marker
  /fo:flow
/fo:page-sequence

Hope this helps!

Greetz,

Andreas


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



RE: Transparent image in footer

2004-11-02 Thread Andreas L. Delmelle
 -Original Message-
 From: Mark Donnelly [mailto:[EMAIL PROTECTED]


Hi,

 I have placed an image in my document footer.

 Im wondering how I can make the image transparent or at least in the
 background so that it does not overwrite content that drifts into
 the footer area?


Haven't tried myself, so not sure if it really works, but the compliance
page indicates full support for the 'background-image' property, so try:

fo:simple-page-master ...
  ...
  fo:region-after region-name=footer
   background-image={your-image-here} /

You may have to preprocess (resize) the image in order to get the needed
results.


HTH!

Andreas



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



RE: Problem with SVG

2004-10-28 Thread Andreas L. Delmelle
 -Original Message-
 From: Johannes Franz [mailto:[EMAIL PROTECTED]


Hi,

FYI: since your original question also mentioned 'how many svgs can one
embed before the OOMError occurs?', here's a little advice.

You won't be able to accurately test this with just one SVG, you'd need to
have quite a few and all different, because if it's the same one, FOP keeps
it in a cache anyway. I haven't exactly tried myself, but I'm guessing that
if you embed the same graphic once or 100 times, it shouldn't make that much
of a difference...

Besides that:

 But when i run fop i get the following error message:
 [ERROR] Batik not in class path
 [ERROR] Error while creating area : No ImageReader for this type of image
 (file:/home/johannes/AT_PI.vdo/diagram.svg)

 What's the problem?
...
 batik.jar seems to be added.

 From my fop.sh:
 DIRLIBS=${FOP_HOME}/lib/*.jar

 And batik.jar is located in /lib. So any other idea why this problem
occurs?

Hmm... I get the very same error you describe here when I try to render your
supplied files.
Very strange indeed... Only place this error message appears in FOP is in
fop.image.analyser.SVGReader, as a result of a NoClassDefFoundError while
trying to load the image using Batik's classes...

I'm having no trouble viewing the SVG with Batik Squiggle, but I do
encounter problems trying to rasterize it, albeit not a NCDFError

Is it possible that Batik *is* loaded, but the rasterizer can't handle the
SVG for some reason, so one of its classes is actually causing the error?
Forcing FOP to deal with it, but that's not exactly what the message in that
'catch' block was meant for...
In any case, you might want to check on batik-user, and ask if someone over
there has a clue why this 'diagram.svg' won't work with their rasterizer.


Greetz,

Andreas


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



RE: Problem with SVG

2004-10-28 Thread Andreas L. Delmelle
 -Original Message-
 From: Andreas L. Delmelle [mailto:[EMAIL PROTECTED]


 FYI: since your original question also mentioned 'how many svgs can one
 embed before the OOMError occurs?', here's a little advice.

 You won't be able to accurately test this with just one SVG, you'd need to
 have quite a few and all different, because if it's the same one,

... IIC, they don't necessarily have to be different images, just
differently _named_ images would be sufficient...

Cheers,

Andreas


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



RE: Inherited Block Properties

2004-10-27 Thread Andreas L. Delmelle
 -Original Message-
 From: Puppala, Kumar (LNG-DAY) [mailto:[EMAIL PROTECTED]


Hi,

 I am having some difficulty understanding the inheritance of attribute
 properties for fo:block and fo:inline. The properties seem to be inherited
 but that theory does not seem to be consistent for all.
snip /
 If you look at the output, you can notice that the 'text-decoration'
 property was inherited from the parent block and applied on top of the
 current value specified for that property in the inherited block.

This seems actually consistent with the XSL-FO Rec.:
see http://www.w3.org/TR/xsl/slice7.html#text-decoration

All the way down, it says:

qThis property is not inherited, but descendant boxes of a block box
should be formatted with the same decoration (e.g., they should all be
underlined). The color of decorations should remain the same even if
descendant elements have different color values./q

 But the same cannot be said about 'font-weight' property. This property
 defaults to 'normal' in the inherited block and does not inherit from
 the parent block.

This indeed seems like a bug, unless I'm missing something.

 Also, what do I need to do in case I don't want to inherit any
 parent block properties in a subsequent block within a parent?

Easy. Just set them all explicitly to the desired values, apart from
'text-decoration' of course, for which the only workaround seems to be not
to specify it on the parent block, but only on the child blocks that
actually do require it.


Greetz,

Andreas


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



RE: Retrieve-marker problem. Can anyone help with wrapper workaround?

2004-10-22 Thread Andreas L. Delmelle
 -Original Message-
 From: John Burgess [mailto:[EMAIL PROTECTED]


Hi John,

I know it sounds like a bit of a pain, but try to use this:

fo:block
fo:wrapper use-attribute-set=headers-footers !-- sets 8 point
ight  --
fo:marker marker-class-name=chapterIntroduction/fo:marker
/fo:wrapper
/fo:block

fo:block use-attribute-set=chapter-heading
Introduction
/fo:block

Notice that the actual title appears in two places (under the
fo:marker/fo:wrapper, and once again in a block *after* the wrapper)

I don't really see how your problem could arise though... IIC, then the text
placed under fo:marker shouldn't be visible anywhere except when there is a
corresponding fo:retrieve-marker that retrieves it --at least that's the way
it currently works for me, and how it's defined in the spec:

The fo:marker does not directly produce any area. Its children may be
retrieved and formatted from within an fo:static-content, using an
fo:retrieve-marker...

Currently, FOP maintenance version only has a problem with the '...and
formatted...' part. The rest seems to be handled quite OK.

Greetz,

Andreas




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



RE: Retrieve-marker problem. Can anyone help with wrapper workaround?

2004-10-22 Thread Andreas L. Delmelle
 -Original Message-
 From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]


 Here is my marker code (FOP 0.20.3):

 !--parse out the markers--
 fo:inline font-size=7pt color=black font-weight=normal
 white-space-collapse=true
   xsl:for-each select=@*[starts-with(name(.),'marker__')]
 fo:inlinefo:marker
 marker-class-name={name(.)}xsl:value-of
 select=.//fo:marker/fo:inline
   /xsl:for-each
 /fo:inline
 !--parse out the markers--

This solution will also do the trick, but...

Be careful with fo:inline's. As I recall, in FOP 0.20.X fo:wrapper's still
treated the same way as fo:inline, but according to the spec fo:inline
generates areas of itself --thus an fo:wrapper seems to be more appropriate
here (well actually... 'nothing' seems to be even more appropriate, but you
can't win 'em all ;-) )

Greetz,

Andreas



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



RE: exception on error

2004-10-22 Thread Andreas L. Delmelle
 -Original Message-
 From: Agar, Robert [mailto:[EMAIL PROTECTED]


Hi,

 I have FOP running embedded in a java program. How do I make it
 throw an exception on an error, rather than just logging it?

 The particular error I want it to fail on is this:
 [ERROR] Error while creating area : Error with image URL:
 Images\test.jpeg (The system cannot find the path specified) and
 no base URL is specified


In maintenance (FOP 0.20.5), the stated error message appears in
org.apache.fop.fo.flow.ExternalGraphic.java (line: 296 and following --catch
MalformedURLException or FopImageException).

AFAICT no additional Exception is thrown, most likely because an image not
being found can hardly be considered a 'fatal' error --rendering can
continue, just leaving out the offending fo:external-graphic element-- and
the XSL-FO Rec prescribes nothing in particular for dealing with an invalid
'src' attribute, but it seems feasible enough to modify the code so that
when the MalformedURLException or FopImageException is caught, it throws a
FOPException --which, IIUC, should be enough to send the signal to break off
any further processing--, and when you catch that Exception in your app, you
can then provide the necessary error-handling code for it.


Greetz,

Andreas


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



RE: XPath 2.0 XSLT 2.0

2004-10-20 Thread Andreas L. Delmelle
 -Original Message-
 From: Andreas L. Delmelle [mailto:[EMAIL PROTECTED]

snip /
 In the same fashion, one could opt to use an XML parser other than Xerces.

FYI: While browsing through the sources, I found only one direct reference
to a Xerces-specific class (in: org.apache.fop.hyphenation.PatternParser),
and here it is explicitly mentioned as 'default' parser, in case none is
specified in the  'org.xml.sax.parser' system property.

Greetz,

Andreas


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



(Moved from fop-dev:) RE: Help required -- Converting TeX files to XML

2004-10-20 Thread Andreas L. Delmelle

Hi,

  Can anyone guide me how to add hyphenation
  for Japanese language? I have got .tex file for SJIS i.e.
  SJIS.tex, but according to FOP's documentation,
  I need to convert it in .xml file. I don't
  know how to convert it. So, please guide for the
  same.

Check: http://xml.apache.org/fop/hyphenation.html#patterns

All the relevant data on the creation of FOP hyphenation patterns is
explained there. No real profound knowledge on TeX patterns here, but having
taken a look at a few TeX-files, it looks like it wouldn't pose too much of
a problem to create a FOP hyphenation XML from one of those --maybe one
could write a Java class that does exactly that, or maybe a Perl script
would be more appropriate. Who knows... also conceivable to write a Xerces
XNI TeXParserConfiguration[1] to parse a TeX-file, then use Xerces to send
the generated SAX events back to a file.

HTH,

Andreas

[1] see: http://xml.apache.org/xerces2-j/xni-config.html for an example of a
CSVParserConfig; use spaces instead of commas to tokenize the buffered line
of TeXt, change or add to the element names, add a few rules... --and don't
forget to donate it back to Xerces, as to return the favor ;-)


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



RE: XPath 2.0 XSLT 2.0

2004-10-20 Thread Andreas L. Delmelle
 -Original Message-
 From: J.Pietschmann [mailto:[EMAIL PROTECTED]

 Andreas L. Delmelle wrote:
Should be quite simple really: replace the Xalan jar in your JVM's
  'lib/endorsed' directory with Saxon's jar.

 Note that this will wreck all Java applications on the system
 which need a writable DOM implementation, because the read-only
 DOM implementation supplied with Saxon overrides the JRE
 implementation. Use with care.

Thanks for the warning! Hadn't run into any problems yet, but at least now I
know where to look if it happens.

Greetz,

Andreas


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



RE: variable with fo value

2004-10-18 Thread Andreas L. Delmelle
 -Original Message-
 From: TAILLEZ Yannick [mailto:[EMAIL PROTECTED]

 Hi everyone,

 I 'm trying to do something like this :
snip /

Hi,

IIUC,


 But the two variables are empty and retrieve-marker return a
 correct value.

Well... the xsl:variables wouldn't be empty. They would contain all of the
fo:retrieve-marker code you made them contain, but the following expression:

 xsl:value-of select=$last_cumulative_total - $first_cumulative_total/

would try to perform a mathematical operation on two Result Tree Fragments,
and would not work.

 Does it because fop parse the xslt and after the fo ?

Yes --I think. The XSLT code is parsed/applied first (by Xalan). Then FOP
jumps in, and has its way with the resulting FO 'code'.

If you were to write just:
xsl:value-of select=$last_cumulative_total /

Then what FOP would get as input, would be:
fo:retrieve-marker retrieve-class-name=cumulative_total
retrieve-boundary=page
retrieve-position=last-ending-within-page /

 There is a not too complex solution for this problem ?

Depends... What does the source XML look like?


Greetz,

Andreas


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



RE: variable with fo value

2004-10-18 Thread Andreas L. Delmelle
 -Original Message-
 From: Andreas L. Delmelle [mailto:[EMAIL PROTECTED]
 

Sorry, slight mistake...
snip /
 If you were to write just:
 xsl:value-of select=$last_cumulative_total /
 

Should be:
xsl:copy-of ...

xsl:value-of ... won't return anything unless either:
a. the variable is defined using 'select' 
(as in xsl:variable name=... select=... /)
or
b. the variable contains only text, no markup.

Greetz,

Andreas

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



RE: Question concerning Xalan.

2004-10-14 Thread Andreas L. Delmelle

Hi,

Try:

 redirect:write select=concat('foo',position(),'.html')

...

Dunno for sure, but could even be that it needs the curly braces for an AVT,
like so:

 redirect:write select={concat('foo'...)}


One thing's for sure: ampersands definitely can't be used for string
concatenation in XSLT.


Cheers,

Andreas

 -Original Message-
 From: Johannes Franz [mailto:[EMAIL PROTECTED]
 Sent: donderdag 14 oktober 2004 19:18
 To: [EMAIL PROTECTED]
 Subject: Re: Question concerning Xalan.


 Sorry but i am really a newbie:
 When i try your example i get the following error message:


   xsl:template match=/doc/foo
 redirect:write select='foo' position() '.html'
   foo-out
 xsl:apply-templates/
   /foo-out
 /redirect:write
   /xsl:template

 java -cp xalan-2.4.1.jar;xerces-1.2.3.jar
 org.apache.xalan.xslt.Process -IN
 Redirect.xml -XSL Redirect.xsl -OUT Redirect.html -HTML
 [Fatal Error] Redirect.xsl:20:44: The reference to entity position must
 end with the ';' delimiter.

 Redirect.xsl; Line #20; Column #44; XSLT Error
 (javax.xml.transform.TransformerConfigurationException):
 javax.xml.transform.TransformerException:
 org.xml.sax.SAXParseException: The
 reference to entity position must end with the ';' delimiter.


 - Original Message -
 From: Jeremias Maerki [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, October 14, 2004 6:00 PM
 Subject: Re: Question concerning Xalan.


  Something like that maybe?
 
  xsl:template match=/doc/foo
 redirect:write select='foo'  position()  '.html'
   foo-out
 xsl:apply-templates/
   /foo-out
 /redirect:write
   /xsl:template
 
  On 14.10.2004 17:18:25 Johannes Franz wrote:
  Hi,
 
  yeah this is exactly what i needed. But could you please help
 me with the
  following problem?
  I would like to write to write every childnote to a new file. If there
  are 4
  Childnodes doc/foo
  he should write every childnote to one file: foo1.html foo2.html
  foo3.html
  foo4.html. Could someone give me example how to realize this?
 
  xsl:template match=/doc/foo
  redirect:write select=@file
foo-out
  xsl:apply-templates/
/foo-out
  /redirect:write
/xsl:template
 
 
  Jeremias Maerki
 
 
  -
  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]





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



RE: Question concerning Xalan.

2004-10-14 Thread Andreas L. Delmelle

Yep, that would be because '+' is only meant for numeric addition. Since two
of the operands are not numbers, you get NaN (IIC, short for Not a
Number...)

Cheers,

Andreas

 -Original Message-
 From: Johannes Franz [mailto:[EMAIL PROTECTED]
 Sent: donderdag 14 oktober 2004 19:42
 To: [EMAIL PROTECTED]
 Subject: Re: Question concerning Xalan.


 Hi Clay,
 when i try your way i don't get error messages. But only one file
 is created
 with the name NaN.
 - Original Message -
 From: Clay Leeds [EMAIL PROTECTED]
 To: [EMAIL PROTECTED]
 Sent: Thursday, October 14, 2004 7:34 PM
 Subject: Re: Question concerning Xalan.


  On Oct 14, 2004, at 10:18 AM, Johannes Franz wrote:
  Sorry but i am really a newbie:
  When i try your example i get the following error message:
 
   xsl:template match=/doc/foo
 redirect:write select='foo' position() '.html'
 
  I think that should be:
 
 redirect:write select='foo' + position() + '.html'
 
   foo-out
 xsl:apply-templates/
   /foo-out
 /redirect:write
   /xsl:template
 
  java -cp xalan-2.4.1.jar;xerces-1.2.3.jar
  org.apache.xalan.xslt.Process -IN Redirect.xml -XSL Redirect.xsl -OUT
  Redirect.html -HTML
  [Fatal Error] Redirect.xsl:20:44: The reference to entity
 position must
  end with the ';' delimiter.
 
  Redirect.xsl; Line #20; Column #44; XSLT Error
  (javax.xml.transform.TransformerConfigurationException):
  javax.xml.transform.TransformerException:
 org.xml.sax.SAXParseException:
  The reference to entity position must end with the ';' delimiter.
 
 
  - Original Message - From: Jeremias Maerki
  [EMAIL PROTECTED]
  To: [EMAIL PROTECTED]
  Sent: Thursday, October 14, 2004 6:00 PM
  Subject: Re: Question concerning Xalan.
 
 
  Something like that maybe?
 
  xsl:template match=/doc/foo
 redirect:write select='foo'  position()  '.html'
   foo-out
 xsl:apply-templates/
   /foo-out
 /redirect:write
   /xsl:template
 
  On 14.10.2004 17:18:25 Johannes Franz wrote:
  Hi,
 
  yeah this is exactly what i needed. But could you please
 help me with
  the
  following problem?
  I would like to write to write every childnote to a new
 file. If there
  are 4
  Childnodes doc/foo
  he should write every childnote to one file: foo1.html foo2.html
  foo3.html
  foo4.html. Could someone give me example how to realize this?
 
  xsl:template match=/doc/foo
  redirect:write select=@file
foo-out
  xsl:apply-templates/
/foo-out
  /redirect:write
/xsl:template
 
 
  Jeremias Maerki
 
 
  -
  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]
 
 
  Web Maestro Clay
  --
  Clay Leeds - [EMAIL PROTECTED]
  Webmaster/Developer - Medata, Inc. - http://www.medata.com/
  PGP Public Key: https://mail.medata.com/pgp/cleeds.asc
 
 
  -
  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]





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



RE: Question concerning Xalan.

2004-10-14 Thread Andreas L. Delmelle
 -Original Message-
 From: Johannes Franz [mailto:[EMAIL PROTECTED]

 Thanks.
 Your version provided the right way. Do you know a page with examples for
 the xslt functions? So that i don't have to strain this list all
 the time.
 :)


Check: http://www.dpawson.co.uk/xsl/sect2/sect21.html

Examples organised by theme.  Lots and lots of them... :)

 One last problem still remains. The position seems to be
 multiplicated with two.
 I mean the name of the files is foo2.html foo4.html and so on. Thats
 not very terrible, but perhaps there is a way to devide position by 2. :)


Sure, if you really know for sure it's always going to be a multiple of 2,
try:

concat('foo',position() div 2,'.html')

But with that result, I can't help but wonder what the XML structure looks
like (as well as your XSL template one level up, where it's applied to the
'/doc/foo' nodes)... Any reason why the processed node's position in the
node-set is always double of what you would expect?


Cheers,

Andreas


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



RE: Question concerning Xalan.

2004-10-14 Thread Andreas L. Delmelle
 -Original Message-
 From: Andreas L. Delmelle [mailto:[EMAIL PROTECTED]
  -Original Message-
  From: Johannes Franz [mailto:[EMAIL PROTECTED]
snip /
  One last problem still remains. The position seems to be
  multiplicated with two.
  I mean the name of the files is foo2.html foo4.html and so on. Thats
  not very terrible, but perhaps there is a way to devide
  position by 2. :)
 
 ... Any reason why the processed node's position in the
 node-set is always double of what you would expect?


Come to think of it: are you maybe using

xsl:apply-templates select=node() /

?

This would also make position take into account possible text nodes in
between the '/doc/foo' elements.

In that case, better use:
xsl:apply-templates select=* /

Or, a maybe even a little more efficient:
xsl:apply-templates select=/doc/foo

Cheers,

Andreas


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



RE: FW: OutOfMemoryError by large tables: Alternative solution?

2004-06-15 Thread Andreas L. Delmelle
 -Original Message-
 From: [EMAIL PROTECTED]


Hi,

 There are some items where I am still a bit confused.

snip /
 As to splitting up the table:
 J.Pietschmann wrote:
  It's not enough to reduce memory consumption. In order to
  reclaim memory locked up in Area objects related to the
  table, the FOs itself have to be reclaimed, which only
  happens at the end of a page sequence.

 I am quite new to XSL:FO but I think that you can only have one
 body-flow inside a page-sequence?
snip /
 If so, and it has no (positive) impact if I have more tables or not, then
 the only possibility is to split the source (xml) and run more times?


Not at all. You just need to rewrite your XSL to produce, one page-sequence
for every N rows or tables. Where you now apply-templates to *all* tables in
the document, you could opt to apply-templates to groups of tables, let's
assume 3 tables per page-sequence. This would lead to the following
pseudocode:

...
  xsl:apply-templates select=//tables[position() mod 3 = 1]
   mode=table-group /
...
xsl:template match=tables mode=table-group
  fo:page-sequence master-ref...
fo:flow ...
  xsl:apply-templates select=. | following::tables[position()  3] /
/fo:flow
  /fo:page-sequence
/xsl:template

etc.

HTH!

Greetz,

Andreas


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



  1   2   3   4   >