XML with SVG

T

Tripredacus-X

I am trying to implement an HTML free website design. I have the XM
part working fine, but I am having difficulty trying to figure out ho
to use SVG with it.

I would like one of two things:

1. To build an interface that allows SVGs to load appropriately base
on a button that is clicked. This method requires me to embed the SV
onto the XML page, or to reference another XML file in the main one.

2. To have the SVG load in another window. I currently have it set as
link with _blank target.

While the SVG in question loads fine offline, it loads as code online
The page in question is here:

http://tinyurl.com/ywsqt

The link is the one entitled "box pic." The file is located here:

http://tinyurl.com/2tymu

Is there something I need to add to the SVG to get it to load properly
Something with the standalone tag? Note that this SVG was generated b
Adobe VectorEye.

Any help would be appreciated

Tripredacus-
 
M

Martin Honnen

Tripredacus-X said:
I am trying to implement an HTML free website design. I have the XML
part working fine, but I am having difficulty trying to figure out how
to use SVG with it.

I would like one of two things:

1. To build an interface that allows SVGs to load appropriately based
on a button that is clicked. This method requires me to embed the SVG
onto the XML page, or to reference another XML file in the main one.

2. To have the SVG load in another window. I currently have it set as a
link with _blank target.

While the SVG in question loads fine offline, it loads as code online.
The page in question is here:

http://tinyurl.com/ywsqt

The link is the one entitled "box pic." The file is located here:

http://tinyurl.com/2tymu

Is there something I need to add to the SVG to get it to load properly?
Something with the standalone tag? Note that this SVG was generated by
Adobe VectorEye.

You need to configure the web server to send out the proper Content-Type
header for .svg files, as far as I remember it is image/svg+xml.
But be aware that relying on SVG to show graphics is a bit bold as not
every browser has the proper plugin installed.
 
T

Thomas Meinike

Tripredacus-X said:
While the SVG in question loads fine offline, it loads as code online.
[...]
http://tinyurl.com/2tymu

Your Apache 2.0.40 sends the SVG document with "Content-Type:
text/xml". Set the correct MIME type image/svg+xml in mime.types or a
..htaccess file:

AddType image/svg+xml svg
AddType image/svg+xml svgz

cu, Thomas
 
T

Tripredacus-X

Your Apache 2.0.40 sends the SVG document with "Content-Type:
text/xml". Set the correct MIME type image/svg+xml in mime.types o
a
..htaccess file:

AddType image/svg+xml svg
AddType image/svg+xml svgz

Cool, thanks. i sent this to the webhost admin. He will try to chang
it for me. Eventually i want to move my site to a .net host but I d
not have the money for that yet!

One question about the code you have on your site, would there be an
issues to use the "external picture" code within an XML doc

Tripredacus-
 

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

Members online

Forum statistics

Threads
473,995
Messages
2,570,233
Members
46,820
Latest member
GilbertoA5

Latest Threads

Top