Skip to Main Content

DevOps, CI/CD and Automation

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

html output genreated by the xsl should have a single quote

88306Dec 7 2001
hi
i am trying to convert the xml into html .

For one particular field i need to invoke a javscript method on
click. a value has to be passed to this javascript method. for
this i need a single quote or a double quote to come in the
output.

<a href ="javascript:loadPage('Student')"/> is what my output
should look like but i ma getting it as

<a href ="javascript:loadPage(&apos;Student&apos)"/> which is
invalid.

i am constructing the string like

<xsl:variable name="pageName" select="'Student'"/>

<a>
<xsl:attribute name="href">
<xsl:value-of select="concat('javascript:loadPage
(',&apos;,$pageName,&apos;,')')"/>
</xsl:attribute>

Also i tried declaring a variable and using it instead of &apos;
<xsl:varaible name="squote">'</xsl:variable>

how to overcome this problem ?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 8 2002
Added on Dec 7 2001
3 comments
224 views