Link processing in SvgExport

The extension processes the hyperlinks on the diagram, and makes them available on the published diagram as well. The following tables summarize the link processing logic in the extension.

Full urls

Full URLs are copied as-is. Means, if the link starts with a protocol (like http://, https://, etc) then it is not modified (or fixed, in case it includes spaces or special characters). Full links can be useful to refer to actual web sites (either internal or external, lauching programs (such as email), etc).

Source and Target (no changes)

Relative links

Relative links are converted to URL encoded, and left as-is. If the diagram has "Hyperlink Base" set, then the links are converted according to the specified URL. Thsi is the default behavior, but it can be switched off to expand relative links (see below the information on the setting)

Relative links can be useful for moving the publication as a whole to another place (for example, dev/test/prod environment), or to another server/computer.

Source Hyperlink Base Target
file.ext file.ext
sub folder\file.ext sub%20folder/file.ext
../file.ext ../file.ext
file.txt http://localhost/foo/ http://localhost/foo/file.txt
..\\dir\file.ext http://localhost/foo/ http://localhost/dir/file.ext

Absolute paths

Absolute paths are converted to the file:// links. These can be useful for example to refer to some files in LAN, which are located at the fixed server (think PDF documents for example). You can make a reference to such document in Visio diagram, and it will be kept intact when publishing, just the file:// prefix will be added and the link properly encoded for the browser.

Source Target
C:\dir\file.ext file:///C:/dir/file.ext
\\unc\share\dir\file.ext file://unc/share/dir/file.ext
\\\share file://

Conversion of Visio file extension from Visio to html

If this option is enabled, the extension can automatically convert linked files extensions to "HTML". This can be useful if you export multiple linked diagrams. If you export them as-is, you will have a link to a .VSD file; if you want a link to HTML file instead, you can enable this option, and then export the diagrams.

Source Target
file.vsdx file.html
folder\file.vsdx folder/file.html

Controlling link processing

The setting to enable relative link processing is set by default for the new diagrams. For the existing diagrams, default Visio link conversion is used (full url). You can always change this behavior using the extension’s settings panel: