This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Crazy idea: loopback namespace



> When a element
> in the loopback namespace is closed it is fed back into the stylesheet.

I don't understand where or when you feed back.

Since you wrote

<xsl:template match="loop:yyy">

I assume you mean that the loop:yyy node appears in the source tree
(rather than the stylesheet) But where in th esource tree does it
appear, ie what apply-templates select call would trigger thet template?

Also there is the question of timing. xsl being side effect free means
that the processor can have rather a lot of freedom in the order that it
evaluates things.

Thus it might be hard to ensure that


<xsl:template match="xxx">
    <loop:yyy parm1="a" parm2="b"/>
</xsl:template>


is evaluated befor any match on loop:yyy

A similar problem if you try to use xt:document or saxon:output to
write to an external file and then read it back in with document()
Even if you ignore the buffering of writes so the file might not appear
on the filesystem quick enough, there is basically no way of knowing
the order in which templates are evaluated. (You may not assume that the
source document is processed in document order)

Actually since parameters names are qnames they could be used as
attribute values, thus I'd quite like to be able to write

<xsl:call-template name="xxx">
  <xsl:with-param name="fff" select="123"/>
  <xsl:with-param name="ggg" select="456"/>
</xsl:call-template>

as

<xsl:call-template name="xxx" fff="123" ggg="456"/>


and just leave the more verbose form for when I need to pass a result
tree fragment in as the parameter.

Maybe you would only allow the shortened form if the parameter names
were in a non default, non xsl namespace

<xsl:call-template name="xxx" x:fff="123" x:ggg="456"/>

Otherwise you'd have to have special rules for `name'.

David


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]