OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   Spaces after element

[ Lists Home | Date Index | Thread Index ]

I'm using XSL to transform xml and then I use a style sheet. I'm displaying the result in Internet explorer.

here's my one-line code

            <p class="mn">           
               <xsl:for-each select="DEFe">&#x201C;<xsl:value-of select="current()"/>&#x201D;<xsl:variable name="pos1" select="position()"/><xsl:if test="position()!=last()"><xsl:variable name="separ"><xsl:value-of select="../DefSep[position()=$pos1]"/></xsl:variable><xsl:if test="not(starts-with($separ, ','))"><xsl:text> </xsl:text></xsl:if><xsl:value-of select="../DefSep[position()=$pos1]"/><xsl:text> </xsl:text></xsl:if></xsl:for-each><br/>
               <xsl:if test="DEFf">                    
                    <xsl:variable name="posDefFr" select="position()"/>
                    <xsl:for-each select="DEFf">&#x00AB;&#xA0;<xsl:value-of select="current()"/>&#xA0;&#x00BB;<xsl:variable name="pos2" select="position()"/><xsl:if test="position()!=last()"><xsl:variable name="separ"><xsl:value-of select="../DefSep[position()=  ($contDefEn -1) + $pos2]"/></xsl:variable><xsl:if test="not(starts-with($separ, ','))"><xsl:text> </xsl:text></xsl:if><xsl:value-of select="../DefSep[position()=  ($contDefEn -1) + $pos2]"/><xsl:text> </xsl:text></xsl:if></xsl:for-each><br/>            
            <p class="Def">                   
                    <xsl:apply-templates select="./child::*[name() != 'DEFf' and name() != 'DEFe']"/>

Wich should look like :

“word1”, “word2” and “word3” or “word4”
« mot1 », « mot2 » et « mot3 » ou « mot4 »

Word1 has a specific meaning;

But if it is on multiple line (a space apear before the comma)

it looks like this

“word1” , “word2” and “word3” or “word4”
« mot1 » , « mot2 » et « mot3 » ou « mot4 »

Word1 has a specific meaning;

Here's the XML

<Content><DEFe>word1</DEFe> has a specific meaning;</Content>


Mathieu Lafleur
3900 Côte-Vertu, bureau 208
St-Laurent (Québec)
H4R 1V4
Tel : (514) 920-0020 ext. 35
Fax : (514) 920-0028
Site WEB :


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS