>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
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]

Reply via email to