|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Node-sets using <xsl:with-param>
At 2004-01-22 12:10 -0500, Mir Farooq Ali wrote:
G. Ken Holman wrote:If you are using <xsl:with-param/> inside of <xsl:apply-templates/> (you don't say if you are using <xsl:call-template or not) make sure you don't have any built-in templates being triggered between the processing of the two templates. If so, the built-in template will not pass the node parameter, the template with the parameter declaration will get called by the built-in template with no parameters, the default value for an empty parameter declaration is string, and you will have an empty string passed for the <xsl:apply-templates/>.... This is my stylesheet If that is your entire stylesheet, then no built-in template rules are engaged between the two above fragments because the right-most step in the select is "*" (all elements wildcard) and the right-most step in the match is "*" (any element wildcard). Which processor are you using? I'm suspecting an implementation problem. With only the evidence you have posted, I would anticipate the data type of the curnode parameter to be "node set". I agree the default is "empty string" which would give you the error, but it seems obvious from your fragment that it would only be engaged by the given apply-templates because of your use of modes. I would think you would only get the error reported if the element being pushed at your stylesheet was pushed without an argument specified for the curnode parameter (as is true for the built-in template rule for elements). Any template rule in your stylesheet is more important than the built-in template rules ... they *only* get used if you do not supply any template rule for the given node in the given mode. And when they are used, parameters are not preserved. Sorry I cannot tell what is wrong from your fragment. If you post a short XML source file that triggers the error with this stylesheet fragment, then others could try the fragments with different processors. I hope this helps. ........................... Ken -- Public courses: sign up for one or both soon to reserve your seat! Each week: Monday-Wednesday: XSLT/XPath; Thursday-Friday: XSL-FO Washington, DC: 2004-03-15 San Francisco, CA: 2004-03-22 Hong Kong, China: 2004-05-17 Bremen, Germany: 2004-05-24 World-wide on-site corporate, government & user group XML training G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Breast Cancer Awareness http://www.CraneSoftwrights.com/s/bc 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
|

Cart








