[Home] [By Thread] [By Date] [Recent Entries]
Abel,
At 06:43 PM 9/26/2007, you wrote: David Carlisle wrote: :-) Yep, what Abel showed is a pipeline. You might also be able to micropipeline this -- that is, pipeline just the nodes you need to preprocess, at the point where they are matched. But micropipelining has a potential weakness, in that when you process a variable derived from a process, you have lost the context of the original process. Sometimes this doesn't matter, and sometimes you can design your micropipeline to account for it -- but I haven't looked at this particular problem well enough to see whether that's an issue. Heck: a micropipelining approach would look something like: <xsl:variable name="name-content"> <xsl:apply-templates select="para" mode="normalize-space"/> </xsl:variable> <xsl:variable name="ref-content"> <xsl:apply-templates select="following-sibling::entry[1]/para" mode="normalize-space"/> </xsl:variable> <entry name="{$name-content}" ref="{$ref-content}" etc... /> Note that you'd still have work to do in your "normalize-space" mode to make sure your whitespace came out properly (as you might want space between the paragraphs as well as trimmed within each paragraph). So it may not be better than XPath-based solutions (depending on your taste). Cheers, Wendell ====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx 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 ======================================================================
|

Cart



