This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: XSLT: Spaces/Generating NMTOKENS/IDREFS attributes


>     <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:

&#x9;   = tab character
&#xA;   = newline character
&#xA0;  = non-breaking space character


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]