cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Corda, Ugo" <Ugo.Co...@usa.xerox.com>
Subject RE: Bypassing Cocoon formatting for certain browsers
Date Mon, 07 Feb 2000 19:47:56 GMT
I tried the hack, but it doesn't seem to work. IE 5 displays only the text
contents of the copied xml file returned by Cocoon and does not apply the
xsl formatting specified.

On the other hand, if I manually submit basically the same xml file to IE 5
it displays correctly. When I compare the xml file that works with the one
returned by Cocoon to IE 5 (by using the "view source" command of IE 5),
they are basically identical except for a <!DOCTYPE html ... > prepended in
the copy returned by Cocoon (but I am not sure Cocoon is the one that
generates the DOCTYPE line, it might be IE 5). 

My interpretation of all this is that when the xml file is directly
processed by IE 5 it works, but, when basically the same xml file is
returned by Cocoon, IE 5 tries to process it as if it was an HTML file (and,
of course, it does not work). I am not sure what triggers this different
behavior of IE 5. Does Cocoon return some kind of clue that identifies the
returned object as an HTML file, even when it is supposed to be an xml file
(I used <xsl:output method="xml"/> in the copy transform)?

Thank you,
Ugo


		-----Original Message-----
		From:	Stefano Mazzocchi [mailto:stefano@apache.org]
		Sent:	February 05, 2000 3:38 PM
		To:	cocoon-users@xml.apache.org
		Subject:	Re: Bypassing Cocoon formatting for certain
browsers

		"Corda, Ugo" wrote:
		> 
		> I would like to prevent Cocoon from processing and
formatting an xml file
		> and associated xsl stylesheet in cases where the client
browser has already
		> the capability of doing that locally (e.g. IE 5.0, when
the stylesheet
		> generates HTML).  Is there a way to tell Cocoon not to do
anything in the
		> case the requesting browser is of a particular type?

		Hmmm, like many other things that Cocoon is currently
missing, the
		sitemap proposal should handle them property. This is one of
them.

		As a pretty dirty hack (to get it working now), you can
create a dummy
		stylesheet that copies over everything without touching and
apply it
		based on the media type of your particular web browser.

		Hope this helps.

		Stefano.



	
---------------------------------------------------------------------
		To unsubscribe, e-mail:
cocoon-users-unsubscribe@xml.apache.org
		For additional commands, e-mail:
cocoon-users-help@xml.apache.org

Mime
View raw message