Right Justify string value in Transformation

Hi need help
I have a transform like this.. I need to add 4 spaces before the String "MARKED"
<ns0:dest>
<xsl:value-of select='concat(" ","MARKED")'/>
</ns0:dest>
but I always get result as
<dest>MARKED</dest> instead of <dest> MARKED</dest>
How do I get spaces before string..

If you add them to the end, they disappear too ?
can you try adding string() around the " ","MARKED" and second test around the concat().
don't have a running soa suite installation over here so need to do some guessing

Similar Messages

  • Right Justifying String output

    I have created a program to create directories and files and navigate them. The problem im stuck on is that
    I'm trying to print the working directory (as a subdirectory) so Im wanting to right justify the current directories name, then call the parent Directory and print its name on the left side of it etc....until I get to root directory.
    How do I output the String to the terminal in this fashion ?
    Cheers

       public static final int FILL_TO_LEFT = 0;
       public static final int FILL_TO_RIGHT = 1;
       /** Right alignment of string based on the passed width */
       public static String alignRight(String origstr, int width) {
          String retstr = origstr;
          if (retstr == null) retstr = "";
          retstr = retstr.trim();
          if (width > retstr.length()) {
             retstr = fillSpaces(retstr,width,FILL_TO_LEFT);
          else {
             if (width < retstr.length()) {
                retstr = retstr.substring(0,width);
          return retstr;
       /** Fill string with a char based on filling type */
       public static String fillChar(String origstr, int width,
                                     String fillchar, int filltype) {
          String retstr = origstr;
          if (retstr==null) retstr = "";
          retstr = retstr.trim();
          switch(filltype) {
             case FILL_TO_LEFT:  {
                                   while (retstr.length()<width) retstr = fillchar + retstr;
                                   break;
             case FILL_TO_RIGHT: {
                                   while (retstr.length()<width) retstr = retstr + fillchar;
                                   break;
          return retstr;
       /** Fill a string with spaces based on passed width and filling type */
       public static String fillSpaces(String origstr, int width, int filltype) {
          return fillChar(origstr, width, " ", filltype);
       }

  • How to align a String value to the right side inside a table column?

    Hi,
    I have a text view inside a table column which is mapped to a string attribute. I need to align the text in the text view to the right hand inside the table column. But its always getting aligned towards the left side. I have tried by setting the <b>hAlign</b> property of Element properties of Text View to <b>right / forced right</b> but still the text is getting aligned to the left side.
    How do I align the String values in Text View towards the right hand side inside a Table Column?
    Thanks and Regards,
    Sayan Ghosh

    Hello Sayan,
    if i do get it right, you are adding an TextView element to a Table Cell. Then you should consider setting aligment within the particular cell. By calling:
    YourCell.setHorizontalAlignment(CellHAlign.RIGHT)
    regards.
    mz

  • Justify indicator value to right

    Hi
    how can I set the value of a control or an indicator to the right generally in LV7. I don't want to change it all the time.
    thanks
    Yves

    This was done in LV6.1, but it should be the same in LV7.
    Open a new vi and insert the default indicator. Right Click on it->Advanced->Customize
    Select the text and right justify it.
    Save it as a new control and close the custom control interface.
    On the front panel, right click to get the controls palette, selct User Controls (bottom right) and tack it down (pushpin). Hit Options (top right), edit pallete. Right click on User Controls window->Insert and choose your new indictor, with right justification. Save it out.
    Whenever you wnat it, there it is under User Controls.
    2006 Ultimate LabVIEW G-eek.

  • Lpad .. correct use to right justify a char field?

    Hi all,
    I have a column that's a char type, and I'm trying to manipulate justification within it.
    SQL> create table test (test char(14));
    Table created.
    SQL> insert into test values (' 001234567890');
    1 row created.
    SQL> select * from test;
    TEST
    001234567890
    ..I have no probs making it left justified using ltrim
    SQL> update test set test=ltrim(test);
    1 row updated.
    SQL> select * from test;
    TEST
    001234567890
    ...but when I try to right justify using lpad I can't get it to work:
    SQL> update test set test=lpad(test,14,' ');
    1 row updated.
    SQL> select * from test;
    TEST
    001234567890
    ..this should pad the column with blanks to make the string 14 in length right?
    What am I doing wrong?
    Thanks !
    Adam

    Hi, Adam,
    A CHAR (14) column is always 14 characters long. If you insert a shorter string, it is automatically RPADded.
    If LENGTH (test) = 14, then
    lpad(test,14,' ')
    simply returns test. So your UPDATE statement is equivalent to
    update test set test= test;
    Every row will get UPDATEd, but nothing will get changed.
    To have the strings left-padded, use LPAD before INSERTing, or use UPDATE wtih LPAD and TRIM, like this:
    UPDATE  test
    SET     test = LPAD ( RTRIM (test)
                        , 14
                        );

  • BEX Query Web-Convert Key Fig to Characteristic-Right justify characteristi

    Hi,
    I have converted a Key Figure into a characteristic. Let's call the new characteristic Z_NUMCHAR.
    When Z_NUMCHAR is displayed in the BEX Query (HTML), it is left justified.
    I have concatenated additional SPACES to the front of Z_NUMCHAR. However when Z_NUMCHAR is displayed, the spaces are removed.
    I have also tried concatenating a letter to the front of Z_NUMCHAR and then a string of spaces, but the spaces are removed. 
    Does anyone have any suggestions on how to right justify a characteristic?
    My worst case solution is to add leading underscores.  _____5482.214
    But would rather see it look like a Key Figure.                           5482.214
    Thanks

    Hi Sebastian,
    I have a similar problem. Can you help me? How did you set the entry in Member Presentation of Command SET_PRESENTATION to display key and text? I just found the values to set the only text or only key.
    best regards,
    Barbara

  • Right justify character

    hi All,
    I am having a requirement. client wants to download a record into a .txt file. now the record is AAAASPACEBBBBBDDDD.
    now the problem is DDDD is decimal value and i m converting it to character. however though now the client wants the record such as the field DDDD should be right justfied. now i can right justify if decimal value but since i have converted it to character so that i can use concatenate and write to a file on Pc, i am not able to right justify it.
    can someone give me some suggestions,
    thanks,
    gaurav

    Hi,
    Try with this code.
    Data: v_string type string.
    Data: v_len type i.
    Data: v_int(10) type n.
    Data: v_char(10) type c.
    CONSTANTS c_six(6) type c value '      '.
    v_string = 'Amandeep Sharma1981'.
    v_len = strlen( v_string ).
    v_len = v_len - 4.
    v_int = v_string+v_len(4).
    v_char = v_int.
    v_char+0(6) = c_six.
    Concatenate v_string+0(v_len) v_char into v_string.
    I have taken your numerical value as 4 characters. you can modify as and how you want.
    Regards,
    Aman

  • Right justify output

    Hi, how do u right justify the output for the below code - not GUI based.
    for (int x=7; x<=10; x++){
    System.out.println(x);
    The output is:
    7
    8
    9
    10
    but i want this format:
    (space)7
    (space)8
    (space)9
    10
    thank you.

    Well, the %d format specifier wants an integer, and you're passing it a string.
    Calling a method as the value passed to printf should not in itself be a problem.
    You probably want to do something more like:
    System.out.printf("%02d    %d%n", x, test());Depending on what test() returns.

  • How to update a string value located on the main VI

    Hello
    I would like, from a subVI, to update a string value located in the main VI (using References). I was trying to find examples on NI web page but it´s impossible to download them (for more than one month : Error, File Not Found), do everyone has got the same problem?
    Thanks for your answer
    Nicolas

    Hi,
    this is from LV help file:
    Complete the following steps to create a subVI that includes a control reference directly from a Property Node.
    1.On the block diagram, right-click the front panel object terminal for which you want a control reference and select Create»Property Node from the shortcut menu to create a Property Node implicitly linked to the object. You can have multiple Property Nodes for multiple front panel objects.
    2.Use the Positioning tool to select the new Property Node and select Edit»Create SubVI from menu. LabVIEW automatically creates a control reference to the control on the block diagram of the main VI, creates a subVI that contains a control refnum wired to a Property Node, and wires the control reference on the main VI to the
    control refnum input terminal of the new subVI.
    Note: Select several Property Nodes at once to create a subVI with multiple control refnums and Property Nodes.
    3.Double-click the subVI to open it. Modify the Property Node and other elements of the subVI as you do in any other VI.
    4. If you want to change values of control then select "Value" property in Property node.
    I've attached the examples.
    Good luck.
    Oleg Chutko.
    Attachments:
    Ref.zip ‏11 KB

  • A more efficient way to assure that a string value contains only numbers?

    Hi ,
    I'm using Oracle 9.2.0.6.
    I was curious to know if there was any way I could write a more efficient query to determine if a string value contains only numbers.
    Here's my current query. This SQL is from a sub query in a Join clause.
    select distinct cta.CUSTOMER_TRX_ID, to_number(cta.SALES_ORDER) SALES_ORDER
                from ra_customer_trx_lines_all cta
                where length(cta.SALES_ORDER) = 6
                and cta.SALES_ORDER is not null
                and substr(cta.SALES_ORDER,1,1) in('1','2','3','4','5','6','7','8','9','0')
                and substr(cta.SALES_ORDER,2,1) in('1','2','3','4','5','6','7','8','9','0')
                and substr(cta.SALES_ORDER,3,1) in('1','2','3','4','5','6','7','8','9','0')
                and substr(cta.SALES_ORDER,4,1) in('1','2','3','4','5','6','7','8','9','0')
                and substr(cta.SALES_ORDER,5,1) in('1','2','3','4','5','6','7','8','9','0')
                and substr(cta.SALES_ORDER,6,1) in('1','2','3','4','5','6','7','8','9','0')This is a string where I'm finding A-Z-a-z characters and '/' and '-' characters in all 6 positions, plus there are values that are longer than 6 characters. That's what the length(cta.SALES_ORDER) = 6 is for. Also, of course. some cells are NULL.
    So the question is, is there a more efficient way to screen out only the values in this field that are 6 character numbers or is what I have the best I can do?
    Thanks,

    I appreciate all of your very helpfull workarounds. The cost is a little better in all cases than my original where clause.
    To address the discussion that's popped up about design from this question, I can say a few things that should clear , at least, my situation up.
    First of all this custom quoting , purchase order , and sales order entry system WAS written by a bunch a of 'bad' coders who didn't document their work and then left. We don't even have an ER diagram
    The whole project that I'm only a small part of is literally trying to put Humpty Dumpty together again and then move it from a bad custom solution into Oracle Applications.
    We're rebuilding, documenting, and doing ETL. This is one of your prototypical projects from hell.
    It's a huge database project so we're taking small bites as a time. Hopefully, somewhere right before Armageddon hits, this thing will be complete.
    But until then,..., well,..., you know the drill.
    Thanks Again.

  • Cursor Doesn't display in numeric right justified fields

    We have an aplication that we deployed at a client. Normally the cursor blinks in the field that has focus. However, at this particular client the cursor doesn't show on numeric fields that are right justified. The user can type in the values though. Please help.
    Alok

    Hello,
    Maybe you can increase the width of field.
    Regards,
    George
    We have an aplication that we deployed at a client. Normally the cursor blinks in the field that has focus. However, at this particular client the cursor doesn't show on numeric fields that are right justified. The user can type in the values though. Please help.
    Alok

  • Tab delimited and Right justified fields

    Hi
    My requirement is to produce an output file where the line items consists of 5 fields of variable lengths and all of them are tab delimited and right justified at the same time
    for eg.
    ABC       123456ghtje  4567.45678   67.45678  pqr
    where all the values in the first field 'ABC' and 2nd field '123456ghtje' are right justified and are tab delimited and asme is the case for '4567.45678' , '67.45678' and 'pqr'
    they are all separated from each other by a tab but are not fixed lengths
    How can i achieve that ? i am using File Receiver Adapter ??
    Can it be done without Adapter Module ?
    Thanks
    Dev
    Edited by: sd on Feb 22, 2010 2:25 PM
    Edited by: sd on Feb 22, 2010 2:26 PM

    > they are all separated from each other by a tab but are not fixed lengths
    When thay are not fixed length fields, why do you have to worry about left or right justification? In delimetted files, you would only have the delimitter between the fields. You do not need to fill spaces for justifying them.
    VJ

  • Problems converting string value to database timestamp

    I have values coming from a flat file in the form YYYYMM. I need to convert this value to a database timestamp. The reason for this is, furhter down in the flow, I need to bump this value up against a database table column in the form of YYYYMMDD HH:MM:SS.
    The first thing I do is tack on a day to the value so I have a string value in the form of YYYYMMDD. Once this is done, I then try to pass the value to a data conversion transformation. A sample value looks like this:
    20140801
    When I try to conver the string to DT_DBTIMESTAMP, I get:
    "The conversion returned status value 2 and status text "The value could not be converted because of a potential loss of data.".
    I don't get it. The string is length 50. What am I missing?

    Had to break apart the source.
    SUBSTRING([Paid Period],1,4) + "-" + SUBSTRING([Paid Period],5,2) + "-01 " + "00:00:00.000"

  • Right-justify number columns in BC4J

    I have several JSP pages that I am using BC4J tags in. I want to right justify all dollar columns. In addition, I want some columns to have a default width regardless of the data in them. For instance, even if a column has 'Test' in it, I want it to have a display width of 50.
    How can I accomplish these two things?
    Thanks,
    Brett

    Sounds like you might want to add properties to the attributes in your VO. If you set up some properties to hold values for alignment and width for each column, you can just interogate these values when you render the JSP and writre them into the HTML.
    Matt

  • How to do Right Justified in the mappin

    Hi friends,
    Can you help me to do the right justified for example 39.56- this should right side not from left. this field length is 11. infront of this 39.56 should be blank spaceses paded. how to do this
    please help me
    Thanks
    ramidi

    Ramidi,
    Create simple UDF. Let say my input parameter name is "abc" . Write the below code in it
    StringBuffer pad= new StringBuffer();
    String ret_string="";
    int add=0;
    int trunc=0;
    if(abc.length()<=11)
    add =11-abc.length();
    if(abc.length()>11)
    ret_string =abc.substring(0,11);
    else
    for(int i=0;i<add;i++)
    pad.append(" ");
    ret_string = pad.toString()""abc;
    return""ret_string"";
    Hope it helps!!!
    Best regards,
    raj.

Maybe you are looking for

  • Problem with constructor of inner class.

    Hi everybody! I have an applet which loads images from a database. i want to draw the images in a textarea, so i wrote an inner class, which extends textarea and overrides the paint method. but everytime i try to disply the applet in the browser this

  • Cf8 report builder characterEncode ?

    HI,all I am using win xp sp3/cf8.01, cf8 report builder,mssql2k5,IE6 There is the following requirement in a program:  When there is Chinese character in the label of report builder, but not get Chinese from the Database, as the picture illustrate be

  • Background colors for tables

    Am using CS5 and would like to have "just" the interior of the table to have a specific background color.  Currently - using the code below - I receive the following result with white appearing outside the table perimeter.  Would also like to be able

  • Link bundle between 2950 & 7204VXR (NPE400)

    Dear Team, We have made etherchannel between Cisco WS-C2950T-24 L2 & Cisco 7204VXR (NPE400) router for load balancing purpose. But the traffic from L2 switch to router is just being forwarded on single port & other port is idle while router is proper

  • I type in my correct password to get in my iPad and it's telling me it's incorrect

    Sorry no image