You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Mohit Narain <m....@solitarsystems.com> on 2001/09/10 06:40:02 UTC

Loading MS Word Documents

I was wondering whether anyone has given links to MS Word documents from
theor Cocoon generated pages. My problem is as follows...

When i hardcode where the file should come from (like c:\try.doc) in the
XSL, the browser looks for it in the local computer which does not make
sense for a non-server machine. However, when i give a "/" prefix and then
the name of the file, the link seems to point to the correct location but
the file does not display. The next option is to define the mime-type (which
for MS Word is application/msword). I did this by adding the following line
to my sitemap.xmap file :

  <map:match pattern="documents/images/**.doc">
    <map:read src="docs/xdocs/images/{1}.doc"
mime-type="application/msword"/>
  </map:match>

Then i stored the word document in the /images folder... but the page still
didnt load up. I have used the same technique for loading gif images and
those work ok.

Any ideas?

Looking forward to your help.
Best Wishes...Mohit


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


RE: Loading MS Word Documents

Posted by Mohit Narain <m....@solitarsystems.com>.
I just tried this change but the page still does not load up when i click on
the word document link. Any ideas?

Best Wishes...Mohit

-----Original Message-----
From: Ling Kok Choon [mailto:kokchoon@brel.com]
Sent: Monday, September 10, 2001 10:24 AM
To: cocoon-users@xml.apache.org; m.narain@solitarsystems.com
Subject: Re: Loading MS Word Documents


Hi,

   I think your mime type is wrong : try to use this :

 <map:match pattern="documents/images/**.doc">
    <map:read src="docs/xdocs/images/{1}.doc"
mime-type="application/winword"/>
  </map:match>

regards,

Kok Choon.

--------------------------------------------------------
Name: Ling Kok Choon
E-mail: Ling Kok Choon <ko...@brel.com>
Date: 09/10/01
Time: 12:53:58

This message was sent by Z-Mail Pro - from NetManage
NetManage - delivers Standards Based IntraNet Solutions
--------------------------------------------------------



---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: Loading MS Word Documents

Posted by Ling Kok Choon <ko...@brel.com>.
Hi,

   I think your mime type is wrong : try to use this :

 <map:match pattern="documents/images/**.doc">
    <map:read src="docs/xdocs/images/{1}.doc" mime-type="application/winword"/>
  </map:match>

regards,

Kok Choon.

--------------------------------------------------------
Name: Ling Kok Choon
E-mail: Ling Kok Choon <ko...@brel.com>
Date: 09/10/01
Time: 12:53:58

This message was sent by Z-Mail Pro - from NetManage
NetManage - delivers Standards Based IntraNet Solutions
--------------------------------------------------------


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>