Javascript in XSL
1) I have this javascript in my XSL.
<script src="https://seal.verisign.com/getseal?host_name=www.sportabroad.co.uk&size=S&ue_flash=YES&use_transparent=YES&lang=en" type="text/javascript"></script>
2) The script will validate www.sportabroad.co.uk and will display verisign seal.
3) In FireFox, when I display the XSL, it only displays the verisign seal. Nothing else is displayed.
What should I do
<script src="https://seal.verisign.com/getseal?host_name=www.sportabroad.co.uk&size=S&ue_flash=YES&use_transparent=YES&lang=en" type="text/javascript"></script>
2) The script will validate www.sportabroad.co.uk and will display verisign seal.
3) In FireFox, when I display the XSL, it only displays the verisign seal. Nothing else is displayed.
What should I do
For example, my XML filename is MovBasReq.XML. In that I have dynamic data from the database. I have MovBasReq.XSL which has HTML codes and static text and header and footer details.
The following script is in XSL.
<script src="https://seal.verisign.com/getseal?host_name=www.sportabroad.co.uk&size=S&ue_flash=YES&use_transparent=YES&lang=en" type="text/javascript"></script>
the problem is to do with '&'. In DHTML version, we just use '&' but in XML/XSL version, we need to use '&' instead of '&'.
Please suggest as we run out of ideas.
The following script is in XSL.
<script src="https://seal.verisign.com/getseal?host_name=www.sportabroad.co.uk&size=S&ue_flash=YES&use_transparent=YES&lang=en" type="text/javascript"></script>
the problem is to do with '&'. In DHTML version, we just use '&' but in XML/XSL version, we need to use '&' instead of '&'.
Please suggest as we run out of ideas.
Btw, this is not an accessibility problem, so there are probably better forums to ask in.
Off the top of my head, I think you need to declare the & encoding at the top of your XSL file. (There are no default encodings in XML, you have to declare them.)
But I can't see it, so difficult to tell.
[Edit: I'd missed "not" when talking about accessibility problem!]
Last edited by Alastc on 24 Aug 2007 01:48 pm; edited 1 time in total
Off the top of my head, I think you need to declare the & encoding at the top of your XSL file. (There are no default encodings in XML, you have to declare them.)
But I can't see it, so difficult to tell.
[Edit: I'd missed "not" when talking about accessibility problem!]
Last edited by Alastc on 24 Aug 2007 01:48 pm; edited 1 time in total
Place your script call inside of a CDATA segment?
Could we see the entire XSLT document?
XSL Document
The problem area is:
<script
src="https://seal.verisign.com/getseal?host_name=www.kuoni.co.uk&size=S&ue_flash=YES&use_transparent=YES&lang=en">
</script>
================================================
<?xml version="1.0" encoding="iso-8859-1"?><!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp " ">
<!ENTITY ldquo "“">
<!ENTITY rdquo "”">
<!ENTITY pound "£">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" omit-xml-declaration="yes" encoding="iso-8859-1"/>
<xsl:strip-space elements="*"/>
<xsl:include href="kugen.xsl" />
<xsl:include href="global.xsl"/>
<xsl:template match="page">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--Call the page head template -->
<xsl:call-template name="template_head"/>
<body>
<!--Call the page shortcuts template-->
<xsl:call-template name="template_shortcuts"/>
<div id="page">
<!--Call the page header template-->
<xsl:call-template name="template_header"/>
<!--Call the page navigation template-->
<xsl:call-template name="template_navigation">
<xsl:with-param name="page_section" />
</xsl:call-template>
<div id="container" class="clear">
<xsl:call-template name="headP"/>
<table border="0" cellspacing="0" cellpadding="0" class="StdHdr">
<tbody>
</tbody>
</table>
<div class="StdTxtL">
<p></p>
<div class="StdTxtM">
<table class="StdTblL" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="HeadingB">Holiday Requirements</td>
<td class="HeadingHelp"><a href="javascript:Showinfowindow('/Help/holiday_requirements.html');"> Need Help?</a></td>
</tr>
</tbody>
</table>
</div>
Please complete the following details to check the availability of your holiday and make a booking or quote.
</div>
<xsl:apply-templates select="//page/requirements/MainAt"/>
<table border="0" cellspacing="0" cellpadding="0" class="StdTblL">
<tbody>
</tbody>
</table>
<div class="StdTxtL"><p><br/>
<table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<span class="Gentext">Payment for your itinerary is by debit or credit card when you book. For your peace of mind, our site is protected by Verisign and all card payments are encrypted using the internationally accepted <a href="javascript:Showinfowindow('/popups/secure.html')" class="textlink"> Security System, SSL</a>.</span>
</td>
</tr>
</table>
<table width="135" border="0" cellpadding="2" cellspacing="0">
<tr>
<td width="135" align="center" valign="top">
<script
src="https://seal.verisign.com/getseal?host_name=www.kuoni.co.uk&size=S&ue_flash=YES&use_transparent=YES&lang=en">
</script>
<br/>
<a href="http://www.verisign.com/ssl-certificate/" target="_blank" style="color:#000000;text-decoration:none; font:bold 7px verdana,sans-serif; letter-spacing:.5px; text-align:center; margin:0px; padding:0px;">ABOUT SSL CERTIFICATES</a>
</td>
</tr>
</table>
<img height="1" width="1" src="https://switch.atdmt.com/action/outkuo_SportAbroadBookingStart_10"/></p>
</div>
<!-- <xsl:call-template name="FOO"/> -->
<!--Call the page footer template-->
<xsl:call-template name="template_footer"/>
</div>
</div>
</body>
</html>
</xsl:template>
================================================
The problem area is:
<script
src="https://seal.verisign.com/getseal?host_name=www.kuoni.co.uk&size=S&ue_flash=YES&use_transparent=YES&lang=en">
</script>
================================================
<?xml version="1.0" encoding="iso-8859-1"?><!DOCTYPE xsl:stylesheet [
<!ENTITY nbsp " ">
<!ENTITY ldquo "“">
<!ENTITY rdquo "”">
<!ENTITY pound "£">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" indent="yes" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" omit-xml-declaration="yes" encoding="iso-8859-1"/>
<xsl:strip-space elements="*"/>
<xsl:include href="kugen.xsl" />
<xsl:include href="global.xsl"/>
<xsl:template match="page">
<html xmlns="http://www.w3.org/1999/xhtml">
<!--Call the page head template -->
<xsl:call-template name="template_head"/>
<body>
<!--Call the page shortcuts template-->
<xsl:call-template name="template_shortcuts"/>
<div id="page">
<!--Call the page header template-->
<xsl:call-template name="template_header"/>
<!--Call the page navigation template-->
<xsl:call-template name="template_navigation">
<xsl:with-param name="page_section" />
</xsl:call-template>
<div id="container" class="clear">
<xsl:call-template name="headP"/>
<table border="0" cellspacing="0" cellpadding="0" class="StdHdr">
<tbody>
</tbody>
</table>
<div class="StdTxtL">
<p></p>
<div class="StdTxtM">
<table class="StdTblL" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="HeadingB">Holiday Requirements</td>
<td class="HeadingHelp"><a href="javascript:Showinfowindow('/Help/holiday_requirements.html');"> Need Help?</a></td>
</tr>
</tbody>
</table>
</div>
Please complete the following details to check the availability of your holiday and make a booking or quote.
</div>
<xsl:apply-templates select="//page/requirements/MainAt"/>
<table border="0" cellspacing="0" cellpadding="0" class="StdTblL">
<tbody>
</tbody>
</table>
<div class="StdTxtL"><p><br/>
<table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<span class="Gentext">Payment for your itinerary is by debit or credit card when you book. For your peace of mind, our site is protected by Verisign and all card payments are encrypted using the internationally accepted <a href="javascript:Showinfowindow('/popups/secure.html')" class="textlink"> Security System, SSL</a>.</span>
</td>
</tr>
</table>
<table width="135" border="0" cellpadding="2" cellspacing="0">
<tr>
<td width="135" align="center" valign="top">
<script
src="https://seal.verisign.com/getseal?host_name=www.kuoni.co.uk&size=S&ue_flash=YES&use_transparent=YES&lang=en">
</script>
<br/>
<a href="http://www.verisign.com/ssl-certificate/" target="_blank" style="color:#000000;text-decoration:none; font:bold 7px verdana,sans-serif; letter-spacing:.5px; text-align:center; margin:0px; padding:0px;">ABOUT SSL CERTIFICATES</a>
</td>
</tr>
</table>
<img height="1" width="1" src="https://switch.atdmt.com/action/outkuo_SportAbroadBookingStart_10"/></p>
</div>
<!-- <xsl:call-template name="FOO"/> -->
<!--Call the page footer template-->
<xsl:call-template name="template_footer"/>
</div>
</div>
</body>
</html>
</xsl:template>
================================================
Even when I have the following in the XSL document, the page is not working properly.
<!ENTITY amp "&">
When I debug the XSL document with Altova XMLSpy, it works fine. In Live, it doesn't work well.
<!ENTITY amp "&">
When I debug the XSL document with Altova XMLSpy, it works fine. In Live, it doesn't work well.
I place my code within CDATA segment; no luck
thank you very very mach
__
http://ksavary.com - dream mean sogn
__
http://ksavary.com - dream mean sogn


