Subject: Re: [xsl] removing final space from node tree From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Mon, 20 Apr 2009 18:25:29 -0400 |
> Lars, > > How about, instead of post-processing the results of processing, you > simply don't add the spaces the first time through, and then you add > them in as a post-process? > > This would borrow from both your solutions -- like your first solution, > it divides the task into two phases. But like the second, it determines > whether to add the space to begin with -- not whether to remove it after > it's been added. It would do this, however, not by examining the source > to say "do I want a space here", but by examining the result (where this > determination will be much easier).
Thanks, Wendell. That certainly makes sense. However I'm not sure I see a significant win over my existing solution. I would still be adding a post-processing phase that recurses over the initial output tree and reconstructs it most of the time. Please clue me in if I've missed something big...
Also, I'm pretty sure the initial output tree doesn't always contain enough markup to determine where boundaries between output phrases are. The initial transformation sometimes just outputs bare strings.
On the other hand, if it's true that Wendell Piez couldn't immediately see a much more elegant way to accomplish this task, that would increase my confidence that my current solution is pretty decent. :-)
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 ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] removing final space from, Michael Ludwig | Thread | Re: [xsl] removing final space from, Andrew Welch |
Re: [xsl] removing final space from, Andrew Welch | Date | [xsl] grouping with xsl:for-each-gr, gregor FELLENZ |
Month |