xsl-list
[Top] [All Lists]

AW: XPATH or 2 templates ?

2002-11-18 06:11:46
I got it by trial and error ...........

I can seperate the two template-match selections (must have done something
wrong before). Anyway this does what I want. Sorry for wasting recources !!

        <xsl:template match="Concat">
                                        <xsl:for-each
select="./*[1]//*[not(*)]">      
                                <xsl:value-of select="local-name()"/>   
                                <xsl:if test="position()!=last()">;</xsl:if>

                        </xsl:for-each> 
                <!-- Force a <cr> -->           
 
 
                <xsl:text>&#13;</xsl:text>
                <xsl:apply-templates/> 
        </xsl:template>

        <xsl:template match="Concat/*">

                        <xsl:for-each select=".//*[not(*)]">
                                <xsl:value-of select="node()"/> 
                                <xsl:if test="position()!=last()">;</xsl:if>

                        </xsl:for-each> 
                <xsl:text>&#13;</xsl:text>      

                <!-- Force a <cr> -->                           
        </xsl:template>

- Robin


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



<Prev in Thread] Current Thread [Next in Thread>
  • AW: XPATH or 2 templates ?, Delaney Robin <=