[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Removing unwanted space

Subject: Re: Removing unwanted space
From: "Charles O'Connor coconnor@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 4 Jun 2021 22:44:54 -0000
Re:  Removing unwanted space
Ask an ye shall receive. Here's an example from a table (words have been
changed to protect the innocent), though I think Peter's template would work
fine here. However, there are gene names and yeast mating types that use
markup on just parts of terms, and I'm not sure how it would work on them:

                  <td colspan="5" valign="middle">
                     <p>
                        <bold>Curds:</bold> sha la la la la lee</p>
                     <p>
                        <bold>Whey: </bold>here comes the nice</p>
                     <p>
                  </td>

-----Original Message-----
From: Liam R. E. Quin liam@xxxxxxxxxxxxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Friday, June 4, 2021 6:05 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  Removing unwanted space

*** External email: use caution ***



On Fri, 2021-06-04 at 21:42 +0000, Peter Flynn peter@xxxxxxxxxxx wrote:
> [...]


> Pass all text nodes in mixed content through a template which will
> strip space from the start (if it's the first text node in an element)
> or the end (if it's the last text node in an element) or both (if it
> occurs somewhere else in the element.

Watch out for  input like

<p>The boy<em> splshed </em>through the puddles!</p> and, <p>It was very
un<i>convent</i><b>ion</b>al to have to face a fully- charged nun.</p>


(I admit i didn't try Peter's template on these cases; however, that they are
unusual does not make them unumportant).


--
Liam Quin, https://www.delightfulcomputing.com/
Available for XML/Document/Information Architecture/XSLT/ XSL/XQuery/Web/Text
Processing/A11Y training, work & consulting.
Barefoot Web-slave, antique illustrations:  http://www.fromoldbooks.org

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.