Re: [xsl] What is Micro Pipelining: an attempt for a definition (was: Calculating cumulative values - Abel's solution)

Subject: Re: [xsl] What is Micro Pipelining: an attempt for a definition (was: Calculating cumulative values - Abel's solution)
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Tue, 04 Sep 2007 15:15:21 -0400

I think you mistook my meaning, or maybe I didn't express it clearly.

At 07:42 PM 8/31/2007, you wrote:
Now I do understand that this is a bit of a too wide definition. But now on to yours. You explain that for anything to be a micro pipeline it must be applied (or expected to be applied) more than once. More appropriately: when you can extract the pipeline variable into a global variable, it is not a micro pipeline anymore (is it then a macro pipeline?).

It's not that a micro-pipeline is applied more than once. If you have

<xsl:template match="p">
  <xsl:variable name="interim">
    <xsl:apply-templates mode="pre"/>
  <xsl:apply-templates select="$interim"/>

... the $interim variable is only assigned, and processed, once for each paragraph. This is a simple case where (assuming everything else is happening in the normal way) every 'p' in the document is micro-pipelined -- but no particular micro-pipeline (or micropipeline; the hyphen is starting to feel cumbersome) is executed more than once. (The template is applied more than once but only once per paragraph, or maybe not even that.)

Does this clarify things any?

Of course, as you show, within the context of a larger processing framework, a pipeline scoped to a template matching a document root might be executed more than once, and thus be a micropipeline. But you douldn't declare each document's interim results globally in that case. Accordingly, I'd suppose the line would be where it is necessary to bind the variable locally to where it will be used. If it is or could be in global scope, it's not "micro" even if it's small.

FWIW, I don't believe the term has a formal definition (or not yet). The reason the word has no definitions outside XSLT is that we invented the term here to label a particular technique in XSLT. For example, it has no relevance to XML Pipelining Language, which doesn't do template matching and thus has no place a micropipeline (in the XSLT sense) could hook onto. And since we invented it, "Micro-pipeline" or "micropipeline", in the context of XSLT, means only what we mean by it. Indeed, this is why I've bothered to pipe up (if you'll forgive the expression) -- because, as I said, if the word comes to mean "any cool multi-phase processing or generating of interim results of any kind", it will no longer mean what we first meant by it -- something for which we will then no longer have a special word, at which point when we want to draw attention to it, we will have to describe it the long way around, using a general word plus qualifications, the way we did before we had a specific word.

Consequently, I'd be inclined, as I said, to recommend always saying "pipelining" or "pre-processing", the more general terms, when there's any doubt, and reserving the more specific term for occasions when the distinction is useful and relevant.

On the other hand, given that you're defending the more general usage (roughly, a synonym for "pipeline") as correct, maybe the horse is already out of the barn, and we no longer have a word for the more specific thing, which is "pipelining, but scoped to a document fragment, not an entire document".

Maybe someone will come up with a word for it and then we'll say "Yes: what we used to call micropipelining".


Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.      
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
  Mulberry Technologies: A Consultancy Specializing in SGML and XML

Current Thread