This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


At 04:24 PM 4/23/2002, you wrote:
>  <xsl:template name="setup_db">
>     <xsl:param name="field"/>
>     <xsl:param name="db_list"/>
>     <xsl:param name="full_path"/>
>     <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 statement does print out the attribute value of field $field,
>which means that $full_path is a valid path and does contain @db
>attribute -->
>     <xsl:value-of select="$full_path/@db" />

   Okay, I'm re-reading your post here and the above isn't clear.  Assuming 
that $full_path is a valid node-set, then the above selection chooses all 
top-level elements of $full_path that themselves have a "db" attribute.  It 
says nothing of any child elements named $field.  I think your bug is in 
your selection paths, not the node-set or copy-of functions.
   Instead of testing with the value-of template (which concatenates all of 
the child nodes as well as the top-level node), use copy-of to debug your 
stylesheet.  I think you'll find that your variable values aren't what you 
expect.


Greg Faron
Integre Technical Publishing Co.



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]