Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: XSL Template as string

From: "Praveen" <praveen@---------.------>
To: 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="&lt;xsl:template 
name=&quot;DataTemp&quot;&gt;&lt;/xsl:template&gt;"

or
var StrTemp="<xsl:template name=&quot;DataTemp&quot;><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/ 




transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent