Re: How to force a Save As prompt?
David I agree with your examples below - I guess its been quite a long time since I had to work with systems that made me add .php or .jsp to my URLs. We are spoiled by Cocoon :) Derek On 2008/10/09 at 03:30, in message [EMAIL PROTECTED], David Legg [EMAIL PROTECTED] wrote: Derek, Before getting into detail, I'd like to say that I do agree in principle with what you said below. Oh Good! I was worried for a moment when I saw the size of your response ;-) My real issue probably lies in the fact that I have been around computers too long. Ah yes... I remember building my own bi-stable flip flop circuits! PS The answer to your question of Microsoft Word file is - neither!The existing URL (poor though it might be) is still a valid one and should be kept. Ok. I was thinking off the top of my head. A better example might be publishing a page with a URL of 'today.asp' or 'today.jsp'. The extension here is irrelevant and simply overcomplicates the URL for the poor humans that might have to type it in or remember it. I see URLs in a more semantic way now after following the workings of the semantic web crowd. Another simple example occurs with images. We don't really need to note the fact that an image is in gif format by stating that in a URL. Times change and it may be that for legal reasons you can no longer use GIF format at all on your site and you have to use PNG instead. So all those URL references to mylogo.gif have now got to change. Whereas if you had supplied a url of /images/mylogo the change would be invisible and the URL could remain unchanged. I think I'll stop now... I might catch the zealot bug ;-) Regards, David Legg -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to force a Save As prompt?
Dave Before getting into detail, I'd like to say that I do agree in principle with what you said below. My real issue probably lies in the fact that I have been around computers too long. If I look at archives of my files from the early 90's; when DOS still reigned supreme, I see names like birthday.inv and new-pc.mem and tax91.let. We had WordPerfect back then and I used the file extension to indicate what type of document it was. Both the program and I were happy - and neither had to pretend that the file extension indicated what type of _application_ was needed to open that file! The dawn of M$ Windows and its office sweet, along with long file names, led us down the road of the file extension is reserved by the OS so it knows what to do with the file. Its only now, as I come to Linux, that I realize what a distortion that was. A name is just a name - the real issue is what is in the file?. Its a bit like meeting someone, who because he is wearing a suit and tie, you assume is a manager (in fact, he turns out to be the cleaner on the way to his daughters's wedding!).The unfortunate side-effect of the dominance of IE as a browser is that it too has inherited this annoyance from its siblings; this despite the fact that the Internet is the most heterogenous computing environment that exists, and its more than likely that a . in the context of the web means something quite different from the context of one's OS. When I look at the suggested syntax for REST-based URLs, the authors seem to have the same way of thinking - an example is mydomain.com/hotels/hawaii/list/all - which we would assume returns a list of all hotels in Hawaii. But is this really different in meaning from mydomain.com/hotels.hawaii.list.all - would anyone looking at this (excluding a Windows application) really think they are getting some strange all file? Are either of these URLs better or more generic - I think not. The bottom line - I want my . back - in fact, I want all of them back! :) Derek PS The answer to your question of Microsoft Word file is - neither!The existing URL (poor though it might be) is still a valid one and should be kept. Ideally it should also keep delivering the M$ file since that is what the users are expecting. I might publish a new URL called:http://myorg.org/importantdocs/thisweek.xml or, perhaps better, http://myorg.org/importantdocs/thisweek or even http://myorg.org/importantdocs/thisweek/xml (if I am going to be all RESTy) and deliver the new document via this address. (Of course, I would pursue a parallel course persuading my readers to switch to the new address... and yes, in time, eventually deprecate the old one in some way). The point here is that a URL, especially a widely accessed one, should be able to remain in place if possible, but that this has little to do with a supposed extension appearing in the name. PPS I do agree with pretty much everything in the W3C doc - except for the notion that the . has some special meaning - well, it might to M$, but in the context of designing a URI it is neither here or there (see above example for the REST service). On 2008/10/09 at 12:27, in message [EMAIL PROTECTED], David Legg [EMAIL PROTECTED] wrote: Derek, Please add the reference/link for why URLs in Cocoon should not have an extension - I know its required, but why is it bad? It's not specific to Cocoon. I only mentioned that because Cocoon's sitemap makes it particularly easy to map a URL without an extension to some content. So in general, it is not a good idea to include extensions in a URL if you want that URL to be useful for a long time to come. The extension may contain implementation specific details which may not always be true. It's generally considered better to publish a generic URL and then let the browser use content negotiation to determine whether it can accept that content. For example, what if your organization regularly published an important document as a Microsoft Word file (*.doc) and published it on your site with a URL of: http://myorg.org/importantdocs/thisweek.doc That's great and you would probably bookmark it and everything would be fine... until your organization decided to move with the times and publish it as a styled xml document. Now you have a dilemma... do you change the url so it contains a .xml extension and risk losing your loyal followers (whose bookmarks no longer work) or do you keep the same url which ends in .doc but is actually an xml file? A great resource for all this is the W3C's own Cool URIs [1] page. There are a lot of other url advocates out there like this one [2]. I suppose though, if you are talking about downloads this might all be a bit academic. After all if you want to download an executable file the chances are it will remain in the same format forever... but you should at least spend half a second
Re: How to force a Save As prompt?
Derek, Please add the reference/link for why URLs in Cocoon should not have an extension - I know its required, but why is it bad? It's not specific to Cocoon. I only mentioned that because Cocoon's sitemap makes it particularly easy to map a URL without an extension to some content. So in general, it is not a good idea to include extensions in a URL if you want that URL to be useful for a long time to come. The extension may contain implementation specific details which may not always be true. It's generally considered better to publish a generic URL and then let the browser use content negotiation to determine whether it can accept that content. For example, what if your organization regularly published an important document as a Microsoft Word file (*.doc) and published it on your site with a URL of: http://myorg.org/importantdocs/thisweek.doc That's great and you would probably bookmark it and everything would be fine... until your organization decided to move with the times and publish it as a styled xml document. Now you have a dilemma... do you change the url so it contains a .xml extension and risk losing your loyal followers (whose bookmarks no longer work) or do you keep the same url which ends in .doc but is actually an xml file? A great resource for all this is the W3C's own Cool URIs [1] page. There are a lot of other url advocates out there like this one [2]. I suppose though, if you are talking about downloads this might all be a bit academic. After all if you want to download an executable file the chances are it will remain in the same format forever... but you should at least spend half a second thinking about the format of the URL you expose it with. Regards, David Legg [1] http://www.w3.org/Provider/Style/URI#remove [2] http://blog.welldesignedurls.org/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to force a Save As prompt?
Matthias, Simplest solution is to write multiple matches, one for each type of serializer you want to use. That's what I do.. Precompilation of the sitemap prevents the use of variables in for instance the type attributes of generators, transformers and serializers. The sitemap processor pre-loads all necessary objects, while those variables are evaluated on request-time... :-P You could also try to use map:select, but I personally find it a bit clumsy most of the time.. Kind regards, Geert -Original Message- From: Matthias Müller [mailto:[EMAIL PROTECTED] Sent: woensdag 8 oktober 2008 9:26 To: users@cocoon.apache.org Subject: AW: How to force a Save As prompt? Hey, one more question: in your example you serialize your stream as xml. i want to be flexible with this, e.g. for xml or pdf files. matthias - Ursprüngliche Mail Von: Geert Josten [EMAIL PROTECTED] An: users@cocoon.apache.org users@cocoon.apache.org Gesendet: Dienstag, den 7. Oktober 2008, 14:32:39 Uhr Betreff: RE: How to force a Save As prompt? Hi, I typically do something like this: map:match pattern=download/*/** map:generate src=cocoon:/{2}/ map:act type=set-header map:parameter name=Content-Type value=application/x-download/ map:parameter name=Content-Disposition value=attachment ; filename={1}/ map:serialize type=xml/ /map:act /map:match Kind regards, Geert Drs. G.P.H. Josten Consultant http://www.daidalos.nl/ Daidalos BV Source of Innovation Hoekeindsehof 1-4 2665 JZ Bleiswijk Tel.: +31 (0) 10 850 1200 Fax: +31 (0) 10 850 1199 http://www.daidalos.nl/ KvK 27164984 De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend. From: Matthias Müller [mailto:[EMAIL PROTECTED] Sent: dinsdag 7 oktober 2008 14:28 To: users cocoon.apache.org Subject: How to force a Save As prompt? Hi there, is there a way or workaround how i can force a Save As prompt for my cocoon output? The problem is that the browser knows the mime types of the generated files (xml, pdfs) and displays it instead of prompting. regards, matthias - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to force a Save As prompt?
Derek, Before getting into detail, I'd like to say that I do agree in principle with what you said below. Oh Good! I was worried for a moment when I saw the size of your response ;-) My real issue probably lies in the fact that I have been around computers too long. Ah yes... I remember building my own bi-stable flip flop circuits! PS The answer to your question of Microsoft Word file is - neither!The existing URL (poor though it might be) is still a valid one and should be kept. Ok. I was thinking off the top of my head. A better example might be publishing a page with a URL of 'today.asp' or 'today.jsp'. The extension here is irrelevant and simply overcomplicates the URL for the poor humans that might have to type it in or remember it. I see URLs in a more semantic way now after following the workings of the semantic web crowd. Another simple example occurs with images. We don't really need to note the fact that an image is in gif format by stating that in a URL. Times change and it may be that for legal reasons you can no longer use GIF format at all on your site and you have to use PNG instead. So all those URL references to mylogo.gif have now got to change. Whereas if you had supplied a url of /images/mylogo the change would be invisible and the URL could remain unchanged. I think I'll stop now... I might catch the zealot bug ;-) Regards, David Legg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to force a Save As prompt?
David Please add the reference/link for why URLs in Cocoon should not have an extension - I know its required, but why is it bad? Derek On 2008/10/09 at 12:47, in message [EMAIL PROTECTED], David Legg [EMAIL PROTECTED] wrote: Mmmm... Does anyone still care about IE4 - the stats from different sites suggest not: By chance I came across another item [1] which seems to suggest that perhaps the problem is not exclusive to IE4. Maybe IE5 and IE6 are involved too. The article gets a few developers worked up after the beginning. My reading of it seems to imply that mime-sniffing takes place if IE can't work out the mime-type from the url. So if your url ends in .html you are ok, but if it ends in no extension (something which is considered good practice in Cocoon) it will sniff the file content and use that to decide what to do with the downloaded file. It would be interesting to know if anyone else has come across this issue with IE7. Regards, David Legg [1] http://blogs.msdn.com/ie/archive/2005/02/01/364581.aspx - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to force a Save As prompt?
Does anyone still care about IE4 - the stats from different sites suggest not: http://www.w3schools.com/browsers/browsers_stats.asp http://www.upsdell.com/BrowserNews/stat.htm http://www.thecounter.com/stats/2008/September/browser.php Looks like IE5 usage is down below 1% and no one even bothers to count IE4 users... so I would say the OP would not have to worry about this issue :-) On 2008/10/07 at 04:10, in message [EMAIL PROTECTED], David Legg [EMAIL PROTECTED] wrote: is there a way or workaround how i can force a Save As prompt for my cocoon output? The problem is that the browser knows the mime types of the generated files (xml, pdfs) and displays it instead of prompting. See http://markmail.org/message/jgcetksksgmpfk2c#query:cocoon%20content%20disposition%20header+page:1+mid:dt2547iguthv34dg+state:results (Content disposition header) Ah! this all brings back some memories. This article summarizes what you need nicely [1] Just for reference, I presume you don't care about IE4? The technique of setting the content-disposition header doesn't work for that browser because even if you used the content-disposition header it still sniffed the file you were downloading and acted on what it found there rather than what you told it [2]. Regards, David Legg [1] http://support.microsoft.com/kb/260519 [2] http://support.microsoft.com/kb/182315/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to force a Save As prompt?
Mmmm... Does anyone still care about IE4 - the stats from different sites suggest not: By chance I came across another item [1] which seems to suggest that perhaps the problem is not exclusive to IE4. Maybe IE5 and IE6 are involved too. The article gets a few developers worked up after the beginning. My reading of it seems to imply that mime-sniffing takes place if IE can't work out the mime-type from the url. So if your url ends in .html you are ok, but if it ends in no extension (something which is considered good practice in Cocoon) it will sniff the file content and use that to decide what to do with the downloaded file. It would be interesting to know if anyone else has come across this issue with IE7. Regards, David Legg [1] http://blogs.msdn.com/ie/archive/2005/02/01/364581.aspx - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to force a Save As prompt?
Hi, I typically do something like this: map:match pattern=download/*/** map:generate src=cocoon:/{2}/ map:act type=set-header map:parameter name=Content-Type value=application/x-download/ map:parameter name=Content-Disposition value=attachment ; filename={1}/ map:serialize type=xml/ /map:act /map:match Kind regards, Geert Drs. G.P.H. Josten Consultant http://www.daidalos.nl/ Daidalos BV Source of Innovation Hoekeindsehof 1-4 2665 JZ Bleiswijk Tel.: +31 (0) 10 850 1200 Fax: +31 (0) 10 850 1199 http://www.daidalos.nl/ KvK 27164984 De informatie - verzonden in of met dit emailbericht - is afkomstig van Daidalos BV en is uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld hebt ontvangen, verzoeken wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden ontleend. From: Matthias Müller [mailto:[EMAIL PROTECTED] Sent: dinsdag 7 oktober 2008 14:28 To: users cocoon.apache.org Subject: How to force a Save As prompt? Hi there, is there a way or workaround how i can force a Save As prompt for my cocoon output? The problem is that the browser knows the mime types of the generated files (xml, pdfs) and displays it instead of prompting. regards, matthias - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: How to force a Save As prompt?
is there a way or workaround how i can force a Save As prompt for my cocoon output? The problem is that the browser knows the mime types of the generated files (xml, pdfs) and displays it instead of prompting. See http://markmail.org/message/jgcetksksgmpfk2c#query:cocoon%20content%20disposition%20header+page:1+mid:dt2547iguthv34dg+state:results (Content disposition header) Ah! this all brings back some memories. This article summarizes what you need nicely [1] Just for reference, I presume you don't care about IE4? The technique of setting the content-disposition header doesn't work for that browser because even if you used the content-disposition header it still sniffed the file you were downloading and acted on what it found there rather than what you told it [2]. Regards, David Legg [1] http://support.microsoft.com/kb/260519 [2] http://support.microsoft.com/kb/182315/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: How to force a Save As prompt?
-Original Message- From: Matthias Müller [mailto:[EMAIL PROTECTED] Sent: dinsdag 7 oktober 2008 14:28 To: users cocoon.apache.org Subject: How to force a Save As prompt? Hi there, is there a way or workaround how i can force a Save As prompt for my cocoon output? The problem is that the browser knows the mime types of the generated files (xml, pdfs) and displays it instead of prompting. regards, matthias See http://markmail.org/message/jgcetksksgmpfk2c#query:cocoon%20content%20disposition%20header+page:1+mid:dt2547iguthv34dg+state:results (Content disposition header) Jasha Joachimsthal [EMAIL PROTECTED] - [EMAIL PROTECTED] www.onehippo.com Amsterdam - Hippo B.V. Oosteinde 11 1017 WT Amsterdam +31(0)20-5224466 San Francisco - Hippo USA Inc. 101 H Street, suite Q Petaluma CA 94952-3329 +1 (707) 773-4646 - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]