Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: XSL Template as string >Thread Next - Re: XSL Template as string Re: XSL Template as stringTo: NULL Date: 9/3/2005 10:39:00 AM Thanks for ur replies. let me make it simple Is it possible to get an xsl template inside JS as a string.. something like this.. var StrTemp="<xsl:template name="DataTemp"></xsl:template>" or var StrTemp="<xsl:template name="DataTemp"><xsl:if test="@D>0">Success</xsl:if></xsl:template>" "Martin Honnen" <mahotrash@y...> wrote in message news:%23Bfah5%23rFHA.2880@T...... > > > Praveen wrote: > >> I have an xsl:template which is called inside a loop. > > Inside of an XSLT loop, e.g. <xsl:for-each>? Or are you using some > programming language outside of XSLT to repeatedly run a transformation? > >> The same template I want to keep as a string in a textarea /input field / >> xsl:variable. > > A textarea or input field does not exist in XSLT but in HTML. It is > certainly possible the have XSLT source code as the content of a textarea > in an HTML document. > If you then want to run an XSLT transformation with that source code you > need to have a way to load it, if you are using MSXML with IE 6 then you > create a DOM document as usual e.g. > var xsltDocument = new ActiveXObject('Msxml2.DOMDocument.3.0'); > and then call the loadXML method e.g. > xsltDocument.loadXML(someTextareaObject.value); > > > -- > > Martin Honnen --- MVP XML > http://JavaScript.FAQTs.com/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
