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

Re: RE: Whitespace after <span> in <a>

Subject: Re: RE: Whitespace after <span> in <a>
From: David Carlisle <davidc@xxxxxxxxx>
Date: Thu, 17 Jul 2003 09:42:47 +0100
space after span
> The
> generated html document always contains a carriage return and a number
> of spaces after the note number in running text.

There are only three possible sources of space in the output
1) copied from the input
2) copied from the stylesheet
3) added by xsl:output indent="yes"

The most common cause of unwanted space is type 2 from things like
<xsl:template match="kjg">
   something
    <xsl:apply-templates/>

which adds a newline and three spaces before something.

However:

      <span class="inlineNoteNumber">&#160;[<xsl:number level="any"
  />]</span></a>

That should not produce any space.
So since you are producing html output indenting is on by default.
The system can only add space where it would _not_ change the rendering
in a browser, but that's difficult to get right (and the browsers don't
follow the html spec either usually) so it may be a bug somewhere
add <xsl:output indent="no"/> and see if that stops it (if so report it
to your xslt system maintainers as a bug).

> (The "Â" is another anomaly that I'd like to resolve; it should be
> passed through as &#160; or 

that's not an anomaly that's a faq. You are outputting in utf-8 and then
looking at the file in a latin-1 encoded editor. This means that you see
essentially random characters. ASCII letters happen to have the same
encoding in utf8 and latin1 so look the same, and a nbsp happens to 
use two bytes in utf8 which if viewed as latin1 come out as an acented a
followed by a nbsp. Either fix your viewer to understand utf8 or output
your file as latin1 by adding encoding="iso-8859-1" to xsl:output/

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

 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.