Re: [xsl] XQuery to Report Template Parameters

Subject: Re: [xsl] XQuery to Report Template Parameters
From: Eliot Kimber <ekimber@xxxxxxxxxxxx>
Date: Mon, 18 Feb 2008 08:29:11 -0600
Michael Kay wrote:
I certainly claim no special XQuery expertise, so I would also welcome any feedback on the coding of the query itself.

You asked for feedback, here are a few observations... Most of the comments below would apply equally if you had written the corresponding code in XSLT

Mike,


Thanks for the feedback--very helpful.

With regard to using string() where a simple existence check would help, I've never been 100% sure when simple existence was sufficient, so safer to use the string() != '' approach. I guess this is a function of what values the attribute allows.

It didn't even occur to me to limit my function parameters to specific types--but of course that makes perfect sense. Probably a little Java brain damage there.

My echoElement function was designed specifically to suppress the many namespace declarations that are in the original XSLT to make the output more easily readable (the stylesheet I was testing against declares about 10 different namespaces for this and that).

As for why I only did templates with apply-templates and call-template? Because I didn't think about the other places where these could be used. Easy to add of course.

Cheers,

Eliot
--
Eliot Kimber
Senior Solutions Architect
"Bringing Strategy, Content, and Technology Together"
Main: 610.631.6770
www.reallysi.com
www.rsuitecms.com

Current Thread