xsl-list
[Top] [All Lists]

RE: output node-set

2005-04-01 11:55:59


 <xsl:template match="path">
 <xsl:for-each select="*">
<xsl:choose>

 <xsl:when test="'self::dig'">
 <xsl:copy-of select="dig[node()]"/>
 </xsl:when>

<xsl:when test="'self::nondig'">
 <xsl:copy-of select="nondig[node()]""/>
 </xsl:when>

<xsl:when test="'self::CCTo'">
<CCTo />
  </xsl:when>


XSLT provides an apply-templates instruction so you don't have to do this.
Replace this by:

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

<xsl:template match="dig">
  <xsl:copy-of select="."/>
</xsl:template>

etc.

Michael Kay
http://www.saxonica.com/



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>