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 3:05:00 PM thanks sorry for confusing... but still Im not clear. my asp do a transform of xml/xsl. xsl contains a template named "DataTemp" which is used for transforming and displaying GUI first time. Onclick of a button in GUI Im calling a JS function to do a client side transform of xml/xsl. I have the xml ready for transform in JS. I need the above mentioned template "DataTemp" for using as part of a new xsl again. Instead of repeating everything again I want the same template ,ie, "DataTemp" as a string in JS. "Martin Honnen" <mahotrash@y...> wrote in message news:%236gr9jGsFHA.1788@t...... > > > 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 | |||
|
