Hi,
 
A very interesting discussion.
 
I tried the latest suggestion:
height="{concat($height,'+10px')}"
 
and got an error:
[ERROR] svg graphic could not be built: null:-1
The attribute 'height' of the element <rect> is invalid
org.apache.batik.bridge.BridgeException: null:-1
The attribute 'height' of the element <rect> is invalid
 
I guess it doesn't want to add numbers with units ....
 
Thanks,  Mike


"Andreas L. Delmelle" <[EMAIL PROTECTED]> wrote:
> -----Original Message-----
> From: Mike Kellstrand [mailto:[EMAIL PROTECTED]


Hi,

>
> Not to nit-pick, but for posterity, the syntax I ended up with is:
>
> width="{concat(substring($width,1,string-length($width)-2)+10,'px')}"
>
> If anyone else wants to chime it with any of the subtler details of this
stuff,
> feel free to educate me further.

Well, Clay was right (and IIC, I'm the one who corrected Clay in the thread
he remembered) and the problem is actually that it's Xalan (or any other
XSLT processor for that matter) that can't add numbers to strings...

You may want try:

width="{concat($width,'+10px')}"

In this way, the value of the width property that FOP gets to see is, for
example:

width="1px+10px"

in which case FOP should have no problem with it. Right now you're trimming
the measurement units and have Xalan do the calculation, and FOP gets to see
for example:

width="11px"

which comes down to the same thing, of course, but wouldn't be usable if the
'10px' were to be an _expression_ in itself rather than a literal value.


HTH!

Greetz,

Andreas


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


Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger

Reply via email to