Subject: [xsl] New to XSLT: problem with passing param From: Sanjukta Mitra <sanmit27@xxxxxxxxx> Date: Thu, 3 Feb 2005 07:47:41 -0800 (PST) |
Hi, I am fairly new to XSLT and am trying to write a stylesheet that will convert an XML decision tree to a flowchart in SVG. This is a binomial decisiontree and I am facing the problem of overlapping nodes.To solve this I am trying to use a parameter that calculates some positions in one template and passes it on to another template.Can anyone please help me figure out what I am doing wrong here. Thanks Sanjukta I am getting the following error: Error at xsl:param on line 211 of file:/C:/REDworks/src/xslt/red2svg_testtree.xsl: The value is not a node-set Transformation failed: Run-time errors were reported Line 211 is the line where I am defining the parameter "Cnt" Here goes the relevant portion of the code: <xsl:template match="enumerated_type_ptr"> <xsl:param name="XT"/> <xsl:param name="YT"/> <xsl:param name="XTxt"/> <xsl:param name="YTxt"/> <xsl:param name="rx" select="22"/> <xsl:param name="width" select="75"/> <xsl:param name="height" select="40"/> <xsl:param name="subtype" select="id(@ptr)/title/@titleabbrev"/> <xsl:param name="subtype_length" select="string-length($subtype)"/> <xsl:param name="stop_question" select="ancestor::decisiontree_question[../decisiontree_answer[@answer='yes']][1]"/> <xsl:param name="Cnt" select="count(ancestor::decisiontree_answer[@answer='no'][count(ancestor::decisiontree_question=$stop_question) >0])"/> <xsl:param name="Ctr" select="($Cnt)-1"/> <xsl:param name="X1" select="($XT)-80-($Ctr)*140"/> <xsl:param name="Y1" select="($YT)-78"/> <xsl:param name="Variable_width" select="($XT)+10"/> <svg:rect..../> .................. <svg:text..../> <xsl:apply-templates select="./decisiontree_answer[@answer='no']" mode="No"> <xsl:with-param name="X1" select="($XT)-80-($Ctr)*140"/> <xsl:with-param name="Y1" select="($YT)-78"/> <xsl:with-param name="Variable_width" select="($XT)+10"/> </xsl:apply-templates> </xsl:template> __________________________________ Do you Yahoo!? Yahoo! Mail - Find what you need with new enhanced search. http://info.mail.yahoo.com/mail_250
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] generate-id for identical, JBryant | Thread | RE: [xsl] New to XSLT: problem with, Michael Kay |
RE: [xsl] Matching text nodes with , Andrew Welch | Date | AW: [xsl] Matching text nodes with , Huditsch Roman |
Month |