How to replace one double quotes with two double quotes in XSLT

How can I replace one double quote to a two double quote in a string in XSLT
I am passing the parameter string to XSLT template contains the value as
<xsl:variable name="Description">Hi! "How are you</xsl:variable>
<xsl:variable name="VQuotes">""</xsl:variable>
I nead the output as
Hi! ""How are you.
Tried with Translate function, but it did not work out
<xsl:element name="DESCRIPTION_SHORT">
          <xsl:value-of select="translate($Description,'&quot;', VQuotes)" />
        </xsl:element>But it is giving the same result as Hi! "How are you
When I tried with
<xsl:element name="DESCRIPTION_SHORT">
          <xsl:value-of select="translate($Description,'&quot;', 'BB')" />
        </xsl:element>
It gave the result as
Hi! BHow are you.
It is replacing only one character with one. how to make it for two characters.
Am I doing anything wrong in syntax?
Please help.
Regards, Vignesh S

Hi Vignesh,
Try this.
Its a two step process:
Step1: Add the following template would be "called" to do the replacement as your want:
<xsl:template name="string-replace-all">
<xsl:param name="text" />
<xsl:param name="replace" />
<xsl:param name="by" />
<xsl:choose>
<xsl:when test="contains($text, $replace)">
<xsl:value-of select="substring-before($text,$replace)" />
<xsl:value-of select="$by" />
<xsl:call-template name="string-replace-all">
<xsl:with-param name="text"
select="substring-after($text,$replace)" />
<xsl:with-param name="replace" select="$replace" />
<xsl:with-param name="by" select="$by" />
</xsl:call-template>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$text" />
</xsl:otherwise>
</xsl:choose>
</xsl:template>
Step2: Call the above templeate in the place where you want to call, like this:
<!--Define the variables-->
<xsl:variable name="Description">Hi! "How are you</xsl:variable>
<xsl:variable name="sQuotes">"</xsl:variable>
<xsl:variable name="VQuotes">""</xsl:variable>
<!--Following call the template which you have defined in step1-->
<xsl:element name="DESCRIPTION_SHORT">
<xsl:variable name="myVar">
<xsl:call-template name="string-replace-all">
<xsl:with-param name="text" select="$Description" />
<xsl:with-param name="replace" select="$sQuotes" />
<xsl:with-param name="by" select="$VQuotes" />
</xsl:call-template>
</xsl:variable>
<xsl:value-of select="$myVar" />
</xsl:element>
I have tested this and works. And outputs as the following with two-double quote as you want.
<DESCRIPTION_SHORT>Hi!
""How are you</DESCRIPTION_SHORT>
If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

