Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: XSL Template as string

From: Martin Honnen <mahotrash@-----.-->
To: 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=&quot;DataTemp&quot;><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/


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