Click to See Complete Forum and Search --> : XSLT problem with IE 7


itgate.ir
08-14-2008, 09:34 AM
hi

I am using zXML library from NCZOnline

i write an XSl document like:


<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html" encoding="utf-8"/>
<xsl:template match="accountinfo/account">
<form id="form1" name="form1" method="post" action="">
<div id="idDivMainContentMijnProfiel">
<div id="idDivContentMijnProfiel">
<xsl:variable name="xslVarFirstName" select="@firstname" />
<xsl:variable name="xslVarSurName" select="@surname" />
<xsl:variable name="xslVarAddress" select="@address" />
<xsl:variable name="xslVarPostCode" select="@postcode" />
<xsl:variable name="xslVarCity" select="@city" />
<xsl:variable name="xslVarEmail" select="@email" />

<p>
<label>fistname :</label>
<input name="txtVoornaam" type="text" class="clsTxtInputMijnProfiel" value="{$xslVarFirstName}" />
<label>lastname:</label>
<input name="txtAchternaam" type="text" class="clsTxtInputMijnProfiel" value="{$xslVarSurName}" />
</p>
<p>
<label>Address :</label>
<input name="txtAdres" type="text" class="clsTxtInputMijnProfiel" value="{$xslVarAddress}"/>
<label>Postcode :</label>
<input name="txtPostcode" type="text" class="clsTxtInputMijnProfiel" value="{$xslVarPostCode}"/>

</p>
<p>
<label>city :</label>
<input name="txtPlaats" type="text" class="clsTxtInputMijnProfiel" value="{$xslVarCity}"/>
</p>
<p>
<label>Email :</label>
<input name="txtEmail" type="text" class="clsTxtInputMijnProfiel" value="{$xslVarEmail}" />
</p>
<p>

</p>
</div>
<!--End of Div idDivContentMijnProfiel -->

</div><!--End of idDivMainContentMijnProfiel-->
<!--End of Div idDivMainCommunities-->
</form>
</xsl:template>
</xsl:stylesheet>



and this html document:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>seeker</title>
<link href="style/style.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]> <link rel="stylesheet" href="style/IE6-style.css" type="text/css" media="screen" /> <![endif]-->
<!--[if IE 7]> <link rel="stylesheet" href="style/IE7-style.css" type="text/css" media="screen" /> <![endif]-->

<script language="javascript" type="text/javascript" src="js/zxml.js"></script>
<script language="javascript" type="text/javascript" src="js/mootools.js"></script>

<script language="javascript" type="text/javascript">
var flag=false;
window.addEvent('domready', function() {
var req = new Request({url:'ulr.php',
onSuccess: function(txt) {
},
onFailure: function() {
}
});
///////////////////////////////////////////////
var objXml = zXmlDom.createDocument();
objXml.async=false;
str='<result><accountinfo logintype="seeker"><account address="" cellphoneNr="" city="" dateOfBirth="1970-01-01" desiredbranche="3" email="avc@gmail.com" firstname="david" gender="male" highesteducation="3" idcode="1" phoneNr="" photodisplaypref="0" postcode="" prefix="" publicFlag="" status="A" surname="jackson" userType="C"/></accountinfo></result>';
objXml.loadXML(str);

var objXslDom=zXmlDom.createDocument();
objXslDom.async=false;
objXslDom.load('sampleXsl.xsl');
var strOutPut=zXslt.transformToText(objXml, objXslDom);


strAccountResponse=zXPath.selectSingleNode(objXml.documentElement,"accountinfo/account");
strDateOfBirth=strAccountResponse.getAttribute('dateOfBirth');
//alert(strDateOfBirth);
$('idDivContent').innerHTML=strOutPut;
flag =true;
///////////////////////////////////////////////
});//end of domready
</script>
</head>

<body>


<div id="idDivContent">
</div><!--End of Div Main-->

</body>
</html>




i works fine in FireFox 2, 3 , InternetExplorer 6

but does not work in IE 7

itgate.ir
08-14-2008, 02:15 PM
and it does not work in opera 9+

can you help me?

itgate.ir
08-15-2008, 09:39 AM
hi these are Screen shots of the IE 6 and 7 opera and firefox

ie7 (error : no output ):
http://i524.photobucket.com/albums/cc329/ninja20061/ie7-1.png

ie6 (works fine) :
http://i524.photobucket.com/albums/cc329/ninja20061/ie6-1.png

opera (no output !!!):
http://i524.photobucket.com/albums/cc329/ninja20061/operan.png

firefox 3.0.1(works fine):
http://i524.photobucket.com/albums/cc329/ninja20061/firefox.png