xsl-list
[Top] [All Lists]

Re: [xsl] How many passes through the document

2012-09-22 12:58:04
On Sat, Sep 22, 2012 at 6:03 PM, Andrew Welch 
<andrew(_dot_)j(_dot_)welch(_at_)gmail(_dot_)com> wrote:
On 22 September 2012 11:50, Ihe Onwuka 
<ihe(_dot_)onwuka(_at_)googlemail(_dot_)com> wrote:
Will the stylesheet below result in 2 passes through the document. I
the normal recursive descent parsing and 2 to evaluate the global
variable?

Assuming the variable gets evaluated, then:

   <xsl:variable name="all">
      <xsl:apply-templates select="*"/>

...will construct a node list containing just the root element of the
primary input document node, and then "push" it at the templates in
the stylesheet:

   <xsl:template match="*">
      stuff

this template will be matched, and all it does is add a text node to
the result... so the processing started by the variable stops there.

Sorry for posting this crap.
I think David was right to suggest I post a complete example which I
subsequently did.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--