Re: [xsl] xalan:nodeset or xsl:copy-of problem

Subject: Re: [xsl] xalan:nodeset or xsl:copy-of problem
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Tue, 23 Apr 2002 18:57:28 -0400
Actually, given that $full_path has to be a nodeset for this to work,

<xsl:variable name="nodetree" select="$full_path[contains($dbs_searched,@db)]"/>

should obviate your need to use the xalan:nodeset extension at all....

Cheers,
Wendell

At 06:43 PM 4/23/2002, Greg wrote:
At 04:24 PM 4/23/2002, you wrote:
    <xsl:variable name="nodetree">
      <xsl:for-each select="$full_path[contains($dbs_searched,@db)]">
<!-- $dbs_searched variable is passed from a different stylesheet -->
        <xsl:copy-of select="."/>
      </xsl:for-each>
    </xsl:variable>

This isn't a solution to your problem (still thinking about it though) but it might help your readability/efficiency. I read on topxml.com the following about copy-of:
Copies a full tree including attributes to the destination
document. If multiple nodes are matched by the select attribute,
they are all copied.


  This would change the above variable declaration to the following:
<xsl:variable name="nodetree">
  <xsl:copy-of select="$full_path[contains($dbs_searched,@db)]"/>
</xsl:variable>

In the past, I've created a second temporary variable to hold the nodeset'ed version. You might try that as well.


======================================================================
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
======================================================================


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



Current Thread