[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: call-template returns nothing was [Newbie question
Hi David,
If you want to refer to a parameter or to a variable you should use $ before the parameter or variable name: So instead of <xsl:template name="funcmsglookup"> <xsl:param name="codef"/> <xsl:if test="codef=0"> <xsl:text/>NEWM</xsl:if> <xsl:if test="codef=1"> <xsl:text>REPL</xsl:text> </xsl:if> <xsl:if test="codef=2"> <xsl:text>CANC</xsl:text> </xsl:if> </xsl:template> you should write: <xsl:template name="funcmsglookup"> <xsl:param name="codef"/> <xsl:if test="$codef=0"> <xsl:text/>NEWM</xsl:if> <xsl:if test="$codef=1"> <xsl:text>REPL</xsl:text> </xsl:if> <xsl:if test="$codef=2"> <xsl:text>CANC</xsl:text> </xsl:if> </xsl:template> and change also all the the other places in your stylesheets where you use parameters or variables. Otherwise, codef=1 for instance will check if there is an element codef as child of the current element having its content 1. To test for an empty element you can use not(element/node()) where element should be replaced with the actual element you are checking, but I'm not sure that you want this because there is no empty SecuritiesMovement element in your sample. Best Regards, George --------------------------------------------------------------------- George Cristian Bina <oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger http://www.oxygenxml.com David at roamware wrote: Hi,
|
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
|