![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Passing a Javascript Variable into an XSL Stylesheet [Thread Next] Re: Passing a Javascript Variable into an XSL StylesheetTo: NULL Date: 8/1/2007 3:18:00 PM
On Aug 1, 1:11 pm, AlexanderW...@gmail.com wrote:
> Hi,
>
> I've got a clientside javascript control that uses an XML datasource.
> The control appllies XSL to the XML data in order to dynamically
> generate tables on the page. I want to be able to render part of the
> table without having to reload the whole thing.
>
> I've got the XSL doc that I need and the XML that I need for this
> operation. The problem is that the XSL file needs a parameter in
> order to create the table rows with their ids set correctly. This
> parameter normally comes from another XSL template which I won't be
> using in this place.
>
> something like this:
>
> function partialRender(xmlNode,intRecordID,xslDoc){
> var sOutputHTML;
> sOutputHTML = xmlNode.transformNode(xslDoc);
> return sOutputHTML;
>
> }
>
> How do I get the value from the variable intRecordID into the XSLDoc?
> Any ideas?
>
> Thanks.
I figured it out....
function partialRender(xmlNode,intRecordID,xslDoc){
var sOutputHTML;
xsl.selectSingleNode("/xsl:stylesheet/xsl:template/
xsl:param[@name]").nodeTypedValue=intRecordID;
sOutputHTML = xmlNode.transformNode(xslDoc);
return sOutputHTML;
}
Thanks,
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
