Subject: [xsl] xsl:variable containing xsl:element From: "MUELLER,RAINER (HP-Switzerland,ex1)" <rainer_mueller@xxxxxx> Date: Mon, 29 Jan 2001 09:28:16 +0100 |
All, thanks for your replies and you are right I should describe my problem more in detail! The string contains HTML code in between and I want the 123.456 be printed out in bold characters. I tried both <xsl:element name="b"> and <b> <xsl:template match="Language/*"> // This works fine - BOTH lines show the number bold This is my account <xsl:element name="b">123.456</xsl:element> now closed This is my account <b>123.456</b> now closed // This doesn't work - displays the number BUT not bold <xsl:variable name="wholestring">This is my account <xsl:element name="b">123.456</xsl:element> now closed</xsl:variable> <xsl:value-of select="string($wholestring)"/> <xsl:variable name="wholestring">This is my account <b>123.456</b> now closed</xsl:variable> <xsl:value-of select="string($wholestring)"/> </xsl:template> The reason for the variable is that I want to pass it to another template using <xsl:call-template name="getConfirmationPage"> <xsl:with-param name="Header" select="Title/Text"/> <xsl:with-param name="Title" select="$wholestring"/> </xsl:call-template> The <xsl:copy-of select="$wholestring"/> throws the following error java.lang.NullPointerException at com.icl.saxon.expr.FragmentValue.copy(FragmentValue.java:444) at com.icl.saxon.style.XSLCopyOf.process(XSLCopyOf.java:65) at com.icl.saxon.style.XSLStyleSheet.process(XSLStyleSheet.java:472) at com.icl.saxon.Controller.transformDocument(Controller.java:715) at com.icl.saxon.Controller.transform(Controller.java:866) at com.icl.saxon.Controller.transform(Controller.java:901) Any ideas? Again thanks a lot, Rainer XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] xsl:variable containing x, Oliver Becker | Thread | Re: [xsl] xsl:variable containing x, David Carlisle |
[xsl] ANN: Unicorn XML Toolkit, Alexey Gokhberg | Date | Re: [xsl] xsl:variable containing x, David Carlisle |
Month |