You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by Arun Ramdas <ar...@etrade.com> on 2002/02/01 20:54:31 UTC

Question on setStyleSheetParam

I have a requirement where i need to replace about 3 params in the XSL with
the desired values, before doing the transformation.

for example

PARAM1   MKT message
PARAM2   legal message
PARAM3   some additional information

I thought of using setStyleSheetParam, before the transformation.

But one problem i came across was that, in case the MKT message or any other
resultant string is in "HTML" format, 
After the transformation, i see all html tags with < and > symbols replaced
with &gt; &lt;  respectively.

Is there a way to overcome this?

Example 
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
  <xsl:param name="param5" select="'default value'"/>
  <xsl:template match="doc">
    <out><xsl:value-of select="$param5"/></out>
  </xsl:template>
</xsl:stylesheet>


i passed the value of param5 as "<html> hello </html>"

i got the result as 

<out>&lt;html&gt; hello &lt;/html&gt;</out>

but i want it as
<out><html> hello </html></out>

As an alternative, can i search and replace these strings (using normal c
string operations), after i transform the message.

Ur inputs are highly appreciated

Arun