Re: [xsl] newbie problem

Subject: Re: [xsl] newbie problem
From: "Joris Gillis" <roac@xxxxxxxxxx>
Date: Tue, 20 Sep 2005 14:48:14 +0200
Hi,

Tempore 14:43:50, die 09/20/2005 AD, hinc in xsl-list@xxxxxxxxxxxxxxxxxxxxxx scripsit Laing <laing.duncan@xxxxxxxxx>:

My first MEASURE template:
<xsl:template match="MEASURE">
    <xsl:for-each select=".">
         <xsl:choose>
                   <xsl:when test="BOOLEAN">
                            <xsl:apply-templates select="BOOLEAN"/>
                    </xsl:when>
                     <xsl:when test="CHOICE">
                            <xsl:apply-templates select="CHOICE"/>
                      </xsl:when>
                      <xsl:when test="MULTI_CHOICE">
                            <xsl:apply-templates select="MULTI_CHOICE"/>
                      </xsl:when>
                      <xsl:when test="TEXT">
                            <xsl:apply-templates select="TEXT"/>
                      </xsl:when>
           </xsl:choose>
   </xsl:for-each>
</xsl:template>

My next attempt:
<xsl:template match="MEASURE">
          <xsl:for-each select=".">
                  <xsl:if test="BOOLEAN">
                       <xsl:apply-templates select="BOOLEAN"/>
                  </xsl:if>
                  <xsl:if test="CHOICE">
                       <xsl:apply-templates select="CHOICE"/>
                   </xsl:if>
                    <xsl:if test="MULTI_CHOICE">
                       <xsl:apply-templates select="MULTI_CHOICE"/>
                    </xsl:if>
                    <xsl:if test="TEXT">
                       <xsl:apply-templates select="TEXT"/>
                    </xsl:if>
      </xsl:for-each>
</xsl:template>


Your third attempt:


<xsl:template match="MEASURE">
  <xsl:apply-templates select="BOOLEAN|CHOICE|MULTI_CHOICE|TEXT"/>
</xsl:template>

Your fourth attempt:

<xsl:template match="MEASURE">
  <xsl:apply-templates/>
</xsl:template>

Your fifth attempt:

nothing


regards, -- Joris Gillis (http://users.telenet.be/root-jg/me.html) Keep it simple.

Current Thread