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

Re: unwanted white space in HTML

Subject: Re: unwanted white space in HTML
From: "Helder da Rocha" <helder@xxxxxxxxxxxxxxxx>
Date: Tue, 3 Sep 2002 10:01:23 -0300
white arrow gif
Enclose the text within <xsl:text> ...</xsl:text>:

<xsl:text>This question has: </xsl:text>
<xsl:value-of select="@answer-count"/>
<xsl:text> correct answer</xsl:text>
<xsl:if test="@answer-count &gt; 1">
    <xsl:text>s</xsl:text>
</xsl:if>
<xsl:text>.</xsl:text>

Helder.

--
Helder da Rocha (helder@xxxxxxxxxxxxxxxx)
Web Consultant
www.argonavis.com.br
São Paulo, Brazil
+55 (11) 9291 0567

----- Original Message -----
From: "Zakon, Stuart" <stuart_zakon@xxxxxxxxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Tuesday, September 03, 2002 9:35 AM
Subject:  unwanted white space in HTML


> I found some unwanted white space in my HTML output that I am not sure how
> to eliminate:
>
> <tr>
> <td class="answer-count">
> <a href="javascript:viewAnswer('cfw', 8)" class="navigate">
> <img border="0" alt="Answer" src="forward-arrow.gif" />
> </a>
>        This question has 1 correct answer.
>      </td>
> </tr>
>
> The white space appears before the words "This question...".
>
> Here is the corresponding XSLT:
>
>    <tr>
>      <td class="answer-count">
>      <xsl:variable name="author" select="/umltest/@author" />
>
>      <!-- provide navigation to the corresponding question or answer -->
>      <xsl:if test="$mode = 'questions'">
>        <a class="navigate" href="javascript:viewAnswer('{$author}',
> {$question-number})">
>          <img src="forward-arrow.gif"  alt="Answer"  border="0"/></a>
>      </xsl:if>
>      <xsl:if test="$mode = 'answers'">
>        <a class="navigate" href="javascript:viewQuestion('{$author}',
> {$question-number})">
>          <img src="backward-arrow.gif"  alt="Question"  border="0"/></a>
>      </xsl:if>
>        This question has <xsl:value-of select="@answer-count"/> correct
> answer<xsl:if test="@answer-count &gt; 1">s</xsl:if>.
>      </td>
>    </tr>
>
> As it is, I made the line beginning with "This question..." in the XSLT a
> longer line because when it was on multiple lines even more white space
was
> included.
>
> How can I strip the extra white space seen above?
>
> For more details on this open-source, open-documentation XML/XSLT project
> see:
> http://forums.objectsbydesign.com/showthread.php?s=&threadid=317
>
> Stuart Zakon
> Objects by Design
> http://www.objectsbydesign.com
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.