Charles Knell wrote:
You have a template that matches "/projects". In this template you do an
apply-templates and attempt to pass a parameter named "project_id". The
value
you assign to this parameter appears to be a node named "record_id_". There
is
your problem. This construct assumes an XPath structure of
"/projects/record_id_", where in the actual document the XPath is
"/projects/record/record_id_".
When you assign "/projects/record_id_" to the value of the parameter, you
are
selecting a node that doesn't exist. Ergo, you get the default value of the
parameter.
Actually, because that call is within a xsl:for-each that selects on
"record," I think I'm actually getting /projects/record/record_id.
In fact, if you'll have a look at the debugging output I put in just before
the xsl:apply-templates call, you'll see that I'm printing out the value-of
"record" in the current context. I do, in fact, get the value of each
"record_id_" tag here. And, if I change the code to select nodes from the
current context as the argument to xsl:apply-templates, the value gets
passed in correctly in the parameter.
It's only when I change the select to use the document call that the
parameter fails to pass correctly.
Thanks,
Will
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--