Similar Messages

  • How to link one scroll bar with two dynamic text boxes.

    How to link one scroll bar with two dynamic text boxes.
    If i move scroll bar in one text box,automatically text will
    be moved in another text box.But scroll bar is not visible.
    Can you please help me.
    Thanks in advance.

    See the following article:
    JavaScript - setFocus Method for tabbing to next form field
    And see if iOS can even handle the sample form.
    iOS and android devices are not a powerful as your desktop of laptop computer and have limited support for JavaScript within PDF forms. This limitation for specific apps ranges from none to quite a bit but not all JavaScript.

  • How to create one soap interface with two soap action?

    Hi,
    I need to create one SOAP Interface with two or more webmethods (soap action), for example:
    Interface: MI_Outb_User
    Webmethods: createUser, searchUser, deleteUser.
    Can anybody helpe me?

    Hi Santos,
    I assume you will use one action at a time and depending upon certain condition you want to invoke the webservice and the corresponding action. If this is yes, then please check michaels reply in this thread:
    How can I handle serveral soap actions 
    or see stefans reply:
    Re: Is SOAP Adapter Action field can contain 2 or more "SOAP Actions"
    If this is not, then please ignore it.
    Regards,
    ---Satish

  • How to replace one BC template with another

    I am using an existing BC template and want to change to a new template (same domain) - any thoughts on how to achieve this?
    Thanks.

    Change a BC template to another? You can not at this stage on that same site, you would have to create a new site yourself or update everything manually

  • Replace one itunes account with another

    I have the itunes application downloaded on my laptop but i recently made another itunes account and i want the new one to be on the Itunes application. So i uninstalled the application thinking that if i downloaded it again it would ask me for an account. Except all it did was restore the old account. I am wondering if anyone knows how to replace one itunes account with another. If you know anything that can be useful comment.

    Store > Sign Out
    Store > Sign In
    All purchases remain tied to the account used to buy them, but you can authorize iTunes to multiple accounts and put protected content from up to five on your devices. Generally best to stick to one account if possible. More so once you get to iOS devices as managing app updates over multiple devices is a chore.
    tt2

  • I have one itunes account with two phones. when i phone one of the numbers both phones have started to ring, only when connected to wifi at home. How do i resolve this please?

    I have one itunes account with two phones assigned to it, sons and daughters, (5s). When i phone one of the numbers both phones have started to ring, only when connected to wifi at home. The problem does not occur when not connected to wifi. How do i resolve this please? texting is fine it is only when ringing one of the numbers.

    <http://support.apple.com/kb/HT6337>
    "To turn off iPhone Cellular Calls on a device, go to Settings > FaceTime and turn off iPhone Cellular Calls."

  • How can I use an iPad with two itunes accounts?

    How can I use an iPad with two itunes accounts?
    Hi there
    My partner has a works iPad, which has her works Apps on (ones that are specifically made by her company and are NOT available in the App store).
    What I want to be able to do is to ALSO have my itunes account on there so that I can put all the apps I have purchased previously from my iPhone on it.
    This is so I can put on VLC player (thats already in my itunes account) so I can add videos to the iPad.
    How do I do this please?
    I tried it before by connecting it to my mac, but it wiped everything off the iPad completely and also deleted the data settings for using 3G.
    So I want to avoid this happening again the future as it had to be sent back to her head office to be sorted again.
    Any advise please?
    Thanks

    You can't. The iPad is desgined to be a 'one user' device and only really works with one apple ID at a time.
    The only way would be if she, at work and with her work apple id, downloaded your apps (repurchasing them of course).
    It's not meant to be a multiple user/multiple ID device.

  • One controlling area  with two company codes assigned with one CoA

    Hi,
    I   am having one controlling area  with two company codes assigned , i am using the same  gl for two company codes  as cost element , when i am positng the  miro for vendor purpose  it posted the error  , to avoid the  price difference purpose , i have given  one cost center  of  first company code in OKB9 , and  overcome the error , entries posted, when i am posting new entry for MIRO   in secod  company codes with same cost  element ,  price difference of that account should go to the other cost center  which specifically created for second company code,  in the OBK9 i have given  cost center first company code   of the same GL  account , now this is another new entry in the second company code with other cost center in the second company code  since the price difference  account should sit in the other cost center of second company code,  how to  over come  this problem, pls help me
    Thanks and regards
    Murugesan

    Hi,
    First, remove the default cost center in the cost element. Then, for the system to derive the correct cost center for each company codes, define one cost center for each compny codes in OKB9 just like this:
    Co Code   Cost Element   Cost Center
    1000          1000000              A
    2000          1000000              B
    So during MIRO, the system will derive these values you maintain in OKB9.
    Regards,

  • Is there a way to share one music library with two seperate icloud accounts?

    Is there a way to share one music library with two seperate icloud accounts? I have over 12,000 songs in my library and my son likes the same music, but recently his ipod touch is picking up the texts from my wife's and my phone? I was told the only way to stop this is by giving him his own icloud account which would mean he wouldn't have access to my music library. Any ideas?

    He can still use your Apple ID for iTunes content, no issues. He just gets a separate ID for everything else.

  • How do I use Home Sharing with two different apple accounts?

    How do I use Home Sharing with two different apple accounts?

    Morning Saintine,
    Thanks for using Apple Support Communities.
    Home Sharing enables you to stream or transfer music, movies, TV shows, apps, and more among up to five authorized computers in your household. To do so, you will need to Turn on Home Sharing on each computer using the same Apple ID.
    Understanding Home Sharing
    http://support.apple.com/kb/HT3819
    Hope this helps,
    Mario

  • How to use one commandButton to execute two tasks in JSF

    I have a form in JSF page which contains different faces components. These faces bind to ADF BC to insert one row in the database when the user press commandButton. Also I need to bind the value of one inputText in that form to managed bean to execute another task in the application when the user press the same commandButton.
    The code of the inputText:
    <h:inputText value="#{bindings.ProjectNumber.inputValue}"
    id="pn"
    size="10"
    required="#{bindings.ProjectNumber.mandatory}">
    The code of commandButton:
    <h:commandButton actionListener="#{bindings.Commit.execute}"
    value="Save"
    disabled="#{bindings.Commit.actionEnabled}"/>
    The managed bean is �findInspector�. I tried to insert inputHidden inside commandButton tag and assign the value of the inputText to the inputHidden as follows:
    <h:commandButton actionListener="#{bindings.Commit.execute}"
    value="Save"
    disabled="#{bindings.Commit.actionEnabled}">
    <h:inputHidden value="#{bindings.ProjectNumber.inputValue}" binding="#{findInspector.project}"/>
    </h:commandButton>
    But it was not work
    Please how can I write the code to use the value of the inputText more than one time in the JSF(one to insert one row by using ADF BC and another to use the same value to bind to a managed bean) and how to use one commandButton to execute two tasks in JSF.
    Thank you
    Waheed

    Just dopublic void execute() {
        anotherAction(inputValue);
    I guess those articles might be interesting about passing params and the usage of inputHidden and also about using datatables:
    http://balusc.xs4all.nl/srv/dev-jep-com.html
    http://balusc.xs4all.nl/srv/dev-jep-dat.html

  • How to use one commandButton  to execute two task in JSF

    I have a form in JSF page which contains different faces components. These faces bind to ADF BC to insert one row in the database when the user press commandButton. Also I need to bind the value of one inputText in that form to managed bean to execute another task in the application when the user press the same commandButton.
    The code of the inputText:
    <h:inputText value="#{bindings.ProjectNumber.inputValue}"
    id="pn"
    size="10"
    required="#{bindings.ProjectNumber.mandatory}">
    The code of commandButton:
    <h:commandButton actionListener="#{bindings.Commit.execute}"
    value="Save"
    disabled="#{bindings.Commit.actionEnabled}"/>
    The managed bean is “findInspector”. I tried to insert inputHidden inside commandButton tag and assign the value of the inputText to the inputHidden as follows:
    <h:commandButton actionListener="#{bindings.Commit.execute}"
    value="Save"
    disabled="#{bindings.Commit.actionEnabled}">
    <h:inputHidden value="#{bindings.ProjectNumber.inputValue}" binding="#{findInspector.project}"/>
    </h:commandButton>
    But it was not work
    Please how can I write the code to use the value of the inputText more than one time in the JSF(one to insert one row by using ADF BC and another to use the same value to bind to a managed bean) and how to use one commandButton to execute two task in JSF.
    Thank you
    Waheed

    Yes I did
    <managed-bean>
    <description>The bean for get project No</description>
    <managed-bean-name>projectBean</managed-bean-name>
    <managed-bean-class>
    mcscm.model.ProjectBean
    </managed-bean-class>
    <managed-bean-scope>request</managed-bean-scope>
    <managed-property>
    <property-name>bindings</property-name>
    <value>#{bindings}</value>
    </managed-property>
    </managed-bean>
    Also I changed the method in the managed bean as follows:
    public String commandButton_action() {
    FacesContext fctx = FacesContext.getCurrentInstance();
    ValueBinding vb = fctx.getApplication().createValueBinding("#{bindings}");
    DCBindingContainer dcb = (DCBindingContainer) vb.getValue(fctx);
    OperationBinding operation = (OperationBinding) dcb.get("projectNumber");
    operation.execute();
    return null;
    where projectNumber is my method in the java class of the application module "TaskInformationImpl". I made this method to be accessed from outside of ADF BC.
    I just create a sample code for projectNumber method for testing only as:
    public void projectNumber (String data){
    System.out.print(data);
    In the page Pagedef file I added this :
    <methodAction id="projectNumber"
    InstanceName="TaskInformationDataControl.dataProvider"
    DataControl="TaskInformationDataControl"
    MethodName="projectNumber" RequiresUpdateModel="true"
    Action="999" IsViewObjectMethod="false">
    <NamedData NDName="data" NDValue = "#{bindings.ProjectNumber.inputValue}" NDType="java.lang.String"/>
    After I did all of this I get a new error like:
    javax.faces.FacesException: #{projectBean.commandButton_action}: javax.faces.el.EvaluationException: java.lang.ClassCastException: oracle.adfinternal.view.faces.model.binding.FacesCtrlAttrsBinding cannot be cast to oracle.adf.model.OperationBinding
    Is it very difficult to do this in JDeveloper?. yes ADF BC provide me a lot of facilities, but when I want to do a specific task I face a lot of troubles

  • How do I create a graph with two different y-axis variables with the same x-axis (therefor having two curves)?, How do I create a graph with two different y-axis variables with the same x-axis (therefor having two curves)?

    How do I create a graph with two different y-axis variables with the same x-axis (therefor having two curves)?, How do I create a graph with two different y-axis variables with the same x-axis (therefor having two curves)?

    Hi Libby,
    Select all three columns of data. All three must be 'regular' columns, not Header columns, and the X values must be in the leftmost column.
    Click the Charts button and choose the Scatter chart.
    The resulting chart will initially show only the first and second columns of data, and the selection will have been reduced to show this.
    Click the gear icon at the top left of the selection and choose Share X Values.
    You should see a result similar to this:
    Notes:
    The values on my sample table contain a random element, so they have changed from thhe first image to the second.
    The chart is as created by Numbers, with two edits:
    Data points have been connected with curves, using the Chart nspector.
    The curves were selected and their stroke increased to 2pts, using the stroke formating button in the format bar.
    Regards,
    Barry

  • How to replace # or Not assigned with blank in BEx Query Output.

    Hi,
    While running the query through BEx Query desginer or Anlayser, I am getting # or Not assigned where there are no values.
    The requirement is to "Replace # or Not assigned with a blank" in the output.
    I want to know, is there any setting in BEx query desginer where we can do this. How to do this.
    Please share your inputs on this. Any inputs on this would be appreciated.
    Thanks,
    Naveen

    Check out SDN-thread: "Re: Remove 'Not assigned'" for more details
    Ideas from SDN research:
    "a solution i have used is to put each RKF column in a CKF colum then in each CKF use RKF + 0, the outcome is that your # should now be 0s, in the query properties you can set the option to display 0s as blank."
    "try to enter a text for the blank entry in the master data maintenance of the relevant objects and set the display option for the objects to 'text'."
    Threads:
    SDN: How to replace # or Not assigned with blank in BEx Query Output.
    SDN: Re: Remove 'Not assigned
    SDN: How to replace # or (Not assigned) with blank in BEx Query Output.
    SDN: Bex Analyzer : Text element system's table ?  
    SDN: change message in web application designer ["nonavailable" ->  136 of SAPLRRSV]
    SDN: Not Assigned ["Not Assigned -> 027 of SAPLRRSV]
    SDN: replacing '#'-sign for 'not assigned' in queries
    SDN: # in report when null in the cube
    SDN: How to replace '#' with blank when there is no value for a date field
    Edited by: Thomas Köpp on Sep 13, 2010 5:20 PM

  • How to execute one .exe file with as3 in air ?

    Hi
    How to execute one .exe file with as3 in air?
    I want do this work without fscommand .
    plize help me .

    itsdhanasaraa wrote:
    But as this a web application ... By using Runtime i'm getting some probs ..
    Let me guess, you want your web application to run a program on the client and to your surprise that's not working?
    Ain't gonna happen.
    its taking more time to execute .... that's y is there any other option to execute .exe file other than Runtime.getRuntime().exec("filename");Write proper English and you may be taken more seriously.
    1) it's not "taking more time to execute", whatever that's supposed to mean.
    2) there's no other way to execute something. Not that you should every use even that way anyway
    3) whenever you start thinking of executing external programs from Java, start thinking of not using Java in the first place.

Maybe you are looking for

  • How to develop 64-bit Windows device driver for NI-6602?

    Due to the fact that NI-VISA doesn't support 64 bit Windows, how can I do to develop a 64 bit Windows device driver for NI 6602 (Counter/timer) PCI card. The possible jobs include: Develop a Windows Kernel Mode Driver ("Device Driver"); Make it to co

  • Copying PO Number from SO Number to Billing Document

    Hello, My requirement is that I need to copy the PO Number from Sales Order to the Billing document whenever there is a Return Order created. What would be the Copy routine number that I need to modify? Or do I need to create a new Routine and then u

  • Low broadband speed (narrowband)

    On the 14th of January I lost my telephone service and obviously my broadband. I telephoned the help line with my mobile phone  and after speaking with an Indian lady in India for 45 minutes she said she was going to run some tests and please would I

  • To the Experts about the webcam issue

    I read on facebook that today is "ask the experts" day. So like a lot of other people here i have  an non working web cam on my G60-244DX OS Vista 32. I tried a lot to get the webcam working again, like recover the System, downloading drivers nothing

  • Class - logic

    I am trying to create a class which which will read a ztable (holds pricing tables) cosidering it a list or off list price. this table has the follwoing fields mandt,kappl,kschl,kotabnr and a custom field zprice_type which is numeric and of lenght 2.