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 11:22:00 AM Praveen wrote: > But I think Im confusing everybody..... > Im not going to hardcode xsl:template as a string inside JS. Not? You showed us the example >>>var StrTemp="<xsl:template name="DataTemp"><xsl:if >>>test="@D>0">Success</xsl:if></xsl:template>" which is JavaScript code assigning a string with XSL to a variable. > I want the same xsl:template inside xsl as a string in JS. That is not clearer either. I only understand that you want to use XSLT and JavaScript and somehow you want "xsl as a string in JS" but our attempts to show you that and further explanations to load the string with the loadXML method do not seem to be what you want. Your other answer says: > For transforming I need <xsl:template name="PageDetails"> inside JS as a > string. > So I want the same <xsl:template name="PageDetails"> to be used for > transforming while loading and transforming in JS. That again sounds as if you want to have XSLT code in a JavaScript string variable and then do a transformation and as already said with MSXML the solution to that is then to create a DOM XML document and use its loadXML method to parse the XSLT code in the string into a document that can be used with the transform method. -- Martin Honnen --- MVP XML http://JavaScript.FAQTs.com/ | ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
