Subject: Re: [xsl] adding space in xslt and trimming last space in java-problem From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Wed, 16 Jul 2003 16:18:59 -0400 |
I have an XML-file that contains a sequence of ids. I need to transform this to a String of space separated ids.
So I transform the xml to a text file and after each id-node I add a space, like this:
<xsl:template match="*"> <xsl:for-each select="//ns1:genbankid"> <xsl:value-of select="text()"/> </xsl:for-each> </xsl:template>
but when I try to trim the space of the lastly added id, it refuses to do it! My application is in Java:
ids.trim()
does not work.
<xsl:for-each select="//nsl:genbankid"> <xsl:value-of select="."/> <xsl:if test="not(position() = last())"> </xsl:if> </xsl:for-each>
Any suggestions?? In VIM the transformed file shows not a space but a capital A with a ^ on top, I assume this is the problem.
what can I use instead of  ??
<xsl:if test="not(position() = last())"> <xsl:text> </xsl:text> </xsl:if>
Cheers, Wendell
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] adding space in xslt and , J.Pietschmann | Thread | Re: [xsl] adding space in xslt and , remko de knikker |
Re: [xsl] adding space in xslt and , J.Pietschmann | Date | Re: [xsl] adding space in xslt and , remko de knikker |
Month |