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
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








