This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: XSLT: Spaces/Generating NMTOKENS/IDREFS attributes
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: RE: XSLT: Spaces/Generating NMTOKENS/IDREFS attributes
- From: Mike Brown <mbrown at corp dot webb dot net>
- Date: Sat, 4 Mar 2000 16:48:52 -0700
- Cc: "'may at informatik dot uni-freiburg dot de'" <may at informatik dot uni-freiburg dot de>
- Reply-To: xsl-list at mulberrytech dot com
> <xsl:attribute name="memberships">
> <xsl:for-each
> select="//org[member/@ref=current()/@id]">
> <xsl:value-of select="current()/@id"/>
> <!-- here I want to insert a simple space :( -->
> </xsl:for-each>
> [...]
Replace the comment with this:
<xsl:if test="not(position()=last())">
<xsl:text> </xsl:text>
</xsl:if>
> BTW, is there any description how to output white space
> in the resulting XML document, e.g., linebreaks
Aside from the literal space in the xsl:text above,
you could simply put these or their decimal equivalents
in your result tree:
	 = tab character

 = newline character
  = non-breaking space character
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list