News:

Happy New Year!

Main Menu

Visio save as web page?

Started by VisioDev, July 14, 2012, 10:23:39 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

VisioDev

I tried to see the people at stackoverflow could help but I'll try my luck here if I get some help and responses.


0 down vote favorite
   

I put this:

<?xml-stylesheet type="text/xsl" href="Change.xsl"?>

into the data.xml in the web page folder.

I can see that going to data.xml in the browser it changes from Location to Place.

However, if I just boot from Visio's htm page, the xml-stylesheet in data.xml doesn't get executed, and Location just stays to Location string.

It doesn't seem like that the .htm file is loading the xsl-stylesheet, even though it's placed in the xml file already


thoughts?

JohnGoldsmith

As far as I'm aware a processing instruction will only be implemented by the browser if it's actually loaded into the window (I'm happy to be corrected if that's not the case).  In the case of data.xml this is only being loaded via script and so you'd have to adapt the js to call the transform yourself. 

If you have a look in frameset.js you'll see a function in there called 'XMLData'.  I've added another arguement (see attached) to the function so it now takes the 'data.xml' file name and a stylesheet filename as well (this can be empty if you don't want to pass one in).  If you also change the calling code (line 41ish) then you should get the changes you're after.

Hope that helps.

Best regards

John
John Goldsmith - Visio MVP
http://visualsignals.typepad.co.uk/

VisioDev

awesome! I'll try it out.

I actually did see that it was loading via script .js, but didn't realize why it didn't load in the browser still

Browser ID: smf (possibly_robot)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 175 (show)
Files included: 34 - 1306KB. (show)
Memory used: 1069KB.
Tokens: post-login.
Cache hits: 13: 0.00200s for 26,544 bytes (show)
Cache misses: 3: (show)
Queries used: 16.

[Show Queries]