xsl-list
[Top] [All Lists]

Re: [xsl] Re: Repost: IE applies transformation, Fx does not

2006-04-05 03:08:42
Hi Manfred,

The only way to invoke a PI based transformation in all four major browsers is through a hard refresh of the current document loaded into the window object, or documents if there are multiple instances of windows via frames, iframes, etc...

If I were to separate things into classes I would use the same general conventions currently used (window, document, and the related sub elements and/or window names) and instead of using "trigger an xslt transformation via a PI" I would instead break things into two methods:

Full content refresh.
Partial content refresh

which, of course, apply to to both the window and document objects.

Full content refresh will take place using any of the *.location.* methods

Partial content refresh requires asyncronous communications, which can be implemented via the XMLHTTP object in IE (although this will soon no longer be the case due to the ActiveX law suit that will require a particular sequence to take place by the user to then gain this functionality back again. This is slated to be a part of the May security update I believe... although it might be the end of this month instead... I need to check to be certain) , via the XmlHttpRequest() method in the other browsers, and of course the async communication has been available since frames were first introduced back in the 94/95 time frame, although nobody really ever calls it this, and its usage is, of course, a no-no if you want to avoid issues with handling back and forward navigation problems that require some fairly extensive scripting hacks to keep things happy and functional across each and every major browser in use today.

To gain access to the various *.location.* methods google for "ecmascript spec" and access this section of the specification.


Hope this helps!

Manfred Staudinger wrote:

Hi David,

I've already resolved my problem - but still my broader picture is incomplete:
First, what are _all_ the methods to load a xml file dynamically, separated
in two classes
a) those which trigger a xslt transformation (e.g. location.replace)
b) those which don't (e.g. XMLHTTPrequest)

Second, is there any method which belongs to both classes, IOW's
someone which triggers the xslt transform, or ignores the PI
(depending on a parameter, a switch, or whatever) ?

Regards, Manfred

On 04/04/06, M. David Peterson <m(_dot_)david(_at_)mdptws(_dot_)com> wrote:
Hi Manfred,

I assume you are using location.replace("uri_of_file_to_replace") such
that you can push the new document into the position of the current
document, resulting in the current uri/related-document being popped off
the stack and, in essence, forgotten about.  If yes, is there a specific
reason for doing this e.g. transaction flow that, if the back button
were clicked, would negate the entire transaction?  If no, there are
several other way's to accomplish the desired task, such as simply
setting the value of document.location to the desired URI of the new
document.  Of course, if this is designed to gain the benefit of
replacing the first postion of ~history.back(), and this functionality
is crucial to your application functioning properly, then let me know
and I will dig a littler deeper into the various specs to determine if
the behavior of Moz/Fx allows for the making assumptions as to what
content can be expected, and what, if anything, can be "overlooked"
(such as PI's in an XML document).

BTW.. what is document type of the problem xml file being served as?

Manfred Staudinger wrote:

The difference stems from the fact, that instead of XMLHTTPrequest, I'm
using the location.replace method for retrieving the xml in IE (to
avoid activX).
This method triggers (unexpected by me) a XSLT transformation, if the xml
contains a PI for the stylsheet (in _all_ xslt enabled browsers).

Regards, Manfred

On 29/03/06, Manfred Staudinger <manfred(_dot_)staudinger(_at_)gmail(_dot_)com> 
wrote:


Hi list,
I've a xml file with a PI specified:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="../view_names.xsl" type="text/xsl"?>
<doc xmlns="http://www.w3.org/1999/xhtml";>
...
</doc>
When I invoke a file like this with the browser, the file is fetched,
gets transformed
and the result is displayed, for both Fx 1.5 and IE 6.0 (MSXML 3).
When I fetch the same file via javascript httprequest, then IE applies the
transformation automatically before giving me access to the result-tree,
whereas Fx (also Opera 9.0 beta) gives me the xml input-tree.

Is this difference documented anywhere?
May I prevent that transformation on IE somehow?

Regards, Manfred



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--





--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--





--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>