Altova Mailing List Archives


Re: javscript in XSL

From: johns221b@-----------.---------.---
To: NULL
Date: 11/7/2006 12:02:00 PM



"kevin" wrote:

> 
> Thanks..
> 
> What I am really trying to do is in XSL some way of reading a cookie's value 
> any suggestions? Code you can help me with 


One option is adding cookie vaue as an attribute of xml root before  tranform.
If tranform using xslt template then cookie value can be set as parameter.
Or use namespace function
refer this brief...
http://www.johns221b.com/sample.html

thanks,
John Chacko


> 
> Thanks...
> 
> 
> Hello Martin,
> 
> > kevin wrote:
> > 
> >> Its a error the error is  "Error loading stylesheet: (null)"  but if
> >> i remove that line of code
> >> 
> >> <xsl:variable name="cookChk"
> >> select="js:getCookie('usr')"></xsl:variable>
> >> 
> >> the document renders the xml RSS feed.  I am using no Server side
> >> apps like ASP or PHP
> >> 
> > document and document.cookie are host objects that the browser exposes
> > to script. You can't access them with script embedded to run during an
> > XSLT transformation. If you want to read cookies then do that with
> > script embedded in an HTML document. That HTML document with the
> > script can be generated by your stylesheet as the result of a
> > transformation.
> > 
> 
> 
> 

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.