> -----Original Message-----
> From: Joseph Kesselman [mailto:[EMAIL PROTECTED] 
> Sent: Friday, July 09, 2004 10:59 AM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: RE: XSLTC and runtime xpath eval, Smart Transformer
> 
> >We would like to implement a library of reusable templates,
> >and to do so, we don't want to hard code xpaths in the libaray
> >templates, we want to pass in the xpath string and have it 
> dynamically
> >evaluated.
> 
> The XSLTC philosophy is not really compatable with the run-time XPath
> evaluation extension; as performance of the compiled 
> processor improves,
> perfomance of trying to intermix it with the interpreted processor is
> likely to degrade. I really recommend that you consider alternatives.
> 
> One obvious solution would be to make the reusable part a 
> named template,
> and write small templates which do the match and invoke this 
> named template

We already use this approach, but it seems overly verbose 
and once the top-level named-template is entered, there 
is no longer a "current template rule", meaning we cannot
override portions of a template via xsl:apply-imports, thus
losing the code reuse benefits that xsl:import implies.


> to do the work. That avoids any need for dynamic evaluation, 
> so it fits
> entirely within the standard XSLT language... and it's really 
> no uglier for
> the stylesheet designer than trying to pass an XPath in as a parameter
> would be.
> 
> 
> (Learning to "invert the problem" seems to be a basic XSLT 
> coding skill;
> often turning a task inside out makes it a lot more straightforward to
> implement nonprocedurally.)
> 
> 
> ______________________________________
> Joe Kesselman, IBM Next-Generation Web Technologies: XML, XSL 
> and more.
> "The world changed profoundly and unpredictably the day Tim 
> Berners Lee
> got bitten by a radioactive spider." -- Rafe Culpin, in r.m.filk
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
--------------------------------------------------------
 
NOTICE: If received in error, please destroy and notify sender.  Sender does not waive 
confidentiality or privilege, and use is prohibited. 
 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to