MIME types for Visio

X

xargon

Hi everyone,

This is more of a Visio web developer question!

I have a visio compatible XML string that I want to flush to the client
machine. I want to know how to set the MIME type and pass the XML string
so that it opens it in VIsio on the client machine. I tried setting the
"application/x-visio" in the response object's content type field, but
that only tries to save it as an ASP.NET page!

Well, I even tried registering the MIME type with IIS and setting the
content type field to application/vnd.visio.xml. Then, in my application I
do:
Response.Clear();
Response.Charset = "";
Response.ContentType = "application/vnd.visio.xml";

But it still interprets it as a ASP page. I also tried
"application/vnd.ms-visio". That also did not work. When I use
application/vnd.visio then it tries to interpret the document as the
native Visio format :(

Also, I noticed something with IE. Some macros and ActiveX creation within
Visio do not work, even if user enables macro on prompt. What I wanted was
to stream the visio content to the client, start an instance of visio and
be able to use all the features. I do not want the IE to host Visio
application inside.

Guys, please help me! I would be in deep trouble. I should have looked at
this before doing all this development! I would be even willing to pay
some bucks to someone who helps here!

Cheers!
xargon
 
A

Al Edlund

your issue is that Visio doesn't use XML native (yet?) for it's internal
processing, so passing xml to it doesn't get you anything. you'd have to
save it as text (vdx) and then have visio import it. Mai-lan had a section
on some of it last October in her BLOG

http://blogs.msdn.com/mailant/archive/2004/10.aspx

2. Write an XSLT to transform the Visio VDX file. You'll have to write
a transform that maps Visio XML to another schema. There is a sample in the
Visio 2002 SDK called "XSLT Sample" that describes how to use XSL
Transformations (XSLT) to transform data in a Visio drawing into an
HTML-based report (you can do a transform for another XML schema too). The
sample consists of an HTML page used to run the XSLT and display the
resulting report, the Visio drawing in XML (.vdx) format, the XSLT map that
transforms document data, the XSLT map that transforms shape data, and the
JScript file containing the functions used in the sample. The sample takes a
Visio diagram like this one:

HTH,


AL
 
X

xargon

I found out how to load a visio file as it is streamed over the Internet.
We just have to specify that the file has to be opened in another window.

But I still cannot stream VDX files. it always tries to open it as a VSD
file :(
 
X

xargon

Ok, figured out the Mime type too.

Must use the HTTP content disposition header and specify the attachment
ex.
"Content-Disposition", "attachment; fileName=MyVisioFile.vdx"

:)

Cheers!
xargon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top