Thanks Michael. Yes, a tags are shown in the text, but posted text doesn't have them.
I found that + is getting printed due to a separate piece of code within the template, not due to 'value' parameter. I tried using xsl:copy-of, but it's printing html as raw text to the browser, same as my original problem that i posted in the first post on this thread. Requirement here is to build a href dynamically and show it. Do you mean 'a' tag is ignored by Xalan 2.7.1, by the way, this problem is showing up only after we migrated to 2.7.1. Please suggest. Michael Ludwig-4 wrote: > > mahati schrieb: >> i could see that only + gets printed but not href tag around it. > > Typically, that means you're using <xsl:value-of> instead of > <xsl:copy-of>. In your case, the reason seems to be different. > >> <xsl:call-template name=columnHeader"> >> <xsl:with-param name="value"> >> >> <xsl:attribute name="id">frameloader</xsl:attribute> >> <xsl:attribute name="href">javascript:void(0);</xsl:attribute> >> <xsl:attribute name="onclick">javascript:<xsl:value-of >> select="$gridName"/>.expandAllTreeRows(this);</xsl:attribute> >> + >> </xsl:with-param> >> </xsl:template> > > This differs from your original example. You're missing the element. > (Maybe it got eaten in the mail processing chain.) Xalan-J 2.7.1 and > LibXSLT 1.1.24 both ignore this attribute. Saxon 6.5 issues a warning: > > Cannot write an attribute node when no element start tag is open > > I suggest you adjust your code. > > By the way, if you pass the parameter as you intend it to appear in the > output, spare yourself the hassle of exsl:node-set() plus identity > transform and use <xsl:copy-of> as in the following example. > > In addition, use literal XML for the parameter instead of constructing > it using <xsl:attribute>. That's much more readable. Use the latter > method only if dynamic computation of the attribute name is required. > > Michael Ludwig > > <xsl:stylesheet version="1.0" > xmlns:exsl="http://exslt.org/common" > extension-element-prefixes="exsl" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> > > <xsl:output indent="yes"/> > > <xsl:template match="/"> > <xsl:call-template name="x"> > <xsl:with-param name="y"> > <eins><zwei/><drei>vier</drei></eins> > <!-- The following does not work: --> > <!-- <xsl:attribute name="z">moin</xsl:attribute> --><!-- Saxon 6.5: > Cannot write an attribute node when no element start tag is open --> > </xsl:with-param> > </xsl:call-template> > </xsl:template> > > <xsl:template name="x"> > <xsl:param name="y"/> > <Urmel> > <good><xsl:copy-of select="$y"/></good><!-- good and simple --> > <hassle><!-- unnecessary hassle --> > <xsl:apply-templates select="exsl:node-set($y)/*"/> > </hassle> > <attr><xsl:apply-templates select="exsl:node-set($y)//@*"/></attr> > </Urmel> > </xsl:template> > > <xsl:template match="@*|node()"><!-- identity template --> > <xsl:copy><xsl:apply-templates select="@*|node()"/></xsl:copy> > </xsl:template> > > </xsl:stylesheet> > > > -- View this message in context: http://www.nabble.com/XSL%3AVALUE-OF-tp24368424p24370188.html Sent from the Xalan - J - Users mailing list archive at Nabble.com.