ASP Error: 70
Description: Permission denied
Source: Microsoft VBScript runtime error

[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Help calling templates with parameters

Subject: Help calling templates with parameters
From: Charlie Consumer <faceless1976@xxxxxxxxx>
Date: Tue, 21 Sep 2004 21:31:24 -0700 (PDT)
xsl help
I'm trying to refactor my XSL so that I can make a
call to a template from several locations in my XSL. 
However, I need to parameterize this template with a
node set of where the data should come from.  I have
two documents that I'm merging together to result in
one document. I'm assigning parameter to a XPath to
the node set which is correct before I call the
template.  But, when I use it inside the template I
get "Cannot use result tree fragment.  Error in XPath
expression, Cannot use result tree fragment."  Here is
an example of what I'm doing:

<xsl:for-each
select="document($ruleFile)/rulelist/rule[@A='blah']">
   <xsl:call-template name="insertRule">
     <xsl:with-param name="currentRule"><xsl:value-of
select="current()"/></xsl:with-param>
   </xsl:call-template>
</xsl:for-each>

<xsl:template name="insertRule">
   <xsl:param name="currentRule"
   <xsl:element name="rule">
      <xsl:attribute name="id"><xsl:value-of
select="$currentRule/blah/@id"/></xsl:attribute>
   </xsl:element>
</xsl:template>

I'm using XMLSpy's debugger to step through the XSL,
and once I enter the template the parameter isn't a
node set like it was before I called the template, but
a node fragment.  I don't know what a node fragment
is.  Can anyone explain this?  And, what am I doing
wrong here?  Sorry I'm new to XSL.  I tried reading
the faq and archive, but I couldn't find anything
about this in either location.

Charlie


		
__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail 

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.