Menu ▾ ▴

#59 IE9 Beta - Errors from Test case

v1.0 (example)
closed-fixed
nobody
None
5
2017-06-08
2010-10-12
Anonymous
No

http://dev.abiss.gr/sarissa/test/testsarissa.html gives 6 errors in IE9 Beta. Switching to Compatibility mode gives 1 error (same as IE8 and Firefox 4 Beta)

e.g. for XMLSerializer test, complains that "No such interface supported"

Appears to be the cause of problems with the RichFaces JSF framework that uses Sarissa.

Discussion

  • Anonymous

    Anonymous - 2010-12-01

    IE9 beta has implemented a native XMLSerializer and DOMParser. I realized it's still in beta, but Is the Sarissa project looking into how this will affect the sarissa libraries? It's breaking my site now.

     
  • Nobody/Anonymous

    IE9, however, has not implemented an XSLTProcessor, so it would still need to use Sarissa's.

    Since IE9 does implement DOMParser and XMLSerializer, it's a mixed metaphor.

    The way to work-around is to add IE9 detection to Sarissa (after the IE detection):

    Sarissa._SARISSA_IS_IE9 = Sarissa._SARISSA_IS_IE && (parseFloat(navigator.appVersion.substring(navigator.appVersion.indexOf("MSIE")+5))) >= 9;

    Then, around the checks for the existence of DOMParser and XMLSerializer make sure you "or" Sarissa._SARISSA_IS_IE9 so that it will use Sarissa's implementation (reverting to the ActiveX controls) instead of IE's.

    Then, Sarissa will work because it will use the Msxml2.DOMDocument API instead of the (as of yet undocumented) DOM API that IE9's DOMParser.parseFromString() returns.

    This is not necessarily super elegant, but is a quick fix and seems to work well.

    Sarissa could possibly be modified to handle IE9 using native DOMParser and XMLSerializer objects, while still implementing it's own XSLTProcessor. However, Sarissa's current XSLTProcessor implementation relies on the MSXML interfaces... which are incompatible with whatever DOM representation IE's DOMParser generates... so it would have to be re-written (or kludged to convert the new DOM representation to the MSXML objects before operating on it).

    I find it strange that Microsoft essentially invented AJAX with MSXML, and yet, they have not implemented an XSLTProcess.

    Thankfully Sarissa exists - and the above fix should keep it happy with IE9.

     
  • Nobody/Anonymous

    Then, there's always:

    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

    or

    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" />

    ... but then you lose HTML5/CSS3 (what little of it IE9 implements).

     
  • Andrew May

    Andrew May - 2011-03-23

    Not sure how to attach a file to this bug (perhaps because I logged it without logging in), but here's a possible patch:

    Index: sarissa.js

    RCS file: /cvsroot/sarissa/sarissa/src/main/js/gr/abiss/js/sarissa/sarissa.js,v
    retrieving revision 1.29
    diff -r1.29 sarissa.js
    65a66,67
    > Sarissa._SARISSA_IS_IE9 = Sarissa._SARISSA_IS_IE && (parseFloat(navigator.appVersion.substring(navigator.appVersion.indexOf("MSIE")+5))) >= 9;
    > /** @private */
    474c476
    < if(!window.DOMParser){
    ---
    > if(!window.DOMParser || Sarissa._SARISSA_IS_IE9){
    596c598
    < if(!window.XMLSerializer && Sarissa.getDomDocument && Sarissa.getDomDocument("","foo", null).xml){
    ---
    > if((!window.XMLSerializer || Sarissa._SARISSA_IS_IE9) && Sarissa.getDomDocument && Sarissa.getDomDocument("","foo", null).xml){

    This fixes most of the errors in IE9, except for 3 XSLT tests (one of which fails in most browsers already), and is based upon the comments someone else provided.
    I've supplied this as a fix for Sarissa in the RichFaces framework (https://issues.jboss.org/browse/RF-9485).

     
  • Nobody/Anonymous

    Maybe when defaulting the XMLSerializer object to Sarissa's, we should add a test for window.XSLTProcessor:

    if((!window.XMLSerializer || !window.XSLTProcessor || Sarissa._SARISSA_IS_IE9) &&
    Sarissa.getDomDocument && Sarissa.getDomDocument("","foo", null).xml)

     
  • Anonymous

    Anonymous - 2011-07-08

    Maybe when defaulting to Sarissa'a implementation of the serialization, we should add a check for the presence of window.XSLTProcessor:

    if((!window.XMLSerializer || !window.XSLTProcessor || Sarissa._SARISSA_IS_IE9) &&
    Sarissa.getDomDocument && Sarissa.getDomDocument("","foo", null).xml)

     

    Last edit: Anonymous 2017-07-13
  • Keith Pepin

    Keith Pepin - 2011-09-06

    Has there been any movement on this defect? Several community members have contributed workarounds, and even one potential solution (at least a walk through of how to modify the Sarissa code for the solution), but it's been over a year since the last Sarissa release. Has there been any progress on integrating this solution into a fix/patch release?

     
  • Emmanuil Batsis (Manos)

    Hi folks,

    Sarissa has been around for so long, it's code has by now been absorbed in higher level frameworks. Unfortunately I dont get much feedback from those and i consistently fail to monitor SF forums for the rest :-)

    Testing on IE has been very difficult for me for a long time. Can someone provide a clean patch to address this for me to push a new release towards people needing a "release version"?

    Also, if anyone is interested to contribute into maintaining the codebase, please let me know!

    Cheers,

    Manos

     
  • Aissam

    Aissam - 2012-02-19

    fix committed to cvs. Thanks for you help

     
  • Emmanuil Batsis (Manos)

    • status: open --> closed-fixed
    • Group: --> v1.0 (example)
     
  • Emmanuil Batsis (Manos)

    closing

     

Log in to post a comment.