xsl-list
[Top] [All Lists]

Re: [xsl] Connecting the Source and Destination fields

2007-08-29 11:07:29
Thank you VERY MUCH for the description! I searched for it in the net,
but didn't get any usefull/understandable results. Then what I have in
mind is just pipelining.

Greetings Christoph

Wendell Piez schrieb:
At 09:11 AM 8/29/2007, you wrote:
This seems to be a use-case for the in another thread mentioned
so-called
"micro-pipelining". First process the input data to make them fit your
needs, then do whatever you want with the cleaned up data.

Actually, "micro-pipelining" is what we call it when you pre-process
only a chunk of your input in an ad-hoc fashion, in the course of
transforming the whole of it.

If you process a document and then process it again, even if most of
the first pass is an identity transformation, that's just pipelining.

The difference can be seen by comparing two instances:

Pipelining:

<xsl:variable name="temp">
  <xsl:apply-templates mode="first"/>
</xsl:variable>

<xsl:template match="/">
  <xsl:apply-templates select="$temp" mode="second"/>
</xsl:template>

Micro-pipelining:

<xsl:template match="div">
  <xsl:variable name="temp">
    <xsl:apply-templates mode="temp"/>
  </xsl:variable>
  <xsl:apply-templates select="$temp"/>
</xsl:template>

In the pipelining example, the entire document is processed in "first"
mode, and the result is processed again in "second" mode (by the
template matching the document element). In the micro-pipelining
example, only the children (and perhaps descendants) of the div are
processed in "temp" mode, and then the results are processed.

So in the micro-pipelining example, the pipeline is scoped to the div.

This can be useful even at very low levels of the document, and can
spare you having to run an entire pipeline when most of the document
doesn't require it.

Cheers,
Wendell



======================================================================
Wendell Piez                            
mailto:wapiez(_at_)mulberrytech(_dot_)com
Mulberry Technologies, Inc.                http://www.mulberrytech.com
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
======================================================================


--~------------------------------------------------------------------
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>
--~--



--~------------------------------------------------------------------
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>
--~--