Subject: [xsl] JScript extension function, which takes a result tree and serializes it? From: "Ilya Khandamirov" <ikh@xxxxxxxxxxx> Date: Fri, 7 Sep 2001 17:06:24 +0200 |
Dear List, I thought this should be a FAQ and i was surprised when found no information on this issue. No samples, no explanations... Did i overlook something? I would like to produce multiple output files during one transformation with MSXML (I know, it is relatively easy to accomplish with other XSLT prrocessors, but i have to do it with the one from Microsoft). Simplified algorithm i'm going to use is as follows: <msxsl:script language="JScript" implements-prefix="user"> function saveToFile(data, outputFile) { // serialize, if needed, and // save to file here return(""); } </msxsl:script> <xsl:template name="prepareDataForOneFile"> <xsl:variable name="dataChunk"> <!-- XSLT processing here --> </xsl:variable> <xsl:value-of select="user:saveToFile($dataChunk, $fileName)"/> </xsl:template> My question is how to treat, i.e. proccess, $dataChunk passed from a template to an extension function? I guess, if $dataChunk contains pure XML, then extension function receives a nodeset and the best way to process it is just cycling through the nodes. But wat happens, then the template returns, i.e. $dataChunk contains, HTML or raw RTF code? I mean, what type of object will i get in this case in function parameter - string, nodes, ...? How to access the parameter data to save it to file? Sorry, it must be something obvious, but i'm stuck. Any ideas, suggestions, comments and links on the topic are very much appreciated. p.s. Many thanks to all, answered my previous question: "xsl:sort - sorting outline numbered values". Special thanks to David Carlisle and Francis Norton. Regards, Ilya XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XSLT browser support, Kurt Cagle | Thread | AW: [xsl] JScript extension functio, Ilya Khandamirov |
Re: [xsl] XPath help, Jeffrey Langdon | Date | RE: [xsl] match selection formulae, Michael Kay |
Month |