Jump to content

raptorw3s

Members
  • Posts

    5
  • Joined

  • Last visited

raptorw3s's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. Ok... what I really need is vertical-align: http://www.ibloomstudios.com/article6/The effects that I need are those of 'middle' and 'text-top' alignments... but it will not be simple as that.I discovered that the parser implementation I'm using is quite limited, with some non-implemented functions, like "vertical-align", including some other involved ones that I tried based on the specs: "alignment-adjust", "alignment-baseline" and "dominant-baseline".So I need to implement the vertical-align in a manual way for 'middle' and 'text-top' with probably very basic functions... If you have read this up to here, I hope you can help me!thanks!
  2. I'm trying to archive a certain effect with baseline-shift, but I can't get it right!Description: By the side of a certain text, I want smaller sized text (parametrized), aligned to the bottom, top or middle of the previous text limits.It works exactly as reducing the font size, in this case it's the 'bottom' alignment... this one is trivial. But for 'middle' and 'top' alignments, I couldn't get the same effect.Let's try some ascii art to draw it... BOTTOM:| ||--|| | HMIDDLE:| ||--| H| |TOP:| | H|--|| | I guess it's nice enough to understand... =PThe smaller text cannot be below/above the bottom/top of the previous text.Up to now, I was trying to get this using baseline-shift, but looking at the effect that different values of it produce, I think I'm using the wrong tag. Just now I was also trying vertical-alignment, but no success.Can anyone point me out how to do it?Many thanks in advance!
  3. Oh my! I never expected someone posting a full solution!Many many thanks, aalbetski!It helped me a lot! I could adapt it to my macros and it's working nicely! :)And... just wondering, this approach is really the only one for this issue?I mean, there's no way to avoid building my own masks per input, right?
  4. Thanks, but you haven't got my problem.I have exactly what you posted (except that my format is '$#.##0,00'). It works fine, but does not respect non-significant zeros to the left/right, if present. I cannot insert extra 0's if they're not present (except for the basic ones - 0,00). I need a generic format that handles all cases.Examples of inputs/outputs that I need:1.6 => $1,602638.643 => $2.638,6431234567.89 => $1.234.567,8900001.9 => $00.001,9023.934000 => $23,9340000000037.3600000 => $0.000.037,3600000That IS weird, but that's what I need I was checking on what I can do with XSLT, and I'm afraid the only solution is to generate the format I need for every input. It sounds like a very dirty workaround, but I haven't found any other alternative. What I have in mind till now is:- use translate to turn all the input numers to 0's- split it into integer and decimal parts (with substring-after/before)- integer part: make sure it contains at least one 0, and if it contains at least 4 characters, insert a '.' in the 4th position from the right (still have to figure out how to do this)- decimal part: make sure it contains at least two 0- concat the two parts again, with a ',' between themSounds bad, doesn't it?If anyone can point out a better solution, I really appreciate!Thanks again!
  5. Hi everybodyI've got a problem to solve, and I'm totally unfamiliar with XSLT This is my question: I receive currency values, and must format them in some given format, but respecting non-significant 0's. This is what I have in my hands now:string(format-number($someprice,'$#.##0,00', 'a_decimal_format'))Some inputs => outputs:0.1 => $0.101234567.89 => $1.234.567,89Now, this is the the problem: an input like 0001.6 will produce $1,60, but what I want is $0.001,60 (don't ask me why!). For the same reason, if the input is 04.49280, I want $04,49280 instead of $4,49.I hope I can get a generic solution, because my format can change, like 'ยง#.#0,0000'How can I get this result I need?Any tip is greatly appreciated!Many thanks in advance!
×
×
  • Create New...