RE: [xsl] initial template parameters

Subject: RE: [xsl] initial template parameters
From: "Robby Pelssers" <robby.pelssers@xxxxxxxxx>
Date: Thu, 18 Mar 2010 16:06:33 +0100

another useful lesson learned ;-)

Thx for that info Martin.

-----Original Message-----
From: Martin Honnen [mailto:Martin.Honnen@xxxxxx]
Sent: Thursday, March 18, 2010 4:02 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] initial template parameters

Robby Pelssers wrote:
> Or you would have to keep a package folder structure  like most programming
languages do and even in javascript it is an adopted approach to create
namespace like structures to have no clashes in variable names.
> Com.mycompany.xslt.pdf
>   - content2pdf.xslt
>       <xsl:param name="com_mycompany_xslt_pdf_content2pdf_param1"
> Com.mycompany.xslt.html
>   -content2html.xslt
>       <xsl:param name="com_mycompany_xslt_html_content2html_param1"
> So if you would include both xslt's in another main.xslt you would at least
have no confusion about parameters.
> I have to say I don't follow this approach myself because I can oversee and
am the only maintainer of the stylesheets.  But if you were to write xslt's
which would be used by 3rd parties this might not be such a bad approach.
> What do you all think?

A parameter can have a qualified name so I would rather define some
namespace in the stylesheet and put the parameter name in that namespace


     <xsl:param name="pdf:param1"/>


	Martin Honnen

Current Thread