Write an XSLT template for string replace function and call this template whenever string replacement is required.
Create your own Custom XPath function for String replacement that can be imported in JDeveloper and used across the whole developer team.
Harness the capabilities of using Java classes in XSLT. This is the simplest method and I'll explain this in just 2 steps, attributed to its simplicity.
Create a namespace in XSLT for the Java String class to be used (let's prefix this as :strClass).
Use replaceAll() function of the String class referenced above as highlighted under. And the job is done.
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:strClass="http://www.oracle.com/XSL/Transform/java/java.lang.String">
<xsl:template match="/">
<xsl:value-of select="strClass:replaceAll($input, 'hello', 'HELLO')"/>
</xsl:template>
</xsl:stylesheet>
Please note that any function of the String class can be used above and also any of the Java classes can be referenced in the similar way e.g. Math, DOMParser, Integer etc.
Create your own Custom XPath function for String replacement that can be imported in JDeveloper and used across the whole developer team.
Harness the capabilities of using Java classes in XSLT. This is the simplest method and I'll explain this in just 2 steps, attributed to its simplicity.
Create a namespace in XSLT for the Java String class to be used (let's prefix this as :strClass).
Use replaceAll() function of the String class referenced above as highlighted under. And the job is done.
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:strClass="http://www.oracle.com/XSL/Transform/java/java.lang.String">
<xsl:template match="/">
<xsl:value-of select="strClass:replaceAll($input, 'hello', 'HELLO')"/>
</xsl:template>
</xsl:stylesheet>
Please note that any function of the String class can be used above and also any of the Java classes can be referenced in the similar way e.g. Math, DOMParser, Integer etc.
What a solution!!!! to the window setting and basic information of computer, that amazing for me and its very help full article posting.
ReplyDeleteGermany VPS Server Hosting
your valuable information and time. Please keep updating.
ReplyDeleteOracle SOA Online Training India
SOA Training
Excellant Information and keep going Sir!
ReplyDeleteAwesome! Thank you so much.. It works.
ReplyDelete