[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Can I diplay the <expression> used by xsl:if test=
Hi David, I want to display the LITERAL text of the test. So if it would be <xsl:if test="aNode > 0"/> I want to display "aNode > 0". Reason is that I want to pass the expression to a template to have it tested and want to display in the template WHAT I've tested. Something like this: <xsl:call-template name="TestTheExpression"> <xsl:with-param name="TheExpression" select="'aNode > 0'"/> </xsl:call-template> <xsl:template name="TestTheExpression"> <xsl:param name="TheExpression"/> <xsl:if test="$TheExpression"> // this won't work, because TheExpression is now a literal and will evaluate to true.... ... do something .. <xsl:value-of select="$TheExpression"/> </xsl:if> </xsl:template> Greetings René {@ @} ^ \_/ "You don't need eyes to see, you need vision!" ----- Original Message ----- From: "David Carlisle" <davidc@xxxxxxxxx> To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Sent: Thursday, August 01, 2002 12:27 PM Subject: Re: Can I diplay the <expression> used by xsl:if test="<expression>"? > I want to do this: > <xsl:if test="test something"> > <xsl:text>Error because: </xsl:test> > <xsl:value-of select="......"/> // what do I put on the dots to get >"test something"???? > <xsl:text> was true.</xsl:test> ></xsl:if> don't use xsl:value-of just use <xsl:text>test something</xsl:text> Or use xsl:value of and use '...' so it's a string. David _____________________________________________________________________ This message has been checked for all known viruses by Star Internet delivered through the MessageLabs Virus Scanning Service. For further information visit http://www.star.net.uk/stats.asp or alternatively call Star Internet for details on the Virus Scanning Service. XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|