xsl-list
[Top] [All Lists]

xsl:apply-templates in javascript

2005-05-24 18:19:22
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.
--~------------------------------------------------------------------
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>
--~--



<Prev in Thread] Current Thread [Next in Thread>