|
Subject: Re: [xsl] xslt 1, node sets in variables From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Fri, 31 Jul 2009 18:15:43 -0400 |
When I do what you suggested, it doesn't generate any errors, but I still don't get the result as a node-set. The copy-of statement dumps the xml of the tree to the output. Also, count(exsl:node-set($projects)) returns 1 (It should return 26 when there is no filter).
<xsl:variable name="projects-rtf">
<xsl:choose>
<xsl:when test="$active_filter = 'active'">
<xsl:copy-of select="project[@active!=0]"/>
</xsl:when>
<xsl:when test="$active_filter = 'archived'">
<xsl:copy-of select="project[@active=0]"/>
</xsl:when>
<xsl:when test="$active_filter = 'new'">
<xsl:copy-of select="project[@new=1]"/>
</xsl:when>
<xsl:otherwise>
<xsl:copy-of select="project"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable><xsl:choose> <xsl:when test="count($projects)>10"> etc.
<xsl:variable name="projects"
select="project[$active_filter = 'active'][@active!=0] |
project[$active_filter = 'archived'][@active=0] |
project[$active_filter = 'new'][@new=1] |
project[not($active_filter = 'active' or
$active_filter = 'archived' or
$active_filter = 'new')]"/>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] xslt 1, node sets in vari, David Carlisle | Thread | |
| Re: [xsl] xslt 1, node sets in vari, David Carlisle | Date | |
| Month |