[xsl] xsl:apply-templates in javascript

Subject: [xsl] xsl:apply-templates in javascript
From: "Brandon Borkholder" <borkholder1879@xxxxxxxxxxx>
Date: Tue, 24 May 2005 20:19:22 -0500
I know, this has been solved, but what I'm looking for is an easy way to transition into it.

I want to
document.write('<xsl:apply-templates select=3D3D"path/to/node" />');

But obviously XSL will create a node set. I know the correct method is to escape the < characters with &lt;, but how can you implement this properly with a template? I've read of the "serialise" method that will apply a template that puts &lt; between <xsl:text /> tags and recursively calls the template. But that won't actually give me the html. How can I (without actually rewriting all my templates) escape and insert the html into the javascript.

Or maybe there's a better way to dynamically load a section of the document, which I would like.

Current Thread