Subject: Re: [xsl] remaining problem w/ dyn var scoping, as proposed (and solution?) From: "Matt G." <matt_g_@xxxxxxxxxxx> Date: Sun, 06 Jan 2002 23:06:45 |
From: Gunther Schadow <gunther@xxxxxxxxxxxxxxxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] remaining problem w/ dyn var scoping, as proposed (and solution?)
Date: Thu, 03 Jan 2002 13:28:30 -0500
Matt,
I agree that implicit parameters should be scoped by a namespace just like tags should so there would not be conflicts. I'm not sure if namespaces should be used for the parameter name or if the scope attribute should carry the name of the scope. Actually, I personally like your scope attribute more, but wouldn't namespaces be more according to common practice?
I also like your proposal for requiring implicit parameters to be passed on once they are 'caught.' That results in even less dark magic happening behind the scene without the explicit agreement by the programmer. It would make implicit parameter even more closely aligned to explicit parameters.
I don't care if parameter passing is verbose in XSL, everything is verbose in XML, so I better get used to that :-) The only purpose of implicit parameters is to pass them through templates that don't care about them.
Here is an example of all of this:
<xsl:template ...> <!-- all implicit parameters used must be declared in the current lexical scope. --> <xsl:param scope='foo' name='text-color' select="'black'"/> <xsl:param scope='foo' name='text-indent' select="''"/> <xsl:param scope='foo' name='text-size' select="10pt"/>
<out color="{$text-color}"/>
<xsl:apply-templates ...> <!-- all implicit parameters declared in this lexical scope must be passed forward explicitly. --> <xsl:with-param scope='foo' name='text-indent' select="concat($text-indent,' ')"/> <xsl:with-param scope='foo' name='text-size' select="$text-size"/> </xsl:apply-templates> </xsl:template>
_________________________________________________________________ Chat with friends online, try MSN Messenger: http://messenger.msn.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] remaining problem w/ dyn , Gunther Schadow | Thread | Re: [xsl] Re: The Solution -- Re: h, Joerg Pietschmann |
RE: [xsl] the problem with include , Matt G. | Date | Re: [xsl] the problem with include , David Carlisle |
Month |