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="#{(_at_)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(_dot_)crandall(_at_)earthlink(_dot_)net
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list