Subject: Re: [xsl] String Replacement in XML using XSLT From: "Dimitre Novatchev" <dnovatchev@xxxxxxxxx> Date: Mon, 25 Sep 2006 11:22:04 -0700 |
<content name="subject"> Hello [[BUYERS_NAME]]</content>
Then I'd provide the replacement text simply in the template matching the target:
<xsl:template match="BUYERS_NAME"> <xsl:value-of select="/*/BUYERS_NAME"> </xsl:template>
<xsl:template match="insert"> <xsl:value-of select="/*/*[name() = current()]"> </xsl:template>
-- Cheers, Dimitre Novatchev --------------------------------------- Truly great madness cannot be achieved without significant intelligence. --------------------------------------- To invent, you need a good imagination and a pile of junk -------------------------------------- You've achieved success in your field when you don't know whether what you're doing is work or play
Hi All, I need help in logic of replacing the string in XML for the below input. <test> <content_vars> <content name="subject"> Hello [[BUYERS_NAME]]</content> <content name="text"> REF Order [ORDER_NUMBER]</content> </content_vars> <BUYERS_NAME> SENTHIL </BUYERS_NAME> < ORDER_NUMBER > 1234 </ORDER_NUMBER >
</test>
Output should be <html> <body> <P>Hello SENTHIL</p> <p> REF Order 1234</p> </body> </html>
Is there anyway I can do it in XSLT? Any suggestion are welcome.
Thanks, Senthil
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] String Replacement in XML, Florent Georges | Thread | Re: [xsl] String Replacement in XML, Abel Braaksma |
Re: [xsl] String Replacement in XML, Florent Georges | Date | Re: [xsl] String Replacement in XML, James Fuller |
Month |