Hi Morris/Paul, As far as I am aware, there is no Xalan bug here.
I don't think Xalan ever promises to evaluate attributes on an extension tag before invoking the extension. They get passed literally to the extension, and the extension can then evaluate them if it wishes to do so (see my earlier email). Currently, the attribute-value-template stuff is only ever evaluated when the containing element is not in the xsl: namespace, ie is a tag destined for output to the user. This behaviour seems reasonable to me. Maybe there could be an FAQ entry showing how to evaluate an expression when inside an extension [something like the code I included in previous email on this topic]? I went through the same puzzlement as Paul before coming up with this solution... Regards, Simon On Fri, 2002-11-29 at 06:19, [EMAIL PROTECTED] wrote: > Hi Paul > > Please open a bug in the Bugzilla database > (http://nagoya.apache.org/bugzilla). I will look at it when I have time. > > Thanks for reporting the problem. > > Morris Kwan > XSLT Development > IBM Toronto Lab > Tel: (905)413-3729 > Email: [EMAIL PROTECTED] > > > > > > Paul Brady > > <[EMAIL PROTECTED] To: Morris > Kwan/Toronto/[EMAIL PROTECTED] > la.com> cc: "'[EMAIL > PROTECTED]'" <[EMAIL PROTECTED]> > Subject: RE: Passing params > to an extension element > 11/28/2002 12:08 > > PM > > > > > > > > > Thanks for your reply Morris. Yes, I tried that approach before, but I > still > get the same result. The value of the parameter is not substituted. I get > "{$docletTemplate}". Is there a way to evaluate this from within my > extension? > > Paul. > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: 28 November 2002 16:25 > To: Paul Brady > Cc: '[EMAIL PROTECTED]' > Subject: RE: Passing params to an extension element > > Hi, Paul > > I think you need to use AVT (attribute value template) in a literal result > element. Please change <dynamicTemplate:dynamicCallTemplate name > ="$docletTemplate"> to <dynamicTemplate:dynamicCallTemplate name=" > {$docletTemplate}">. > > Morris Kwan > XSLT Development > IBM Toronto Lab > Tel: (905)413-3729 > Email: [EMAIL PROTECTED] > > > > > > Paul Brady > > <[EMAIL PROTECTED] To: Morris > Kwan/Toronto/[EMAIL PROTECTED] > la.com> cc: > "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> > Subject: RE: Passing params > to an extension element > 11/28/2002 10:48 > > AM > > > > > > > > > I get the same result when using v2.4.1. > The following piece of code works when evaluating local variables, but not > for parameters. Is there a similar way to evaluate paramteters? > > XPathContext xctxt = context.getTransformer().getXPathContext(); > XPath myxpath = new XPath("$VarName", elem, xctxt.getNamespaceContext(), > 0); > XObject xobj = myxpath.execute(xctxt, context.getContextNode(), elem); > String strVarVal = xobj.str(); > > Thanks, > > Paul > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: 27 November 2002 17:59 > To: Paul Brady > Cc: '[EMAIL PROTECTED]' > Subject: Re: Passing params to an extension element > > We fixed a lot of extension problems in Xalan 2.4.1. Please try with this > latest release to see if it fixes your problem. > > Morris Kwan > XSLT Development > IBM Toronto Lab > Tel: (905)413-3729 > Email: [EMAIL PROTECTED] > > > > > > Paul Brady > > <[EMAIL PROTECTED] To: > "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> > la.com> cc: > > Subject: Passing params to > an extension element > 11/27/2002 12:30 > > PM > > > > > > > > > I'm trying to pass an <xsl:param> into an extension element using Xalan > 2.3.1. > > If I do something like: > <xsl:template name="DocletContentBody"> > <xsl:param name="docletTemplate"/> > > <dynamicTemplate:dynamicCallTemplate name="$docletTemplate"> > <xsl:call-template name="doesntMatter"> > </xsl:call-template> > </dynamicTemplate:dynamicCallTemplate> > </xsl:template> > > where dynamicTemplate is my extension element, the value of the name > attribute evaluates to "$docletTemplate" rather than the value of the > parameter. > > Any ideas? > > Paul. > > > > > > > > -- Simon Kitching <[EMAIL PROTECTED]>
