Subject: Re: [xsl] IE Client side transformation issue From: "Abel Braaksma (online)" <abel.online@xxxxxxxxx> Date: Mon, 30 Jul 2007 10:06:30 +0200 (CEST) |
Hi Ilya, You don't specify how you do your transformation. Other responses seem to expect you did it through a xsl-stylesheet PI. Below is the response in case you do it by JavaScript instead. Your xsl:output declaration should not influence whether your result tree is accessible as a DOM. Someone already mentioned that DOM XSL transformation does not work in Win2k3 (which may be due to tightened security restrictions and new defaults imposed by Redmond, I had similar problems with IE7). You don't specify how you access your result tree and whether you have a good try-catch around it and if so, is there any error raised (and perhaps discarded) that you were unaware of? What IE version are you talking about? What OS? The easiest way to find out whether a DOM result from an XSL transformation has the expected result is by stringizing its XML tree (in IE6: document.xml, I believe). Just do an alert(document.xml) right after the transformation and inspect the result: is it empty, or do you see some XML? In a couple of rare situations, IE may not raise an error on DOM methods, and simply ignores the call. For instance, it is not possible to do an undefined-check on a DOM method or property to find out whether a method exists (which is the traditional way to create code branches for different browsers). Finally, look careful at your namespaces. Depending on your transformation, new prefixes may have been introduced. I remember a situation facing 'ns0', 'ns1' etc. Because the *NS methods are not implemented in the IE DOM, you may want to try the SelectNodes with SelectionLanguage XPath and tests for something like: "//*[local-name='p'][@id='myID']" Hope these pointers give you some help. Cheers, -- Abel Braaksma > We have an application that does client side transformation. All > works fine in FF and the transformation itself seems to work fine in > IE. The problem that we're having is with the onload handler. > Seems > like although the transformation succeeds, the DOM is not available, > though the javascript onload handler is executed, but any > document.getElementById fail. I can search for any div or other > element by id and the return is always null, though when looking at > the source of the transformation, the div element with that ID > exists. > Again, this works fine in FF, so it seems like IE is behaving > differently in regards to DOM lifecycle/availability after the > transformation succeeds. > > Does anyone have any ideas on what might be happening. I've > experimented with numerous xsl:output options, below are some... > > <xsl:output method="xhtml" doctype-public='-//W3C//DTD HTML
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] IE Client side transforma, M. David Peterson | Thread | [xsl] which browsers support XSLT2., shi wudao |
RE: [xsl] getting rid of namespaces, Michael Kay | Date | [xsl] main memory consumption using, Lensch, Thomas |
Month |