[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Selecting and printing certain nodes
> This prints out '$startDate' when I really want it to print the value of the > xsl:param $startDate. Is there a way to do this in XSL? No, you can't refer to the program variables from the source file unless you have an extension element that makes an XPath parser available at run time some systems do (saxon for example) but not all of them make variable bindings available to the run time extension function. ah I see you already are using dyn:evaluate so in that case you could probably evaluate the string "$startDate" coming from the source. But do you really want to polute your source files with the internal variables used in the stylesheet. You wouldn't normally expect a file read in to a compiled C program (say) to access the variables used in that program, it's rather similar here. Incidentally there is no need to have the if in <xsl:if test="@name"/> <xsl:value-of select="@name"/> </xsl:if> if the attribute isn't there it's value will be "". This all work great. Now my question is can you think of a way to handle nested foreach statments? it'll just work automatically due to the nested apply-templates, won't it? I can't see any reason why not. Do I need to pass a variable which is an array or something XSLT doesn't have arrays, it has node sets which are just as useful, but I don't see that you have pass anything other than your existing item node. David -- http://www.dcarlisle.demon.co.uk/matthew ________________________________________________________________________ This e-mail has been scanned for all viruses by Star Internet. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________ 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
|