[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Whitespace after <span> in <a>
Greetings, I'm using Xalan 2.3.1 to transform xml text files into xhtml. I use two link tags, one for local, in-site links and another for outside links ("olink"). Each olink is given a footnote number, in square brackets, in running text. A link, with the "name" I've given it, is provided in end notes that point to documents outside the site. Inline, I use a <span> to provide a handle for CSS formatting of the "inlineNoteNumber". The system I've built works fine, with an irritating anomaly. The generated html document always contains a carriage return and a number of spaces after the note number in running text. When viewed in a browser, these show as a single space. If punctuation follows the number, we have unsightly space that I would like to get rid of. I've experimented with xsl:text and xsl:strip-space, but to no avail. Example xml source: <olink url="http://www.counterbalance.net/biogloss/totistem-body.html" name="Totipotent Stem Cells" ref="totiDef03">Totipotent stem cells</olink> of human beings ... The relevant xsl: <!-- olink --> <!-- link to eom; non-breaking space 160; insert note number --> <xsl:template match="olink"> <a href="#{@ref}"> <xsl:apply-templates /> <span class="inlineNoteNumber"> [<xsl:number level="any" />]</span></a> </xsl:template> Resulting html: <a href="#totiDef03">Totipotent stem cells<span class="inlineNoteNumber">Â [14]</span> </a> of human beings... (The "Â" is another anomaly that I'd like to resolve; it should be passed through as   or that would pass validation, but that's another issue.) Thanks in advance for any suggestions. William BC Crandall Post Office Box 187 Lagunitas, CA 94938 bc.crandall@xxxxxxxxxxxxx XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|